diff --git a/python/eth_address_declarator/runnable/add.py b/python/eth_address_declarator/runnable/add.py index 6985e9a..46c1e9d 100644 --- a/python/eth_address_declarator/runnable/add.py +++ b/python/eth_address_declarator/runnable/add.py @@ -34,7 +34,7 @@ argparser = argparse.ArgumentParser() argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='Web3 provider url (http only)') argparser.add_argument('-w', action='store_true', help='Wait for the last transaction to be confirmed') argparser.add_argument('-ww', action='store_true', help='Wait for every transaction to be confirmed') -argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='Ethereum:1', help='Chain specification string') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='evm:ethereum:1', help='Chain specification string') argparser.add_argument('-a', '--contract-address', dest='a', type=str, help='Address declaration contract address') argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing') argparser.add_argument('-v', action='store_true', help='Be verbose') @@ -69,7 +69,6 @@ if args.y != None: signer = EIP155Signer(keystore) chain_spec = ChainSpec.from_chain_str(args.i) -chain_id = chain_spec.network_id() rpc = EthHTTPConnection(args.p) nonce_oracle = RPCNonceOracle(signer_address, rpc) @@ -81,7 +80,7 @@ declaration = args.declaration def main(): - c = AddressDeclarator(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id) + c = AddressDeclarator(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle) (tx_hash_hex, o) = c.add_declaration(contract_address, signer_address, subject_address, declaration) rpc.do(o) if block_last: diff --git a/python/eth_address_declarator/runnable/deploy.py b/python/eth_address_declarator/runnable/deploy.py index 19eee5f..16aaaab 100644 --- a/python/eth_address_declarator/runnable/deploy.py +++ b/python/eth_address_declarator/runnable/deploy.py @@ -35,7 +35,7 @@ argparser = argparse.ArgumentParser() argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='Web3 provider url (http only)') argparser.add_argument('-w', action='store_true', help='Wait for the last transaction to be confirmed') argparser.add_argument('-ww', action='store_true', help='Wait for every transaction to be confirmed') -argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='Ethereum:1', help='Chain specification string') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='evm:ethereum:1', help='Chain specification string') argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing') argparser.add_argument('-v', action='store_true', help='Be verbose') argparser.add_argument('-vv', action='store_true', help='Be more verbose') @@ -68,7 +68,6 @@ if args.y != None: signer = EIP155Signer(keystore) chain_spec = ChainSpec.from_chain_str(args.i) -chain_id = chain_spec.network_id() rpc = EthHTTPConnection(args.p) nonce_oracle = RPCNonceOracle(signer_address, rpc) @@ -77,7 +76,7 @@ gas_oracle = RPCGasOracle(rpc, code_callback=AddressDeclarator.gas) initial_description = args.owner_description_digest def main(): - c = AddressDeclarator(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id) + c = AddressDeclarator(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle) (tx_hash_hex, o) = c.constructor(signer_address, initial_description) rpc.do(o) if block_last: diff --git a/python/eth_token_index/runnable/add.py b/python/eth_token_index/runnable/add.py index 1abb922..f3eca4e 100644 --- a/python/eth_token_index/runnable/add.py +++ b/python/eth_token_index/runnable/add.py @@ -37,7 +37,7 @@ argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8 argparser.add_argument('-w', action='store_true', help='Wait for the last transaction to be confirmed') argparser.add_argument('-ww', action='store_true', help='Wait for every transaction to be confirmed') argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing') -argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='Ethereum:1', help='Chain specification string') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='evm:ethereum:1', help='Chain specification string') argparser.add_argument('-a', '--contract-address', dest='a', required=True, type=str, help='Token index contract address') argparser.add_argument('-v', action='store_true', help='Be verbose') argparser.add_argument('-vv', action='store_true', help='Be more verbose') @@ -70,7 +70,6 @@ if args.y != None: signer = EIP155Signer(keystore) chain_spec = ChainSpec.from_chain_str(args.i) -chain_id = chain_spec.network_id() rpc = EthHTTPConnection(args.p) nonce_oracle = RPCNonceOracle(signer_address, rpc) @@ -80,7 +79,7 @@ token_address = args.token_address def main(): - c = TokenUniqueSymbolIndex(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id) + c = TokenUniqueSymbolIndex(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle) (tx_hash_hex, o) = c.register(contract_address, signer_address, token_address) rpc.do(o) if block_last: @@ -89,7 +88,7 @@ def main(): sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you') sys.exit(1) - c = ERC20() + c = ERC20(chain_spec) o = c.symbol(token_address) r = rpc.do(o) token_symbol = ERC20.parse_symbol(r) diff --git a/python/eth_token_index/runnable/deploy.py b/python/eth_token_index/runnable/deploy.py index 22eb1d9..8029edb 100644 --- a/python/eth_token_index/runnable/deploy.py +++ b/python/eth_token_index/runnable/deploy.py @@ -32,7 +32,7 @@ data_dir = os.path.join(script_dir, '..', 'data') argparser = argparse.ArgumentParser() argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='Web3 provider url (http only)') -argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='Ethereum:1', help='Chain specification string') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='evm:ethereum:1', help='Chain specification string') argparser.add_argument('-w', action='store_true', help='Wait for the last transaction to be confirmed') argparser.add_argument('-ww', action='store_true', help='Wait for every transaction to be confirmed') argparser.add_argument('-y', '--key-file', dest='y', type=str, help='Ethereum keystore file to use for signing') @@ -66,7 +66,6 @@ if args.y != None: signer = EIP155Signer(keystore) chain_spec = ChainSpec.from_chain_str(args.i) -chain_id = chain_spec.network_id() rpc = EthHTTPConnection(args.p) nonce_oracle = RPCNonceOracle(signer_address, rpc) @@ -75,7 +74,7 @@ gas_oracle = RPCGasOracle(rpc, code_callback=TokenUniqueSymbolIndex.gas) def main(): - c = TokenUniqueSymbolIndex(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id) + c = TokenUniqueSymbolIndex(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle) (tx_hash_hex, o) = c.constructor(signer_address) rpc.do(o) if block_last: diff --git a/python/eth_token_index/runnable/list.py b/python/eth_token_index/runnable/list.py index f413236..b2127d8 100644 --- a/python/eth_token_index/runnable/list.py +++ b/python/eth_token_index/runnable/list.py @@ -32,7 +32,7 @@ data_dir = os.path.join(script_dir, '..', 'data') argparser = argparse.ArgumentParser() argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='Web3 provider url (http only)') -argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='Ethereum:1', help='Chain specification string') +argparser.add_argument('-i', '--chain-spec', dest='i', type=str, default='evm:ethereum:1', help='Chain specification string') argparser.add_argument('-a', '--contract-address', dest='a', type=str, required=True, help='Token endorsement contract address') argparser.add_argument('-f', '--format', dest='f', type=str, default=default_format, help='Output format [human, brief]') argparser.add_argument('-v', action='store_true', help='Be verbose') @@ -51,6 +51,8 @@ contract_address = args.a token_symbol = args.token_symbol fmt = args.f +chain_spec = ChainSpec.from_chain_str(args.i) + def out_element(e, fmt=default_format, w=sys.stdout): if fmt == 'brief': @@ -85,8 +87,8 @@ def ls(ifc, contract_address, token_ifc, fmt=fmt, w=sys.stdout): def main(): - token_ifc = ERC20() - ifc = TokenUniqueSymbolIndex() + token_ifc = ERC20(chain_spec) + ifc = TokenUniqueSymbolIndex(chain_spec) if token_symbol != None: element(ifc, contract_address, token_symbol, fmt, sys.stdout) else: diff --git a/python/requirements.txt b/python/requirements.txt index fe3f198..48d5ab7 100644 --- a/python/requirements.txt +++ b/python/requirements.txt @@ -1,3 +1,3 @@ confini~=0.3.6rc3 -crypto-dev-signer~=0.4.14a9 -chainlib~=0.0.1a34 +crypto-dev-signer~=0.4.14a17 +chainlib~=0.0.2a1 diff --git a/python/setup.cfg b/python/setup.cfg index a38e539..95aa2b3 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = eth-address-index -version = 0.1.1a4 +version = 0.1.1a7 description = Signed metadata declarations for ethereum addresses author = Louis Holbrook author_email = dev@holbrook.no