monorepo
monorepo copied to clipboard
Take advantage of EIP 165 for App interface verification
It seems like EIP 165 is being worked on to support one of our use cases; to verify that a particular interface is supported. For us, we'd want to verify that the reduce
, resolve
, and similar methods are supported on an App that is committed to in the state channel
Resources
- https://github.com/ethereum/EIPs/blob/master/EIPS/eip-165.md
- https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/introspection/ERC165.sol
ERC165Checker.sol is being added as part of https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1024 (which depends on some other issues/standards: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/1024#issuecomment-410015542 )
It'll eventually implement
using ERC165Checker for address;
// ....
require(myAddress.supportsInterface(InterfaceId_CounterfactualReducer));
Although now that I think about it, I can merge this separately and rebase Bouncer off of that, so that's what I'll do as part of https://github.com/OpenZeppelin/openzeppelin-solidity/issues/1145
@IIIIllllIIIIllllIIIIllllIIIIllllIIIIll would this be useful for #1263?