eth-address-index

signed metadata declarations for ethereum addresses
Log | Files | Refs

commit 16b84d4d0cda1fb467ae5c415ba43e02e4606a74
parent d3d731e76d015c1f0570ac7bd7fb3f11bcb053a8
Author: nolash <dev@holbrook.no>
Date:   Wed, 30 Dec 2020 08:58:37 +0100

Reinstate entry by indexmethod

Diffstat:
Mpython/MANIFEST.in | 2+-
Mpython/eth_token_index/data/TokenUniqueSymbolIndex.bin | 4++--
Mpython/eth_token_index/data/TokenUniqueSymbolIndex.json | 2+-
Mpython/eth_token_index/index.py | 2+-
Mpython/setup.cfg | 11++++++++++-
Mpython/tests/test_inteface.py | 3+++
Msolidity/TokenUniqueSymbolIndex.bin | 4++--
Msolidity/TokenUniqueSymbolIndex.json | 2+-
Msolidity/TokenUniqueSymbolIndex.sol | 4++++
9 files changed, 25 insertions(+), 9 deletions(-)

diff --git a/python/MANIFEST.in b/python/MANIFEST.in @@ -1 +1 @@ -include **/data/TokenEndorser.json **/data/TokenEndorser.bin +include **/data/*.json **/data/*.bin diff --git a/python/eth_token_index/data/TokenUniqueSymbolIndex.bin b/python/eth_token_index/data/TokenUniqueSymbolIndex.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600260009080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ae3806100c46000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c8063bb34534c1161005b578063bb34534c146100da578063cbb834341461010a578063d22057a914610128578063e2095c07146101585761007d565b80637ef5029814610082578063880ad0af146100b25780638da5cb5b146100bc575b600080fd5b61009c60048036038101906100979190610655565b610188565b6040516100a99190610858565b60405180910390f35b6100ba6101a0565b005b6100c46101db565b6040516100d19190610802565b60405180910390f35b6100f460048036038101906100ef9190610655565b6101ff565b6040516101019190610802565b60405180910390f35b610112610285565b60405161011f9190610858565b60405180910390f35b610142600480360381019061013d91906106a7565b61029e565b60405161014f919061081d565b60405180910390f35b610172600480360381019061016d9190610724565b61051f565b60405161017f9190610802565b60405180910390f35b60016020528060005260406000206000915090505481565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101d290610838565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001600084815260200190815260200160002054905060028181548110610252577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b600060016002805490506102999190610951565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146102f957600080fd5b60606000806000808673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f95d89b41000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516103a891906107eb565b6000604051808303816000865af19150503d80600081146103e5576040519150601f19603f3d011682016040523d82523d6000602084013e6103ea565b606091505b5091509150816103f957600080fd5b8080602001905181019061040d91906106e3565b945060028560405161041f91906107eb565b602060405180830381855afa15801561043c573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061045f919061067e565b935083881461046d57600080fd5b600160008581526020019081526020016000205492506000831461049057600080fd5b60028054905060016000868152602001908152602001600020819055506002879080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019550505050505092915050565b6000600260018361053091906108fb565b81548110610567577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60006105ac6105a7846108a4565b610873565b9050828152602081018484840111156105c457600080fd5b6105cf8482856109d7565b509392505050565b6000813590506105e681610a68565b92915050565b6000813590506105fb81610a7f565b92915050565b60008151905061061081610a7f565b92915050565b600082601f83011261062757600080fd5b8151610637848260208601610599565b91505092915050565b60008135905061064f81610a96565b92915050565b60006020828403121561066757600080fd5b6000610675848285016105ec565b91505092915050565b60006020828403121561069057600080fd5b600061069e84828501610601565b91505092915050565b600080604083850312156106ba57600080fd5b60006106c8858286016105ec565b92505060206106d9858286016105d7565b9150509250929050565b6000602082840312156106f557600080fd5b600082015167ffffffffffffffff81111561070f57600080fd5b61071b84828501610616565b91505092915050565b60006020828403121561073657600080fd5b600061074484828501610640565b91505092915050565b61075681610985565b82525050565b61076581610997565b82525050565b6000610776826108d4565b61078081856108df565b93506107908185602086016109d7565b80840191505092915050565b60006107a96017836108ea565b91507f6f776e65722063616e6e6f74206265206368616e6765640000000000000000006000830152602082019050919050565b6107e5816109cd565b82525050565b60006107f7828461076b565b915081905092915050565b6000602082019050610817600083018461074d565b92915050565b6000602082019050610832600083018461075c565b92915050565b600060208201905081810360008301526108518161079c565b9050919050565b600060208201905061086d60008301846107dc565b92915050565b6000604051905081810181811067ffffffffffffffff8211171561089a57610899610a39565b5b8060405250919050565b600067ffffffffffffffff8211156108bf576108be610a39565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000610906826109cd565b9150610911836109cd565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561094657610945610a0a565b5b828201905092915050565b600061095c826109cd565b9150610967836109cd565b92508282101561097a57610979610a0a565b5b828203905092915050565b6000610990826109ad565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b838110156109f55780820151818401526020810190506109da565b83811115610a04576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a7181610985565b8114610a7c57600080fd5b50565b610a88816109a3565b8114610a9357600080fd5b50565b610a9f816109cd565b8114610aaa57600080fd5b5056fea2646970667358221220ac61ec9cee18728f473ca43d704ed11cffb389e5a9605129d3bb031e61a9457764736f6c63430008000033 -\ No newline at end of file +608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600260009080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610c57806100c46000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063bb34534c1161005b578063bb34534c14610115578063cbb8343414610145578063d22057a914610163578063e2095c071461019357610088565b806301ffc9a71461008d5780637ef50298146100bd578063880ad0af146100ed5780638da5cb5b146100f7575b600080fd5b6100a760048036038101906100a291906107eb565b6101c3565b6040516100b4919061094e565b60405180910390f35b6100d760048036038101906100d2919061075d565b61027b565b6040516100e49190610989565b60405180910390f35b6100f5610293565b005b6100ff6102ce565b60405161010c9190610933565b60405180910390f35b61012f600480360381019061012a919061075d565b6102f2565b60405161013c9190610933565b60405180910390f35b61014d610378565b60405161015a9190610989565b60405180910390f35b61017d600480360381019061017891906107af565b610391565b60405161018a919061094e565b60405180910390f35b6101ad60048036038101906101a89190610855565b610612565b6040516101ba9190610933565b60405180910390f35b600063325d15e260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561021b5760019050610276565b6301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102715760019050610276565b600090505b919050565b60016020528060005260406000206000915090505481565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c590610969565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001600084815260200190815260200160002054905060028181548110610345577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000600160028054905061038c9190610a82565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103ec57600080fd5b60606000806000808673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f95d89b41000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161049b919061091c565b6000604051808303816000865af19150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b5091509150816104ec57600080fd5b808060200190518101906105009190610814565b9450600285604051610512919061091c565b602060405180830381855afa15801561052f573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906105529190610786565b935083881461056057600080fd5b600160008581526020019081526020016000205492506000831461058357600080fd5b60028054905060016000868152602001908152602001600020819055506002879080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019550505050505092915050565b600060026001836106239190610a2c565b8154811061065a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061069f61069a846109d5565b6109a4565b9050828152602081018484840111156106b757600080fd5b6106c2848285610b34565b509392505050565b6000813590506106d981610bc5565b92915050565b6000813590506106ee81610bdc565b92915050565b60008151905061070381610bdc565b92915050565b60008135905061071881610bf3565b92915050565b600082601f83011261072f57600080fd5b815161073f84826020860161068c565b91505092915050565b60008135905061075781610c0a565b92915050565b60006020828403121561076f57600080fd5b600061077d848285016106df565b91505092915050565b60006020828403121561079857600080fd5b60006107a6848285016106f4565b91505092915050565b600080604083850312156107c257600080fd5b60006107d0858286016106df565b92505060206107e1858286016106ca565b9150509250929050565b6000602082840312156107fd57600080fd5b600061080b84828501610709565b91505092915050565b60006020828403121561082657600080fd5b600082015167ffffffffffffffff81111561084057600080fd5b61084c8482850161071e565b91505092915050565b60006020828403121561086757600080fd5b600061087584828501610748565b91505092915050565b61088781610ab6565b82525050565b61089681610ac8565b82525050565b60006108a782610a05565b6108b18185610a10565b93506108c1818560208601610b34565b80840191505092915050565b60006108da601783610a1b565b91507f6f776e65722063616e6e6f74206265206368616e6765640000000000000000006000830152602082019050919050565b61091681610b2a565b82525050565b6000610928828461089c565b915081905092915050565b6000602082019050610948600083018461087e565b92915050565b6000602082019050610963600083018461088d565b92915050565b60006020820190508181036000830152610982816108cd565b9050919050565b600060208201905061099e600083018461090d565b92915050565b6000604051905081810181811067ffffffffffffffff821117156109cb576109ca610b96565b5b8060405250919050565b600067ffffffffffffffff8211156109f0576109ef610b96565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000610a3782610b2a565b9150610a4283610b2a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610a7757610a76610b67565b5b828201905092915050565b6000610a8d82610b2a565b9150610a9883610b2a565b925082821015610aab57610aaa610b67565b5b828203905092915050565b6000610ac182610b0a565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610b52578082015181840152602081019050610b37565b83811115610b61576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610bce81610ab6565b8114610bd957600080fd5b50565b610be581610ad4565b8114610bf057600080fd5b50565b610bfc81610ade565b8114610c0757600080fd5b50565b610c1381610b2a565b8114610c1e57600080fd5b5056fea2646970667358221220ddfe90639c05ff4cfde92247820a70440251493847b735f6c9e4493db9f5fe6764736f6c63430008000033 +\ No newline at end of file diff --git a/python/eth_token_index/data/TokenUniqueSymbolIndex.json b/python/eth_token_index/data/TokenUniqueSymbolIndex.json @@ -1 +1 @@ -[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"entry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"}],"name":"register","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"registry","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"entry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"}],"name":"register","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"registry","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceCode","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}] diff --git a/python/eth_token_index/index.py b/python/eth_token_index/index.py @@ -70,7 +70,7 @@ class TokenUniqueSymbolIndex: def get_index(self, idx): - return self.contract.functions.tokens(idx).call() + return self.contract.functions.entry(idx).call() def get_token_by_symbol(self, symbol): diff --git a/python/setup.cfg b/python/setup.cfg @@ -1,5 +1,5 @@ [metadata] -name = eth-address-declarator +name = eth-address-index version = 0.0.1 description = Signed metadata declarations for ethereum addresses author = Louis Holbrook @@ -26,6 +26,8 @@ python_requires = >= 3.6 packages = eth_address_declarator eth_address_declarator.runnable + eth_token_index + eth_token_index.runnable install_requires = web3==5.12.2 tests_require = @@ -41,8 +43,15 @@ testing = * = data/AddressDeclarator.json data/AddressDeclarator.bin + data/GiftableToken.bin + data/GifttableToken.json + data/TokenUniqueSymbolIndex.bin + data/TokenUniqueSymbolIndex.json + data/ERC20.json [options.entry_points] console_scripts = eth-address-declarator-deploy = eth_address_declarator.runnable.deploy:main eth-address-declarator-add = eth_address_declarator.runnable.add:main + eth-token-index-deploy = eth_token_index.runnable.deploy:main + eth-token-index-add = eth_token_index.runnable.add:main diff --git a/python/tests/test_inteface.py b/python/tests/test_inteface.py @@ -95,6 +95,9 @@ class Test(unittest.TestCase): assert ifc.count() == 2 + assert ifc.get_index(0) == self.address_token_one + assert ifc.get_index(1) == self.address_token_two + if __name__ == '__main__': unittest.main() diff --git a/solidity/TokenUniqueSymbolIndex.bin b/solidity/TokenUniqueSymbolIndex.bin @@ -1 +1 @@ -608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600260009080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610af7806100c46000396000f3fe608060405234801561001057600080fd5b506004361061007d5760003560e01c80638da5cb5b1161005b5780638da5cb5b146100ec578063bb34534c1461010a578063cbb834341461013a578063d22057a9146101585761007d565b806301ffc9a7146100825780637ef50298146100b2578063880ad0af146100e2575b600080fd5b61009c60048036038101906100979190610721565b610188565b6040516100a9919061085b565b60405180910390f35b6100cc60048036038101906100c79190610693565b610240565b6040516100d99190610896565b60405180910390f35b6100ea610258565b005b6100f4610293565b6040516101019190610840565b60405180910390f35b610124600480360381019061011f9190610693565b6102b7565b6040516101319190610840565b60405180910390f35b61014261033d565b60405161014f9190610896565b60405180910390f35b610172600480360381019061016d91906106e5565b610356565b60405161017f919061085b565b60405180910390f35b600063325d15e260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156101e0576001905061023b565b6301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415610236576001905061023b565b600090505b919050565b60016020528060005260406000206000915090505481565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161028a90610876565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600160008481526020019081526020016000205490506002818154811061030a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b600060016002805490506103519190610939565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103b157600080fd5b60606000806000808673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f95d89b41000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff83818316178352505050506040516104609190610829565b6000604051808303816000865af19150503d806000811461049d576040519150601f19603f3d011682016040523d82523d6000602084013e6104a2565b606091505b5091509150816104b157600080fd5b808060200190518101906104c5919061074a565b94506002856040516104d79190610829565b602060405180830381855afa1580156104f4573d6000803e3d6000fd5b5050506040513d601f19601f8201168201806040525081019061051791906106bc565b935083881461052557600080fd5b600160008581526020019081526020016000205492506000831461054857600080fd5b60028054905060016000868152602001908152602001600020819055506002879080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019550505050505092915050565b60006105ea6105e5846108e2565b6108b1565b90508281526020810184848401111561060257600080fd5b61060d8482856109eb565b509392505050565b60008135905061062481610a7c565b92915050565b60008135905061063981610a93565b92915050565b60008151905061064e81610a93565b92915050565b60008135905061066381610aaa565b92915050565b600082601f83011261067a57600080fd5b815161068a8482602086016105d7565b91505092915050565b6000602082840312156106a557600080fd5b60006106b38482850161062a565b91505092915050565b6000602082840312156106ce57600080fd5b60006106dc8482850161063f565b91505092915050565b600080604083850312156106f857600080fd5b60006107068582860161062a565b925050602061071785828601610615565b9150509250929050565b60006020828403121561073357600080fd5b600061074184828501610654565b91505092915050565b60006020828403121561075c57600080fd5b600082015167ffffffffffffffff81111561077657600080fd5b61078284828501610669565b91505092915050565b6107948161096d565b82525050565b6107a38161097f565b82525050565b60006107b482610912565b6107be818561091d565b93506107ce8185602086016109eb565b80840191505092915050565b60006107e7601783610928565b91507f6f776e65722063616e6e6f74206265206368616e6765640000000000000000006000830152602082019050919050565b610823816109e1565b82525050565b600061083582846107a9565b915081905092915050565b6000602082019050610855600083018461078b565b92915050565b6000602082019050610870600083018461079a565b92915050565b6000602082019050818103600083015261088f816107da565b9050919050565b60006020820190506108ab600083018461081a565b92915050565b6000604051905081810181811067ffffffffffffffff821117156108d8576108d7610a4d565b5b8060405250919050565b600067ffffffffffffffff8211156108fd576108fc610a4d565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000610944826109e1565b915061094f836109e1565b92508282101561096257610961610a1e565b5b828203905092915050565b6000610978826109c1565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610a095780820151818401526020810190506109ee565b83811115610a18576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610a858161096d565b8114610a9057600080fd5b50565b610a9c8161098b565b8114610aa757600080fd5b50565b610ab381610995565b8114610abe57600080fd5b5056fea2646970667358221220aba1cf99d509278647e13b624d530a127d5d43b7d9bbad9c25df27fcbd8dfef464736f6c63430008000033 -\ No newline at end of file +608060405234801561001057600080fd5b50336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600260009080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610c57806100c46000396000f3fe608060405234801561001057600080fd5b50600436106100885760003560e01c8063bb34534c1161005b578063bb34534c14610115578063cbb8343414610145578063d22057a914610163578063e2095c071461019357610088565b806301ffc9a71461008d5780637ef50298146100bd578063880ad0af146100ed5780638da5cb5b146100f7575b600080fd5b6100a760048036038101906100a291906107eb565b6101c3565b6040516100b4919061094e565b60405180910390f35b6100d760048036038101906100d2919061075d565b61027b565b6040516100e49190610989565b60405180910390f35b6100f5610293565b005b6100ff6102ce565b60405161010c9190610933565b60405180910390f35b61012f600480360381019061012a919061075d565b6102f2565b60405161013c9190610933565b60405180910390f35b61014d610378565b60405161015a9190610989565b60405180910390f35b61017d600480360381019061017891906107af565b610391565b60405161018a919061094e565b60405180910390f35b6101ad60048036038101906101a89190610855565b610612565b6040516101ba9190610933565b60405180910390f35b600063325d15e260e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916141561021b5760019050610276565b6301ffc9a760e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614156102715760019050610276565b600090505b919050565b60016020528060005260406000206000915090505481565b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102c590610969565b60405180910390fd5b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806001600084815260200190815260200160002054905060028181548110610345577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16915050919050565b6000600160028054905061038c9190610a82565b905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146103ec57600080fd5b60606000806000808673ffffffffffffffffffffffffffffffffffffffff166040516024016040516020818303038152906040527f95d89b41000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff838183161783525050505060405161049b919061091c565b6000604051808303816000865af19150503d80600081146104d8576040519150601f19603f3d011682016040523d82523d6000602084013e6104dd565b606091505b5091509150816104ec57600080fd5b808060200190518101906105009190610814565b9450600285604051610512919061091c565b602060405180830381855afa15801561052f573d6000803e3d6000fd5b5050506040513d601f19601f820116820180604052508101906105529190610786565b935083881461056057600080fd5b600160008581526020019081526020016000205492506000831461058357600080fd5b60028054905060016000868152602001908152602001600020819055506002879080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019550505050505092915050565b600060026001836106239190610a2c565b8154811061065a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b600061069f61069a846109d5565b6109a4565b9050828152602081018484840111156106b757600080fd5b6106c2848285610b34565b509392505050565b6000813590506106d981610bc5565b92915050565b6000813590506106ee81610bdc565b92915050565b60008151905061070381610bdc565b92915050565b60008135905061071881610bf3565b92915050565b600082601f83011261072f57600080fd5b815161073f84826020860161068c565b91505092915050565b60008135905061075781610c0a565b92915050565b60006020828403121561076f57600080fd5b600061077d848285016106df565b91505092915050565b60006020828403121561079857600080fd5b60006107a6848285016106f4565b91505092915050565b600080604083850312156107c257600080fd5b60006107d0858286016106df565b92505060206107e1858286016106ca565b9150509250929050565b6000602082840312156107fd57600080fd5b600061080b84828501610709565b91505092915050565b60006020828403121561082657600080fd5b600082015167ffffffffffffffff81111561084057600080fd5b61084c8482850161071e565b91505092915050565b60006020828403121561086757600080fd5b600061087584828501610748565b91505092915050565b61088781610ab6565b82525050565b61089681610ac8565b82525050565b60006108a782610a05565b6108b18185610a10565b93506108c1818560208601610b34565b80840191505092915050565b60006108da601783610a1b565b91507f6f776e65722063616e6e6f74206265206368616e6765640000000000000000006000830152602082019050919050565b61091681610b2a565b82525050565b6000610928828461089c565b915081905092915050565b6000602082019050610948600083018461087e565b92915050565b6000602082019050610963600083018461088d565b92915050565b60006020820190508181036000830152610982816108cd565b9050919050565b600060208201905061099e600083018461090d565b92915050565b6000604051905081810181811067ffffffffffffffff821117156109cb576109ca610b96565b5b8060405250919050565b600067ffffffffffffffff8211156109f0576109ef610b96565b5b601f19601f8301169050602081019050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000610a3782610b2a565b9150610a4283610b2a565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115610a7757610a76610b67565b5b828201905092915050565b6000610a8d82610b2a565b9150610a9883610b2a565b925082821015610aab57610aaa610b67565b5b828203905092915050565b6000610ac182610b0a565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60005b83811015610b52578082015181840152602081019050610b37565b83811115610b61576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b610bce81610ab6565b8114610bd957600080fd5b50565b610be581610ad4565b8114610bf057600080fd5b50565b610bfc81610ade565b8114610c0757600080fd5b50565b610c1381610b2a565b8114610c1e57600080fd5b5056fea2646970667358221220ddfe90639c05ff4cfde92247820a70440251493847b735f6c9e4493db9f5fe6764736f6c63430008000033 +\ No newline at end of file diff --git a/solidity/TokenUniqueSymbolIndex.json b/solidity/TokenUniqueSymbolIndex.json @@ -1 +1 @@ -[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"}],"name":"register","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"registry","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceCode","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}] +[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"}],"name":"addressOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_idx","type":"uint256"}],"name":"entry","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_key","type":"bytes32"},{"internalType":"address","name":"_token","type":"address"}],"name":"register","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"registry","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registryCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"_interfaceCode","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}] diff --git a/solidity/TokenUniqueSymbolIndex.sol b/solidity/TokenUniqueSymbolIndex.sol @@ -26,6 +26,10 @@ contract TokenUniqueSymbolIndex { return false; } + function entry(uint256 _idx) public view returns ( address ) { + return tokens[_idx + 1]; + } + // EIP 172 function transferOwnership() public { revert("owner cannot be changed");