Rename SupportsInterfaceWithLookup to ERC165 (#1288)
* rename SupportsInterfaceWithLookup to ERC165 * rename SupportsInterfaceWithLookup files to ERC165
This commit is contained in:
committed by
Nicolás Venturo
parent
ab13379653
commit
661e5d86dc
@ -4,11 +4,11 @@ import "./IERC165.sol";
|
||||
|
||||
|
||||
/**
|
||||
* @title SupportsInterfaceWithLookup
|
||||
* @title ERC165
|
||||
* @author Matt Condon (@shrugs)
|
||||
* @dev Implements ERC165 using a lookup table.
|
||||
*/
|
||||
contract SupportsInterfaceWithLookup is IERC165 {
|
||||
contract ERC165 is IERC165 {
|
||||
|
||||
bytes4 private constant InterfaceId_ERC165 = 0x01ffc9a7;
|
||||
/**
|
||||
@ -1,9 +1,9 @@
|
||||
pragma solidity ^0.4.24;
|
||||
|
||||
import "../introspection/SupportsInterfaceWithLookup.sol";
|
||||
import "../introspection/ERC165.sol";
|
||||
|
||||
|
||||
contract SupportsInterfaceWithLookupMock is SupportsInterfaceWithLookup {
|
||||
contract ERC165Mock is ERC165 {
|
||||
function registerInterface(bytes4 _interfaceId)
|
||||
public
|
||||
{
|
||||
@ -2,7 +2,7 @@ pragma solidity ^0.4.24;
|
||||
|
||||
import "./IERC721.sol";
|
||||
import "./ERC721Basic.sol";
|
||||
import "../../introspection/SupportsInterfaceWithLookup.sol";
|
||||
import "../../introspection/ERC165.sol";
|
||||
|
||||
|
||||
/**
|
||||
@ -11,7 +11,7 @@ import "../../introspection/SupportsInterfaceWithLookup.sol";
|
||||
* Moreover, it includes approve all functionality using operator terminology
|
||||
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
|
||||
*/
|
||||
contract ERC721 is SupportsInterfaceWithLookup, ERC721Basic, IERC721 {
|
||||
contract ERC721 is ERC165, ERC721Basic, IERC721 {
|
||||
|
||||
// Token name
|
||||
string internal name_;
|
||||
|
||||
@ -4,14 +4,14 @@ import "./IERC721Basic.sol";
|
||||
import "./IERC721Receiver.sol";
|
||||
import "../../math/SafeMath.sol";
|
||||
import "../../utils/Address.sol";
|
||||
import "../../introspection/SupportsInterfaceWithLookup.sol";
|
||||
import "../../introspection/ERC165.sol";
|
||||
|
||||
|
||||
/**
|
||||
* @title ERC721 Non-Fungible Token Standard basic implementation
|
||||
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md
|
||||
*/
|
||||
contract ERC721Basic is SupportsInterfaceWithLookup, IERC721Basic {
|
||||
contract ERC721Basic is ERC165, IERC721Basic {
|
||||
|
||||
using SafeMath for uint256;
|
||||
using Address for address;
|
||||
|
||||
@ -1,14 +1,14 @@
|
||||
const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
|
||||
const { assertRevert } = require('../helpers/assertRevert');
|
||||
|
||||
const SupportsInterfaceWithLookup = artifacts.require('SupportsInterfaceWithLookupMock');
|
||||
const ERC165 = artifacts.require('ERC165Mock');
|
||||
|
||||
require('chai')
|
||||
.should();
|
||||
|
||||
contract('SupportsInterfaceWithLookup', function () {
|
||||
contract('ERC165', function () {
|
||||
beforeEach(async function () {
|
||||
this.mock = await SupportsInterfaceWithLookup.new();
|
||||
this.mock = await ERC165.new();
|
||||
});
|
||||
|
||||
it('does not allow 0xffffffff', async function () {
|
||||
Reference in New Issue
Block a user