Checks if a contract implements a function
function simImplementsFunction(address addr, string canonicalSignature) internal returns (bool result)
Parameters
Name | Type | Description |
---|---|---|
addr | address | the contract's address |
canonicalSignature | string | e.g. transfer(address,uint256) |
Return Values
Name | Type | Description |
---|---|---|
result | bool | true if the contract implements the function, otherwise false |
Notes
- If the address passed to
simImplementsFunction
is not a contract, the result will befalse
.