The ERC165 standard allows us to interrogate if a contract supports a specific function. It also appears to be a prerequisite for univocally identifying ERC721 contracts (#33).
The current proposal is to add a new field on the Account type. Suggested definition:
The resolver would need to convert the String representation into its corresponding binary representation as per the link above (there might be functions in the web3 lib to do this).
The ERC165 standard allows us to interrogate if a contract supports a specific function. It also appears to be a prerequisite for univocally identifying ERC721 contracts (#33).
The current proposal is to add a new field on the
Account
type. Suggested definition:Where ERC165Result is an enum with values:
SUPPORTED
=> if the contract has asupportsInterface(bytes4)
function as mandated by the standard, and the result of the call is true.NOT_SUPPORTED
=> if the contract has asupportsInterface(bytes4)
function as mandated by the standard, and the result of the call is false.NON_INTROSPECTABLE
=> if the contract doesn't expose asupportsInterface(bytes4)
function.The selector argument is the String representation of the function selector (e.g.
transfer(address,uint)
). More info here: http://solidity.readthedocs.io/en/v0.4.21/abi-spec.html#function-selector.The resolver would need to convert the String representation into its corresponding binary representation as per the link above (there might be functions in the web3 lib to do this).