Skip to content

Commit

Permalink
fix(provider): estimateDefaultBridgeDepositL2Gas use `ETH_ADDRESS_I…
Browse files Browse the repository at this point in the history
…N_CONTRACTS` for base token
  • Loading branch information
petarTxFusion committed Oct 7, 2024
1 parent 0af5d86 commit 4116460
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/provider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1134,6 +1134,9 @@ export function JsonRpcApiProvider<
// due to storage slot aggregation, the gas estimation will depend on the address
// and so estimation for the zero address may be smaller than for the sender.
from ??= ethers.Wallet.createRandom().address;
token = isAddressEq(token, LEGACY_ETH_ADDRESS)
? ETH_ADDRESS_IN_CONTRACTS
: token;
if (await this.isBaseToken(token)) {
return await this.estimateL1ToL2Execute({
contractAddress: to,
Expand Down

0 comments on commit 4116460

Please sign in to comment.