Skip to content

Commit

Permalink
fix(wallet): use l2BridgeAddress in `_get_l2_gas_limit_from_custom_…
Browse files Browse the repository at this point in the history
…bridge`
  • Loading branch information
petarTxFusion committed Jun 10, 2024
1 parent 924444f commit 8972889
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zksync2/account/wallet_l1.py
Original file line number Diff line number Diff line change
Expand Up @@ -834,11 +834,11 @@ def _get_l2_gas_limit_from_custom_bridge(self, transaction: DepositTransaction):
if transaction.options.chain_id is None:
transaction.options.chain_id = self._eth_web3.eth.chain_id

l2_address = bridge.functions.l2TokenAddress(transaction.token).call()
l2_bridge_address = bridge.functions.l2BridgeAddress(transaction.options.chain_id).call()

return self.estimate_custom_bridge_deposit_l2_gas(
transaction.bridge_address,
l2_address,
l2_bridge_address,
transaction.token,
transaction.amount,
transaction.to,
Expand Down

0 comments on commit 8972889

Please sign in to comment.