mirror of
git://holbrook.no/eth-contract-registry
synced 2024-12-22 04:17:32 +01:00
Upgrade chainlib
This commit is contained in:
parent
dca45e4c47
commit
c4725d8a97
@ -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 (
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
BIN
python/gmon.out
BIN
python/gmon.out
Binary file not shown.
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user