Update runnables with new structure

This commit is contained in:
nolash 2021-04-30 13:17:19 +02:00
parent f939189f8e
commit a12cdb0ef3
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 8 additions and 8 deletions

View File

@ -29,7 +29,7 @@ from chainlib.eth.connection import EthHTTPConnection
from chainlib.eth.tx import receipt
# local imports
from eth_contract_registry import Registry
from eth_contract_registry.registry import ContractRegistry
logging.basicConfig(level=logging.WARNING)
logg = logging.getLogger()
@ -87,9 +87,9 @@ else:
gas_oracle = None
if args.gas_price !=None:
gas_oracle = OverrideGasOracle(price=args.gas_price, conn=rpc, code_callback=Registry.gas)
gas_oracle = OverrideGasOracle(price=args.gas_price, conn=rpc, code_callback=ContractRegistry.gas)
else:
gas_oracle = RPCGasOracle(rpc, code_callback=Registry.gas)
gas_oracle = RPCGasOracle(rpc, code_callback=ContractRegistry.gas)
dummy = args.d
@ -99,7 +99,7 @@ if 'ContractRegistry' not in identifiers:
logg.debug('adding identifiers {}'.format(identifiers))
def main():
c = Registry(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle)
c = ContractRegistry(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle)
(tx_hash_hex, o) = c.constructor(signer_address, identifiers)
if dummy:
print(tx_hash_hex)

View File

@ -30,7 +30,7 @@ from chainlib.eth.tx import receipt
from chainlib.eth.constant import ZERO_CONTENT
# local imports
from eth_contract_registry import Registry
from eth_contract_registry.registry import ContractRegistry
logging.basicConfig(level=logging.WARNING)
logg = logging.getLogger()
@ -90,9 +90,9 @@ else:
gas_oracle = None
if args.gas_price !=None:
gas_oracle = OverrideGasOracle(price=args.gas_price, conn=rpc, code_callback=Registry.gas)
gas_oracle = OverrideGasOracle(price=args.gas_price, conn=rpc, code_callback=ContractRegistry.gas)
else:
gas_oracle = RPCGasOracle(rpc, code_callback=Registry.gas)
gas_oracle = RPCGasOracle(rpc, code_callback=ContractRegistry.gas)
dummy = args.d
@ -104,7 +104,7 @@ address = args.address
def main():
c = Registry(chain_spec, signer=signer, gas_oracle=gas_oracle, nonce_oracle=nonce_oracle)
c = ContractRegistry(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)
if dummy:
print(tx_hash_hex)

Binary file not shown.