Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSchiavini committed Jun 11, 2024
1 parent 7332ad8 commit 6626000
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
1 change: 0 additions & 1 deletion boa_zksync/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import boa

from boa_zksync.deployer import ZksyncDeployer
from boa_zksync.environment import ZksyncEnv
from boa_zksync.node import EraTestNode

Expand Down
7 changes: 6 additions & 1 deletion boa_zksync/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class ZksyncEnv(NetworkEnv):
An implementation of the Env class for zkSync environments.
This is a mix-in so the logic may be reused in both network and browser modes.
"""

deployer_class = ZksyncDeployer

def __init__(self, rpc: str | RPC, *args, **kwargs):
Expand All @@ -57,7 +58,11 @@ def vm(self):

def _reset_fork(self, block_identifier="latest"):
self._vm = None
if block_identifier == "latest" and isinstance(self._rpc, EraTestNode) and (inner_rpc := self._rpc.inner_rpc):
if (
block_identifier == "latest"
and isinstance(self._rpc, EraTestNode)
and (inner_rpc := self._rpc.inner_rpc)
):
del self._rpc # close the old rpc
self._rpc = inner_rpc

Expand Down
4 changes: 3 additions & 1 deletion boa_zksync/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,9 @@ def global_ctx(self):

@cached_property
def vyper(self) -> CompilerData:
return compiler_data(self.source_code, self.contract_name, VyperDeployer, settings=self.settings)
return compiler_data(
self.source_code, self.contract_name, VyperDeployer, settings=self.settings
)

@cached_property
def settings(self):
Expand Down
6 changes: 5 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ def zksync_env(account):
def zksync_sepolia_fork(account):
old_env = boa.env
fork_url = os.getenv("FORK_URL", "https://sepolia.era.zksync.dev")
boa_zksync.set_zksync_fork(fork_url, block_identifier=1689570, node_args=("--show-calls", "all", "--show-outputs"))
boa_zksync.set_zksync_fork(
fork_url,
block_identifier=1689570,
node_args=("--show-calls", "all", "--show-outputs"),
)
boa.env.add_account(account, force_eoa=True)
yield boa.env
boa.set_env(old_env)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_fork.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def set_implementation(_implementation: address):
"""
c = boa.loads(code)
assert c.implementation() == ZERO_ADDRESS
boa.env.set_balance(boa.env.eoa, 10 ** 20)
boa.env.set_balance(boa.env.eoa, 10**20)
c.set_implementation(c.address)
assert c.implementation() == c.address

Expand Down

0 comments on commit 6626000

Please sign in to comment.