* Add ERC165Query library * Address PR Comments * Add tests and mocks from #1024 and refactor code slightly * Fix javascript and solidity linting errors * Split supportsInterface into three methods as discussed in #1086 * Change InterfaceId_ERC165 comment to match style in the rest of the repo * Fix max-len lint issue on ERC165Checker.sol * Conditionally ignore the asserts during solidity-coverage test * Switch to abi.encodeWithSelector and add test for account addresses * Switch to supportsInterfaces API as suggested by @frangio * Adding ERC165InterfacesSupported.sol * Fix style issues * Add test for supportsInterfaces returning false * Add ERC165Checker.sol newline * feat: fix coverage implementation * fix: solidity linting error * fix: revert to using boolean tests instead of require statements * fix: make supportsERC165Interface private again * rename SupportsInterfaceWithLookupMock to avoid name clashing
33 lines
613 B
Solidity
33 lines
613 B
Solidity
pragma solidity ^0.4.24;
|
|
|
|
import "../introspection/ERC165Checker.sol";
|
|
|
|
|
|
contract ERC165CheckerMock {
|
|
using ERC165Checker for address;
|
|
|
|
function supportsERC165(address _address)
|
|
public
|
|
view
|
|
returns (bool)
|
|
{
|
|
return _address.supportsERC165();
|
|
}
|
|
|
|
function supportsInterface(address _address, bytes4 _interfaceId)
|
|
public
|
|
view
|
|
returns (bool)
|
|
{
|
|
return _address.supportsInterface(_interfaceId);
|
|
}
|
|
|
|
function supportsInterfaces(address _address, bytes4[] _interfaceIds)
|
|
public
|
|
view
|
|
returns (bool)
|
|
{
|
|
return _address.supportsInterfaces(_interfaceIds);
|
|
}
|
|
}
|