mirror of
git://holbrook.no/eth-contract-registry
synced 2026-05-27 21:47:57 +02:00
Correct identifier array interface name
This commit is contained in:
@@ -13,7 +13,7 @@ contract ContractRegistry {
|
||||
address public owner;
|
||||
|
||||
// Implements Registry
|
||||
bytes32[] public identifiers;
|
||||
bytes32[] public identifier;
|
||||
|
||||
// Implements ERC173
|
||||
event OwnershipTransferred(address indexed _previousOwner, address indexed _newOwner);
|
||||
@@ -24,7 +24,7 @@ contract ContractRegistry {
|
||||
constructor(bytes32[] memory _identifiers) {
|
||||
owner = msg.sender;
|
||||
for (uint i = 0; i < _identifiers.length; i++) {
|
||||
identifiers.push(_identifiers[i]);
|
||||
identifier.push(_identifiers[i]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ contract ContractRegistry {
|
||||
require(_address != address(0));
|
||||
|
||||
bool found = false;
|
||||
for (uint i = 0; i < identifiers.length; i++) {
|
||||
if (identifiers[i] == _identifier) {
|
||||
for (uint i = 0; i < identifier.length; i++) {
|
||||
if (identifier[i] == _identifier) {
|
||||
found = true;
|
||||
}
|
||||
}
|
||||
@@ -53,7 +53,7 @@ contract ContractRegistry {
|
||||
function transferOwnership(address _newOwner) public returns (bool) {
|
||||
address _oldOwner;
|
||||
|
||||
require(msg.sender == owner);
|
||||
require(msg.sender == owner, 'ERR_AXX');
|
||||
_oldOwner = owner;
|
||||
owner = _newOwner;
|
||||
emit OwnershipTransferred(_oldOwner, _newOwner);
|
||||
@@ -67,12 +67,12 @@ contract ContractRegistry {
|
||||
|
||||
// Implements Registry
|
||||
function identifierCount() public view returns(uint256) {
|
||||
return identifiers.length;
|
||||
return identifier.length;
|
||||
}
|
||||
|
||||
// Implements ERC165
|
||||
function supportsInterface(bytes4 _sum) public pure returns (bool) {
|
||||
if (_sum == 0x12625fe5) { // Registry
|
||||
if (_sum == 0xeffbf671) { // Registry
|
||||
return true;
|
||||
}
|
||||
if (_sum == 0x01ffc9a7) { // ERC165
|
||||
|
||||
Reference in New Issue
Block a user