MCPcopy Create free account
hub / github.com/DNAProject/DNA / checkAccountAddress

Method checkAccountAddress

smartcontract/smart_contract.go:218–230  ·  view source on GitHub ↗
(address common.Address)

Source from the content-addressed store, hash-verified

216}
217
218func (this *SmartContract) checkAccountAddress(address common.Address) bool {
219 addresses, err := this.Config.Tx.GetSignatureAddresses()
220 if err != nil {
221 log.Errorf("get signature address error:%v", err)
222 return false
223 }
224 for _, v := range addresses {
225 if v == address {
226 return true
227 }
228 }
229 return false
230}
231
232func (this *SmartContract) checkContractAddress(address common.Address) bool {
233 if this.CallingContext() != nil && this.CallingContext().ContractAddress == address {

Callers 1

CheckWitnessMethod · 0.95

Calls 2

ErrorfFunction · 0.92
GetSignatureAddressesMethod · 0.45

Tested by

no test coverage detected