mirror of
git://holbrook.no/eth-contract-registry
synced 2024-12-22 12:27:31 +01:00
Update runnables with new structure
This commit is contained in:
parent
f939189f8e
commit
a12cdb0ef3
@ -29,7 +29,7 @@ from chainlib.eth.connection import EthHTTPConnection
|
|||||||
from chainlib.eth.tx import receipt
|
from chainlib.eth.tx import receipt
|
||||||
|
|
||||||
# local imports
|
# local imports
|
||||||
from eth_contract_registry import Registry
|
from eth_contract_registry.registry import ContractRegistry
|
||||||
|
|
||||||
logging.basicConfig(level=logging.WARNING)
|
logging.basicConfig(level=logging.WARNING)
|
||||||
logg = logging.getLogger()
|
logg = logging.getLogger()
|
||||||
@ -87,9 +87,9 @@ else:
|
|||||||
|
|
||||||
gas_oracle = None
|
gas_oracle = None
|
||||||
if args.gas_price !=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:
|
else:
|
||||||
gas_oracle = RPCGasOracle(rpc, code_callback=Registry.gas)
|
gas_oracle = RPCGasOracle(rpc, code_callback=ContractRegistry.gas)
|
||||||
|
|
||||||
dummy = args.d
|
dummy = args.d
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ if 'ContractRegistry' not in identifiers:
|
|||||||
logg.debug('adding identifiers {}'.format(identifiers))
|
logg.debug('adding identifiers {}'.format(identifiers))
|
||||||
|
|
||||||
def main():
|
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)
|
(tx_hash_hex, o) = c.constructor(signer_address, identifiers)
|
||||||
if dummy:
|
if dummy:
|
||||||
print(tx_hash_hex)
|
print(tx_hash_hex)
|
||||||
|
@ -30,7 +30,7 @@ from chainlib.eth.tx import receipt
|
|||||||
from chainlib.eth.constant import ZERO_CONTENT
|
from chainlib.eth.constant import ZERO_CONTENT
|
||||||
|
|
||||||
# local imports
|
# local imports
|
||||||
from eth_contract_registry import Registry
|
from eth_contract_registry.registry import ContractRegistry
|
||||||
|
|
||||||
logging.basicConfig(level=logging.WARNING)
|
logging.basicConfig(level=logging.WARNING)
|
||||||
logg = logging.getLogger()
|
logg = logging.getLogger()
|
||||||
@ -90,9 +90,9 @@ else:
|
|||||||
|
|
||||||
gas_oracle = None
|
gas_oracle = None
|
||||||
if args.gas_price !=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:
|
else:
|
||||||
gas_oracle = RPCGasOracle(rpc, code_callback=Registry.gas)
|
gas_oracle = RPCGasOracle(rpc, code_callback=ContractRegistry.gas)
|
||||||
|
|
||||||
dummy = args.d
|
dummy = args.d
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ address = args.address
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
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)
|
(tx_hash_hex, o) = c.set(registry_address, signer_address, identifier, address, chain_spec, ZERO_CONTENT)
|
||||||
if dummy:
|
if dummy:
|
||||||
print(tx_hash_hex)
|
print(tx_hash_hex)
|
||||||
|
BIN
python/gmon.out
BIN
python/gmon.out
Binary file not shown.
Loading…
Reference in New Issue
Block a user