Skip to content

Commit

Permalink
fix fee / gas estimation
Browse files Browse the repository at this point in the history
  • Loading branch information
DZGoldman committed Oct 21, 2021
1 parent 1585a50 commit 14ecce3
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/arb-ts/scripts/deployStandard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ const main = async () => {
}
/* check for required gas */
const gasNeeded = await bridge.estimateGasDeposit(depositParams)

if (gasNeeded.gt(walletBal)) {
const { maxFeePerGas } = await bridge.l1Provider.getFeeData()
const fee = maxFeePerGas.mul(gasNeeded)
if (fee.gt(walletBal)) {
throw new Error(
`An estimated ${utils.formatEther(
gasNeeded
Expand Down

0 comments on commit 14ecce3

Please sign in to comment.