diff --git a/boa_zksync/__init__.py b/boa_zksync/__init__.py index 7080dc4..0a6b3f7 100644 --- a/boa_zksync/__init__.py +++ b/boa_zksync/__init__.py @@ -4,7 +4,7 @@ from boa_zksync.contract import ZksyncContract from boa_zksync.environment import ZksyncEnv -from boa_zksync.node import EraTestNode +from boa_zksync.node import AnvilZKsync from boa_zksync.verifiers import ZksyncExplorer @@ -15,7 +15,7 @@ def set_zksync_env(url, explorer_url=None, nickname=None): def set_zksync_test_env(node_args=(), nickname=None): return boa.set_env( - ZksyncEnv(rpc=EraTestNode(node_args=node_args), nickname=nickname) + ZksyncEnv(rpc=AnvilZKsync(node_args=node_args), nickname=nickname) ) diff --git a/boa_zksync/environment.py b/boa_zksync/environment.py index e02acd3..e42e953 100644 --- a/boa_zksync/environment.py +++ b/boa_zksync/environment.py @@ -17,7 +17,7 @@ from requests import HTTPError from boa_zksync.deployer import ZksyncDeployer -from boa_zksync.node import EraTestNode +from boa_zksync.node import AnvilZKsync from boa_zksync.types import ( CONTRACT_DEPLOYER_ADDRESS, DEFAULT_SALT, @@ -66,7 +66,7 @@ def _reset_fork(self, block_identifier="latest"): self._vm = None if ( block_identifier == "latest" - and isinstance(self._rpc, EraTestNode) + and isinstance(self._rpc, AnvilZKsync) and (inner_rpc := self._rpc.inner_rpc) ): del self._rpc # close the old rpc @@ -93,7 +93,7 @@ def fork_rpc( if reset_traces: self.sha3_trace: dict = {} self.sstore_trace: dict = {} - self._rpc = EraTestNode(rpc, block_identifier, **kwargs) + self._rpc = AnvilZKsync(rpc, block_identifier, **kwargs) def register_contract(self, address, obj): addr = Address(address) diff --git a/boa_zksync/node.py b/boa_zksync/node.py index 228e666..eeced91 100644 --- a/boa_zksync/node.py +++ b/boa_zksync/node.py @@ -8,7 +8,7 @@ from boa_zksync.util import find_free_port, stop_subprocess, wait_url -class EraTestNode(EthereumRPC): +class AnvilZKsync(EthereumRPC): # list of public+private keys for test accounts in the anvil-zksync TEST_ACCOUNTS = [ ( diff --git a/tests/conftest.py b/tests/conftest.py index f54f408..d114243 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,7 +6,7 @@ from eth_account import Account import boa_zksync -from boa_zksync import EraTestNode +from boa_zksync import AnvilZKsync from boa_zksync.deployer import ZksyncDeployer STARTING_SUPPLY = 100 @@ -58,7 +58,7 @@ def zksync_sepolia_env(): @pytest.fixture(scope="module") def account(): # default rich account from era_test_node - _public_key, private_key = EraTestNode.TEST_ACCOUNTS[0] + _public_key, private_key = AnvilZKsync.TEST_ACCOUNTS[0] return Account.from_key(private_key) diff --git a/tests/test_sepolia.py b/tests/test_sepolia.py index abe0087..91f70d1 100644 --- a/tests/test_sepolia.py +++ b/tests/test_sepolia.py @@ -3,7 +3,7 @@ from boa.rpc import EthereumRPC import boa_zksync -from boa_zksync import EraTestNode +from boa_zksync import AnvilZKsync from boa_zksync.environment import ZERO_ADDRESS @@ -37,7 +37,7 @@ def set_implementation(_implementation: address): def test_fork_rpc(zksync_sepolia_fork): - assert isinstance(boa.env._rpc, EraTestNode) + assert isinstance(boa.env._rpc, AnvilZKsync) assert isinstance(boa.env._rpc.inner_rpc, EthereumRPC)