Skip to content

Commit

Permalink
refactor: refactor get_l2_bridge_contracts to return IL2SharedBridge
Browse files Browse the repository at this point in the history
  • Loading branch information
petarTxFusion committed Jun 6, 2024
1 parent f37c759 commit 32c5bf6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zksync2/account/wallet_l2.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from zksync2.manage_contracts.utils import (
zksync_abi_default,
nonce_holder_abi_default,
l2_bridge_abi_default,
l2_bridge_abi_default, l2_shared_bridge_abi_default,
)
from zksync2.module.response_types import ZksAccountBalances
from zksync2.signer.eth_signer import PrivateKeyEthSigner
Expand Down Expand Up @@ -74,9 +74,13 @@ def get_l2_bridge_contracts(self) -> L2BridgeContracts:
address=Web3.to_checksum_address(addresses.erc20_l2_default_bridge),
abi=l2_bridge_abi_default(),
),
weth=self._zksync_web3.eth.contract(
address=Web3.to_checksum_address(addresses.weth_bridge_l2),
abi=l2_bridge_abi_default(),
),
shared=self._zksync_web3.eth.contract(
address=Web3.to_checksum_address(addresses.shared_l2_default_bridge),
abi=l2_bridge_abi_default(),
abi=l2_shared_bridge_abi_default(),
),
)

Expand Down
1 change: 1 addition & 0 deletions zksync2/core/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ class L1BridgeContracts:
@dataclass
class L2BridgeContracts:
erc20: Contract
weth: Contract
shared: Contract


Expand Down

0 comments on commit 32c5bf6

Please sign in to comment.