Separate out interface

This commit is contained in:
nolash
2021-04-30 13:11:22 +02:00
parent 657137efb0
commit f939189f8e
9 changed files with 79 additions and 42 deletions

View File

@@ -11,7 +11,7 @@ from chainlib.eth.tx import receipt
from chainlib.eth.nonce import RPCNonceOracle
# local imports
from eth_contract_registry.registry import Registry
from eth_contract_registry.registry import ContractRegistry
from eth_contract_registry.encoding import to_identifier
#logg = logging.getLogger(__name__)
@@ -45,7 +45,7 @@ def registry(
nonce_oracle = RPCNonceOracle(roles['CONTRACT_DEPLOYER'], eth_rpc)
builder = Registry(default_chain_spec, signer=eth_signer, nonce_oracle=nonce_oracle)
builder = ContractRegistry(default_chain_spec, signer=eth_signer, nonce_oracle=nonce_oracle)
logg.info('registering identifiers {} in contract registry'.format(valid_identifiers))
(tx_hash_hex, o) = builder.constructor(roles['CONTRACT_DEPLOYER'], valid_identifiers)
r = eth_rpc.do(o)
@@ -56,7 +56,7 @@ def registry(
registry_address = rcpt['contract_address']
c = Registry(default_chain_spec, signer=eth_signer, nonce_oracle=nonce_oracle)
c = ContractRegistry(default_chain_spec, signer=eth_signer, nonce_oracle=nonce_oracle)
chain_spec_identifier = to_identifier(str(default_chain_spec))