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

Method CheckWitness

smartcontract/smart_contract.go:211–216  ·  view source on GitHub ↗

CheckWitness check whether authorization correct If address is wallet address, check whether in the signature addressed list Else check whether address is calling contract address Param address: wallet address or contract address

(address common.Address)

Source from the content-addressed store, hash-verified

209// Else check whether address is calling contract address
210// Param address: wallet address or contract address
211func (this *SmartContract) CheckWitness(address common.Address) bool {
212 if this.checkAccountAddress(address) || this.checkContractAddress(address) {
213 return true
214 }
215 return false
216}
217
218func (this *SmartContract) checkAccountAddress(address common.Address) bool {
219 addresses, err := this.Config.Tx.GetSignatureAddresses()

Callers

nothing calls this directly

Calls 2

checkAccountAddressMethod · 0.95
checkContractAddressMethod · 0.95

Tested by

no test coverage detected