Checks if a contract implements a function

function simImplementsFunction(address addr, string canonicalSignature) internal returns (bool result)

Parameters

NameTypeDescription
addraddressthe contract's address
canonicalSignaturestringe.g. transfer(address,uint256)

Return Values

NameTypeDescription
resultbooltrue if the contract implements the function, otherwise false

Notes

  1. If the address passed to simImplementsFunction is not a contract, the result will be false.