Implement missing have() method in contract

This commit is contained in:
lash
2023-08-03 09:55:06 +01:00
parent 83981d6018
commit 4e8082a663
6 changed files with 29 additions and 4 deletions

View File

@@ -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