Skip to content

Commit

Permalink
Rename SupportsInterfaceWithLookup to ERC165 (#1288)
Browse files Browse the repository at this point in the history
* rename SupportsInterfaceWithLookup to ERC165

* rename SupportsInterfaceWithLookup files to ERC165
  • Loading branch information
frangio authored and nventuro committed Sep 6, 2018
1 parent ab13379 commit 661e5d8
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -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
{
Expand Down
4 changes: 2 additions & 2 deletions contracts/token/ERC721/ERC721.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ pragma solidity ^0.4.24;

import "./IERC721.sol";
import "./ERC721Basic.sol";
import "../../introspection/SupportsInterfaceWithLookup.sol";
import "../../introspection/ERC165.sol";


/**
Expand All @@ -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_;
Expand Down
4 changes: 2 additions & 2 deletions contracts/token/ERC721/ERC721Basic.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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 () {
Expand Down

0 comments on commit 661e5d8

Please sign in to comment.