Skip to content

Commit

Permalink
fix mantle pvg calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
mouseless0x committed Feb 7, 2025
1 parent 835031c commit a5fb7fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/validation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,10 @@ export async function calcMantlePreVerificationGas(
(rollupDataGasAndOverhead * l1GasPrice * tokenRatio * scalar) /
mantleL1RollUpFeeDivisionFactor

const l2MaxFee = BigInt(op.maxFeePerGas)
const maxFeePerGas = await (verify
? gasPriceManager.getHighestMaxFeePerGas()
: gasPriceManager.getGasPrice().then((res) => res.maxFeePerGas))
const l2MaxFee = BigInt(maxFeePerGas)

return staticFee + l1RollupFee / l2MaxFee
}
Expand Down

0 comments on commit a5fb7fa

Please sign in to comment.