Rehabilitate address declarator with chainlib code, with tests

This commit is contained in:
nolash
2021-03-21 13:27:42 +01:00
parent 4095c28221
commit 4f753b990e
5 changed files with 330 additions and 206 deletions

View File

@@ -1 +1,4 @@
from .index import TokenUniqueSymbolIndex
from .index import (
TokenUniqueSymbolIndex,
to_identifier,
)

View File

@@ -41,8 +41,7 @@ class TokenUniqueSymbolIndex(TxFactory):
__abi = None
__bytecode = None
__address = None
__erc20_abi = None
@staticmethod
def abi():
@@ -135,17 +134,3 @@ class TokenUniqueSymbolIndex(TxFactory):
@classmethod
def parse_entry_count(self, v):
return abi_decode_single(ABIContractType.UINT256, v)
# def count(self):
# return self.contract.functions.registryCount().call()
#
#
# def get_index(self, idx):
# return self.contract.functions.entry(idx).call()
#
#
# def get_token_by_symbol(self, symbol):
# ref = to_ref(symbol)
# return self.contract.functions.addressOf(symbol).call()