mirror of
git://holbrook.no/eth-address-index
synced 2024-11-30 03:46:46 +01:00
Upgrade chainlib
This commit is contained in:
parent
4e6aec419d
commit
59603b7e50
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
@ -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-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
|
||||
|
Loading…
Reference in New Issue
Block a user