mirror of
git://holbrook.no/eth-token-index
synced 2026-05-17 19:05:19 +02:00
Implement missing have() method in contract
This commit is contained in:
@@ -85,6 +85,12 @@ contract TokenUniqueSymbolIndex {
|
||||
return register(_token);
|
||||
}
|
||||
|
||||
// Implements AccountsIndex
|
||||
function time(address _token) public pure returns(uint256) {
|
||||
_token;
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Implements AccountsIndexMutable
|
||||
function remove(address _token) external returns (bool) {
|
||||
uint256 i;
|
||||
@@ -170,6 +176,11 @@ contract TokenUniqueSymbolIndex {
|
||||
return identifierList.length - 1;
|
||||
}
|
||||
|
||||
// Implements AccountsIndex
|
||||
function have(address _token) public view returns(bool) {
|
||||
return tokenIndex[_token] != bytes32(0x0);
|
||||
}
|
||||
|
||||
// Implements EIP165
|
||||
function supportsInterface(bytes4 _sum) public pure returns (bool) {
|
||||
if (_sum == 0xeffbf671) { // Registry
|
||||
|
||||
Reference in New Issue
Block a user