mirror of
git://holbrook.no/eth-address-index
synced 2024-11-30 11:56:45 +01:00
Add receipt waits to all runnables
This commit is contained in:
parent
426b0adc79
commit
e698f51c84
@ -49,6 +49,9 @@ if args.vv:
|
|||||||
elif args.v:
|
elif args.v:
|
||||||
logg.setLevel(logging.INFO)
|
logg.setLevel(logging.INFO)
|
||||||
|
|
||||||
|
block_last = args.w
|
||||||
|
block_all = args.ww
|
||||||
|
|
||||||
passphrase_env = 'ETH_PASSPHRASE'
|
passphrase_env = 'ETH_PASSPHRASE'
|
||||||
if args.env_prefix != None:
|
if args.env_prefix != None:
|
||||||
passphrase_env = args.env_prefix + '_' + passphrase_env
|
passphrase_env = args.env_prefix + '_' + passphrase_env
|
||||||
@ -81,8 +84,8 @@ def main():
|
|||||||
c = AddressDeclarator(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
c = AddressDeclarator(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
||||||
(tx_hash_hex, o) = c.add_declaration(contract_address, signer_address, subject_address, declaration)
|
(tx_hash_hex, o) = c.add_declaration(contract_address, signer_address, subject_address, declaration)
|
||||||
rpc.do(o)
|
rpc.do(o)
|
||||||
o = receipt(tx_hash_hex)
|
if block_last:
|
||||||
r = rpc.do(o)
|
r = rpc.wait(tx_hash_hex)
|
||||||
if r['status'] == 0:
|
if r['status'] == 0:
|
||||||
sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you')
|
sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
@ -80,18 +80,17 @@ def main():
|
|||||||
c = AddressDeclarator(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
c = AddressDeclarator(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
||||||
(tx_hash_hex, o) = c.constructor(signer_address, initial_description)
|
(tx_hash_hex, o) = c.constructor(signer_address, initial_description)
|
||||||
rpc.do(o)
|
rpc.do(o)
|
||||||
o = receipt(tx_hash_hex)
|
if block_last:
|
||||||
r = rpc.do(o)
|
r = rpc.wait(tx_hash_hex)
|
||||||
if r['status'] == 0:
|
if r['status'] == 0:
|
||||||
sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you')
|
sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
# TODO: pass through translator for keys (evm tester uses underscore instead of camelcase)
|
# TODO: pass through translator for keys (evm tester uses underscore instead of camelcase)
|
||||||
address = r['contractAddress']
|
address = r['contractAddress']
|
||||||
|
|
||||||
if block_last:
|
|
||||||
rpc.wait(tx_hash_hex)
|
|
||||||
|
|
||||||
print(address)
|
print(address)
|
||||||
|
else:
|
||||||
|
print(tx_hash_hex)
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
@ -83,8 +83,8 @@ def main():
|
|||||||
c = TokenUniqueSymbolIndex(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
c = TokenUniqueSymbolIndex(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
||||||
(tx_hash_hex, o) = c.register(contract_address, signer_address, token_address)
|
(tx_hash_hex, o) = c.register(contract_address, signer_address, token_address)
|
||||||
rpc.do(o)
|
rpc.do(o)
|
||||||
o = receipt(tx_hash_hex)
|
if block_last:
|
||||||
r = rpc.do(o)
|
r = rpc.wait(tx_hash_hex)
|
||||||
if r['status'] == 0:
|
if r['status'] == 0:
|
||||||
sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you')
|
sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -94,9 +94,6 @@ def main():
|
|||||||
r = rpc.do(o)
|
r = rpc.do(o)
|
||||||
token_symbol = ERC20.parse_symbol(r)
|
token_symbol = ERC20.parse_symbol(r)
|
||||||
|
|
||||||
if block_last:
|
|
||||||
helper.wait_for()
|
|
||||||
|
|
||||||
logg.info('added token {} at {} to token index {}'.format(token_symbol, token_address, contract_address))
|
logg.info('added token {} at {} to token index {}'.format(token_symbol, token_address, contract_address))
|
||||||
|
|
||||||
print(tx_hash_hex)
|
print(tx_hash_hex)
|
||||||
|
@ -78,18 +78,17 @@ def main():
|
|||||||
c = TokenUniqueSymbolIndex(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
c = TokenUniqueSymbolIndex(signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle, chain_id=chain_id)
|
||||||
(tx_hash_hex, o) = c.constructor(signer_address)
|
(tx_hash_hex, o) = c.constructor(signer_address)
|
||||||
rpc.do(o)
|
rpc.do(o)
|
||||||
o = receipt(tx_hash_hex)
|
if block_last:
|
||||||
r = rpc.do(o)
|
r = rpc.wait(tx_hash_hex)
|
||||||
if r['status'] == 0:
|
if r['status'] == 0:
|
||||||
sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you')
|
sys.stderr.write('EVM revert while deploying contract. Wish I had more to tell you')
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
# TODO: pass through translator for keys (evm tester uses underscore instead of camelcase)
|
# TODO: pass through translator for keys (evm tester uses underscore instead of camelcase)
|
||||||
address = r['contractAddress']
|
address = r['contractAddress']
|
||||||
|
|
||||||
if block_last:
|
|
||||||
rpc.wait(tx_hash_hex)
|
|
||||||
|
|
||||||
print(address)
|
print(address)
|
||||||
|
else:
|
||||||
|
print(tx_hash_hex)
|
||||||
|
|
||||||
sys.exit(0)
|
sys.exit(0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user