diff --git a/python/eth_address_declarator/declarator.py b/python/eth_address_declarator/declarator.py index e1282dd..ef0ae31 100644 --- a/python/eth_address_declarator/declarator.py +++ b/python/eth_address_declarator/declarator.py @@ -38,8 +38,8 @@ class AddressDeclarator: @staticmethod def abi(): if AddressDeclarator.__abi == None: - f = open(os.path.join(datadir, 'AccountDeclarator.json'), 'r') - AccountDeclarator.__abi = json.load(f) + f = open(os.path.join(datadir, 'AddressDeclarator.json'), 'r') + AddressDeclarator.__abi = json.load(f) f.close() return AddressDeclarator.__abi @@ -47,8 +47,8 @@ class AddressDeclarator: @staticmethod def bytecode(): if AddressDeclarator.__bytecode == None: - f = open(os.path.join(datadir, 'AccountDeclarator.bin')) - AccountDeclarator.__bytecode = f.read() + f = open(os.path.join(datadir, 'AddressDeclarator.bin')) + AddressDeclarator.__bytecode = f.read() f.close() return AddressDeclarator.__bytecode diff --git a/python/eth_address_declarator/runnable/add.py b/python/eth_address_declarator/runnable/add.py index 2978f2f..b782631 100644 --- a/python/eth_address_declarator/runnable/add.py +++ b/python/eth_address_declarator/runnable/add.py @@ -16,6 +16,7 @@ import web3 from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer from crypto_dev_signer.keystore import DictKeystore from crypto_dev_signer.eth.helper import EthTxExecutor +from chainlib.chain import ChainSpec logging.basicConfig(level=logging.WARNING) logg = logging.getLogger() @@ -60,8 +61,8 @@ if args.y != None: logg.debug('now have key for signer address {}'.format(signer_address)) signer = EIP155Signer(keystore) -chain_pair = args.i.split(':') -chain_id = int(chain_pair[1]) +chain_spec = ChainSpec.from_chain_str(args.i) +chain_id = chain_spec.network_id() helper = EthTxExecutor( w3, diff --git a/python/eth_address_declarator/runnable/deploy.py b/python/eth_address_declarator/runnable/deploy.py index 6da9b79..f24767d 100644 --- a/python/eth_address_declarator/runnable/deploy.py +++ b/python/eth_address_declarator/runnable/deploy.py @@ -16,6 +16,7 @@ import web3 from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer from crypto_dev_signer.keystore import DictKeystore from crypto_dev_signer.eth.helper import EthTxExecutor +from chainlib.chain import ChainSpec logging.basicConfig(level=logging.WARNING) logg = logging.getLogger() @@ -57,8 +58,8 @@ if args.y != None: logg.debug('now have key for signer address {}'.format(signer_address)) signer = EIP155Signer(keystore) -chain_pair = args.i.split(':') -chain_id = int(chain_pair[1]) +chain_spec = ChainSpec.from_chain_str(args.i) +chain_id = chain_spec.network_id() helper = EthTxExecutor( w3, diff --git a/python/eth_token_index/runnable/add.py b/python/eth_token_index/runnable/add.py index 888051b..825501a 100644 --- a/python/eth_token_index/runnable/add.py +++ b/python/eth_token_index/runnable/add.py @@ -17,6 +17,7 @@ import web3 from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer from crypto_dev_signer.keystore import DictKeystore from crypto_dev_signer.eth.helper import EthTxExecutor +from chainlib.chain import ChainSpec logging.basicConfig(level=logging.WARNING) logg = logging.getLogger() @@ -59,8 +60,8 @@ if args.y != None: logg.debug('now have key for signer address {}'.format(signer_address)) signer = EIP155Signer(keystore) -chain_pair = args.i.split(':') -chain_id = int(chain_pair[1]) +chain_spec = ChainSpec.from_chain_str(args.i) +chain_id = chain_spec.network_id() helper = EthTxExecutor( w3, diff --git a/python/eth_token_index/runnable/deploy.py b/python/eth_token_index/runnable/deploy.py index 4d2b0b1..26d87fe 100644 --- a/python/eth_token_index/runnable/deploy.py +++ b/python/eth_token_index/runnable/deploy.py @@ -16,6 +16,7 @@ import web3 from crypto_dev_signer.eth.signer import ReferenceSigner as EIP155Signer from crypto_dev_signer.keystore import DictKeystore from crypto_dev_signer.eth.helper import EthTxExecutor +from chainspec.chain import ChainSpec logging.basicConfig(level=logging.WARNING) logg = logging.getLogger() @@ -56,8 +57,8 @@ if args.y != None: logg.debug('now have key for signer address {}'.format(signer_address)) signer = EIP155Signer(keystore) -chain_pair = args.i.split(':') -chain_id = int(chain_pair[1]) +chain_spec = ChainSpec.from_chain_str(args.i) +chain_id = chain_spec.network_id() helper = EthTxExecutor( w3, diff --git a/python/setup.cfg b/python/setup.cfg index e4e1d67..1c89ec9 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = eth-address-index -version = 0.1.0a8 +version = 0.1.0a9 description = Signed metadata declarations for ethereum addresses author = Louis Holbrook author_email = dev@holbrook.no @@ -31,6 +31,7 @@ packages = install_requires = web3==5.12.2 crypto-dev-signer~=0.4.13rc2 + chainlib~=0.0.1a15 tests_require = eth-tester==0.5.0b2 py-evm==0.3.0a20