Commit 661e5d86 by Francisco Giordano Committed by Nicolás Venturo

Rename SupportsInterfaceWithLookup to ERC165 (#1288)

* rename SupportsInterfaceWithLookup to ERC165

* rename SupportsInterfaceWithLookup files to ERC165
parent ab133796
...@@ -4,11 +4,11 @@ import "./IERC165.sol"; ...@@ -4,11 +4,11 @@ import "./IERC165.sol";
/** /**
* @title SupportsInterfaceWithLookup * @title ERC165
* @author Matt Condon (@shrugs) * @author Matt Condon (@shrugs)
* @dev Implements ERC165 using a lookup table. * @dev Implements ERC165 using a lookup table.
*/ */
contract SupportsInterfaceWithLookup is IERC165 { contract ERC165 is IERC165 {
bytes4 private constant InterfaceId_ERC165 = 0x01ffc9a7; bytes4 private constant InterfaceId_ERC165 = 0x01ffc9a7;
/** /**
......
pragma solidity ^0.4.24; 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) function registerInterface(bytes4 _interfaceId)
public public
{ {
......
...@@ -2,7 +2,7 @@ pragma solidity ^0.4.24; ...@@ -2,7 +2,7 @@ pragma solidity ^0.4.24;
import "./IERC721.sol"; import "./IERC721.sol";
import "./ERC721Basic.sol"; import "./ERC721Basic.sol";
import "../../introspection/SupportsInterfaceWithLookup.sol"; import "../../introspection/ERC165.sol";
/** /**
...@@ -11,7 +11,7 @@ import "../../introspection/SupportsInterfaceWithLookup.sol"; ...@@ -11,7 +11,7 @@ import "../../introspection/SupportsInterfaceWithLookup.sol";
* Moreover, it includes approve all functionality using operator terminology * Moreover, it includes approve all functionality using operator terminology
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md * @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 // Token name
string internal name_; string internal name_;
......
...@@ -4,14 +4,14 @@ import "./IERC721Basic.sol"; ...@@ -4,14 +4,14 @@ import "./IERC721Basic.sol";
import "./IERC721Receiver.sol"; import "./IERC721Receiver.sol";
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
import "../../utils/Address.sol"; import "../../utils/Address.sol";
import "../../introspection/SupportsInterfaceWithLookup.sol"; import "../../introspection/ERC165.sol";
/** /**
* @title ERC721 Non-Fungible Token Standard basic implementation * @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md * @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 SafeMath for uint256;
using Address for address; using Address for address;
......
const { shouldSupportInterfaces } = require('./SupportsInterface.behavior'); const { shouldSupportInterfaces } = require('./SupportsInterface.behavior');
const { assertRevert } = require('../helpers/assertRevert'); const { assertRevert } = require('../helpers/assertRevert');
const SupportsInterfaceWithLookup = artifacts.require('SupportsInterfaceWithLookupMock'); const ERC165 = artifacts.require('ERC165Mock');
require('chai') require('chai')
.should(); .should();
contract('SupportsInterfaceWithLookup', function () { contract('ERC165', function () {
beforeEach(async function () { beforeEach(async function () {
this.mock = await SupportsInterfaceWithLookup.new(); this.mock = await ERC165.new();
}); });
it('does not allow 0xffffffff', async function () { it('does not allow 0xffffffff', async function () {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment