Commit d2eb8ae0 authored by Mark Tyneway's avatar Mark Tyneway Committed by Kelvin Fichter

deployer: fix import bug

Removes an imported function that was not being imported
correctly in the docker setup. Inline builds the address
and throws an error in the case where the logic is unsafe.
parent 3e6989b7
---
'@eth-optimism/contracts': patch
---
Fix import bug in the state dump generation script
......@@ -5,7 +5,7 @@ import {
computeStorageSlots,
getStorageLayout,
} from '@defi-wonderland/smock/dist/src/utils'
import { remove0x, bnToAddress } from '@eth-optimism/core-utils'
import { remove0x } from '@eth-optimism/core-utils'
/* Internal Imports */
import { predeploys } from './predeploys'
......@@ -96,7 +96,10 @@ export const makeL2GenesisFile = async (
const dump = {}
// Add the precompiles. Only safe for up to 9
for (let i = 1; i <= 9; i++) {
const addr = bnToAddress(i)
const addr = `0x000000000000000000000000000000000000000${i}`
if (addr.length !== 42) {
throw new Error(`Address length incorrect: ${addr.length}`)
}
dump[addr] = {
balance: '01',
}
......
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