contract-registry

Ethereum Smart Contract key-value registry
Log | Files | Refs

commit c4725d8a97f857413942f997465996c3dd048745
parent dca45e4c4724854553c987c5e2802b37e20aa39d
Author: nolash <dev@holbrook.no>
Date:   Sun,  4 Apr 2021 14:38:55 +0200

Upgrade chainlib

Diffstat:
Mpython/eth_contract_registry/registry.py | 2+-
Mpython/eth_contract_registry/runnable/deploy.py | 5++---
Mpython/eth_contract_registry/runnable/list.py | 5++---
Mpython/eth_contract_registry/runnable/set.py | 5++---
Mpython/gmon.out | 0
Mpython/requirements.txt | 4++--
Mpython/setup.cfg | 2+-
7 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/python/eth_contract_registry/registry.py b/python/eth_contract_registry/registry.py @@ -16,7 +16,7 @@ from chainlib.eth.constant import ( ZERO_CONTENT, MAX_UINT, ) -from chainlib.eth.rpc import ( +from chainlib.jsonrpc import ( jsonrpc_template, ) from hexathon import ( diff --git a/python/eth_contract_registry/runnable/deploy.py b/python/eth_contract_registry/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) @@ -79,7 +78,7 @@ if 'ContractRegistry' not in identifiers: logg.debug('adding identifiers {}'.format(identifiers)) def main(): - c = Registry(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id) + c = Registry(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle) (tx_hash_hex, o) = c.constructor(signer_address, identifiers) rpc.do(o) if block_last: diff --git a/python/eth_contract_registry/runnable/list.py b/python/eth_contract_registry/runnable/list.py @@ -37,7 +37,7 @@ default_format = 'terminal' argparser = argparse.ArgumentParser() argparser.add_argument('-p', '--provider', dest='p', default='http://localhost:8545', type=str, help='RPC 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('-r', '--registry', dest='r', required=True, type=str, help='Contract registry 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') @@ -52,7 +52,6 @@ elif args.v: logg.setLevel(logging.INFO) chain_spec = ChainSpec.from_chain_str(args.i) -chain_id = chain_spec.network_id() rpc = EthHTTPConnection(args.p) registry_address = args.r @@ -89,7 +88,7 @@ def ls(ifc, fmt=default_format, w=sys.stdout): def main(): - c = Registry() + c = Registry(chain_spec) if identifier != None: element(c, identifier, fmt=fmt, w=sys.stdout) else: diff --git a/python/eth_contract_registry/runnable/set.py b/python/eth_contract_registry/runnable/set.py @@ -36,7 +36,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('-r', '--registry', dest='r', type=str, help='Contract registry address') argparser.add_argument('-v', action='store_true', help='Be verbose') @@ -71,7 +71,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) @@ -86,7 +85,7 @@ address = args.address def main(): - c = Registry(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id) + c = Registry(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle) (tx_hash_hex, o) = c.set(registry_address, signer_address, identifier, address, chain_spec, ZERO_CONTENT) rpc.do(o) if block_last: diff --git a/python/gmon.out b/python/gmon.out Binary files differ. diff --git 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 @@ -1,6 +1,6 @@ [metadata] name = eth-contract-registry -version = 0.5.4a5 +version = 0.5.4a7 description = Ethereum Smart Contract key-value registry author = Louis Holbrook author_email = dev@holbrook.no