Commit 99dc9a6b authored by clabby's avatar clabby

Lint

parent 5edc0cfc
...@@ -55,15 +55,19 @@ export const migratedWithdrawalGasLimit = ( ...@@ -55,15 +55,19 @@ export const migratedWithdrawalGasLimit = (
chainID: number chainID: number
): BigNumber => { ): 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)).mul(RELAY_PER_BYTE_DATA_COST) const dataCost = BigNumber.from(hexDataLength(data)).mul(
RELAY_PER_BYTE_DATA_COST
)
let overhead: number let overhead: number
if (chainID === 420) { if (chainID === 420) {
overhead = 200_000 overhead = 200_000
} else { } else {
// Constant overhead // Constant overhead
overhead = RELAY_CONSTANT_OVERHEAD + overhead =
RELAY_CONSTANT_OVERHEAD +
// Dynamic overhead (EIP-150) // Dynamic overhead (EIP-150)
(MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR * 1_000_000) / MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR + (MIN_GAS_DYNAMIC_OVERHEAD_NUMERATOR * 1_000_000) /
MIN_GAS_DYNAMIC_OVERHEAD_DENOMINATOR +
// Gas reserved for the worst-case cost of 3/5 of the `CALL` opcode's dynamic gas // Gas reserved for the worst-case cost of 3/5 of the `CALL` opcode's dynamic gas
// factors. (Conservative) // factors. (Conservative)
RELAY_CALL_OVERHEAD + RELAY_CALL_OVERHEAD +
......
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