Commit abd9568b authored by Mark Tyneway's avatar Mark Tyneway

op-chain-ops: fund L1 devnet accounts

This commit uses the deploy config value `fundDevAccounts` to determine
if the standard `test test ...` accounts used by hardhat/foundry
should be prefunded with ether. This makes testing using the
devnet a bit easier.

Note that this code will be removed in the future because it is part
of the devnet where the genesis is prepopulated with the contracts.
It is not tenable to maintain 2 devnets, one with prepopulated genesis
and one with a deployed genesis.
parent c4d25ebc
......@@ -244,6 +244,11 @@ func BuildL1DeveloperGenesis(config *DeployConfig) (*core.Genesis, error) {
return nil, err
}
if config.FundDevAccounts {
FundDevAccounts(stateDB)
SetPrecompileBalances(stateDB)
}
for _, dep := range deployments {
st, err := stateDB.StorageTrie(dep.Address)
if err != nil {
......
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