Commit 83187b02 authored by Mark Tyneway's avatar Mark Tyneway

sdk: fix gas calculation

parent 2d3424e1
...@@ -27,7 +27,7 @@ export const hashLowLevelMessage = (message: LowLevelMessage): string => { ...@@ -27,7 +27,7 @@ export const hashLowLevelMessage = (message: LowLevelMessage): string => {
*/ */
export const migratedWithdrawalGasLimit = (data: string): BigNumber => { export const migratedWithdrawalGasLimit = (data: string): BigNumber => {
// Compute the gas limit and cap at 25 million // Compute the gas limit and cap at 25 million
const dataCost = BigNumber.from(hexDataLength(data)) const dataCost = BigNumber.from(hexDataLength(data)).mul(16)
let minGasLimit = dataCost.add(200_000) let minGasLimit = dataCost.add(200_000)
if (minGasLimit.gt(25_000_000)) { if (minGasLimit.gt(25_000_000)) {
minGasLimit = BigNumber.from(25_000_000) minGasLimit = BigNumber.from(25_000_000)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment