Commit 51821d8f authored by Mark Tyneway's avatar Mark Tyneway Committed by Kelvin Fichter

contracts: add precompiles to make genesis

The precompiles need to be in the genesis file with 1
wei.
parent 5dde6bc6
---
'@eth-optimism/contracts': patch
---
Update the genesis file creation script to include the precompiles
...@@ -3,7 +3,7 @@ import { ...@@ -3,7 +3,7 @@ import {
computeStorageSlots, computeStorageSlots,
getStorageLayout, getStorageLayout,
} from '@defi-wonderland/smock/dist/src/utils' } from '@defi-wonderland/smock/dist/src/utils'
import { remove0x } from '@eth-optimism/core-utils' import { remove0x, bnToAddress } from '@eth-optimism/core-utils'
/* Internal Imports */ /* Internal Imports */
import { predeploys } from './predeploys' import { predeploys } from './predeploys'
...@@ -92,6 +92,13 @@ export const makeL2GenesisFile = async ( ...@@ -92,6 +92,13 @@ export const makeL2GenesisFile = async (
} }
const dump = {} const dump = {}
// Add the precompiles. Only safe for up to 9
for (let i = 1; i <= 9; i++) {
const addr = bnToAddress(i)
dump[addr] = {
balance: '01',
}
}
for (const predeployName of Object.keys(predeploys)) { for (const predeployName of Object.keys(predeploys)) {
const predeployAddress = predeploys[predeployName] const predeployAddress = predeploys[predeployName]
dump[predeployAddress] = { dump[predeployAddress] = {
......
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