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

@@ -22,7 +22,8 @@ from hexathon import (
)
# local imports
from eth_contract_registry.registry import Registry
from eth_contract_registry import Registry
from eth_contract_registry.registry import ContractRegistry
from eth_contract_registry.encoding import from_identifier_hex
from eth_contract_registry.pytest.fixtures_registry import valid_identifiers
@@ -46,7 +47,7 @@ def test_set(
bogus_hash = add_0x(os.urandom(32).hex())
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)
o = builder.address_of(registry, 'ContractRegistry', sender_address=eth_accounts[0])
r = eth_rpc.do(o)
@@ -65,6 +66,7 @@ def test_set(
rcpt = eth_rpc.do(o)
assert rcpt['status'] == 1
builder = Registry(default_chain_spec)
o = builder.address_of(registry, 'FooContract', sender_address=eth_accounts[0])
r = eth_rpc.do(o)
r = abi_decode_single(ABIContractType.ADDRESS, r)