monorepo icon indicating copy to clipboard operation
monorepo copied to clipboard

Take advantage of EIP 165 for App interface verification

Open snario opened this issue 6 years ago • 2 comments

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

snario avatar Aug 02 '18 17:08 snario

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

shrugs avatar Aug 02 '18 18:08 shrugs

@IIIIllllIIIIllllIIIIllllIIIIllllIIIIll would this be useful for #1263?

snario avatar May 08 '19 17:05 snario