mirror of
git://holbrook.no/eth-contract-registry
synced 2024-12-22 12:27:31 +01:00
Update nonce, gas oracle naming
This commit is contained in:
parent
2b3575f5a3
commit
6ffcaec8e9
@ -8,7 +8,7 @@ from hexathon import add_0x
|
|||||||
import pytest
|
import pytest
|
||||||
from chainlib.connection import RPCConnection
|
from chainlib.connection import RPCConnection
|
||||||
from chainlib.eth.tx import receipt
|
from chainlib.eth.tx import receipt
|
||||||
from chainlib.eth.nonce import NodeNonceOracle
|
from chainlib.eth.nonce import RPCNonceOracle
|
||||||
|
|
||||||
# local imports
|
# local imports
|
||||||
from contract_registry.registry import Registry
|
from contract_registry.registry import Registry
|
||||||
@ -40,7 +40,7 @@ def registry(
|
|||||||
roles,
|
roles,
|
||||||
):
|
):
|
||||||
|
|
||||||
nonce_oracle = NodeNonceOracle(roles['CONTRACT_DEPLOYER'], eth_rpc)
|
nonce_oracle = RPCNonceOracle(roles['CONTRACT_DEPLOYER'], eth_rpc)
|
||||||
|
|
||||||
builder = Registry(signer=eth_signer, nonce_oracle=nonce_oracle)
|
builder = Registry(signer=eth_signer, nonce_oracle=nonce_oracle)
|
||||||
(tx_hash_hex, o) = builder.constructor(roles['CONTRACT_DEPLOYER'], valid_identifiers)
|
(tx_hash_hex, o) = builder.constructor(roles['CONTRACT_DEPLOYER'], valid_identifiers)
|
||||||
|
@ -14,7 +14,7 @@ from chainlib.eth.contract import (
|
|||||||
ABIContractType,
|
ABIContractType,
|
||||||
abi_decode_single,
|
abi_decode_single,
|
||||||
)
|
)
|
||||||
from chainlib.eth.nonce import NodeNonceOracle
|
from chainlib.eth.nonce import RPCNonceOracle
|
||||||
from chainlib.eth.address import to_checksum_address
|
from chainlib.eth.address import to_checksum_address
|
||||||
from hexathon import (
|
from hexathon import (
|
||||||
add_0x,
|
add_0x,
|
||||||
@ -44,7 +44,7 @@ def test_set(
|
|||||||
bogus_hash = add_0x(os.urandom(32).hex())
|
bogus_hash = add_0x(os.urandom(32).hex())
|
||||||
|
|
||||||
#conn = RPCConnection.connect('default')
|
#conn = RPCConnection.connect('default')
|
||||||
nonce_oracle = NodeNonceOracle(eth_accounts[0], eth_rpc)
|
nonce_oracle = RPCNonceOracle(eth_accounts[0], eth_rpc)
|
||||||
builder = Registry(signer=eth_signer, nonce_oracle=nonce_oracle)
|
builder = Registry(signer=eth_signer, nonce_oracle=nonce_oracle)
|
||||||
(tx_hash_hex, o) = builder.set(registry, eth_accounts[0], 'ContractRegistry', addr_registry, bogus_hash, bogus_hash)
|
(tx_hash_hex, o) = builder.set(registry, eth_accounts[0], 'ContractRegistry', addr_registry, bogus_hash, bogus_hash)
|
||||||
r = eth_rpc.do(o)
|
r = eth_rpc.do(o)
|
||||||
|
Loading…
Reference in New Issue
Block a user