Skip to content

Commit

Permalink
todo
Browse files Browse the repository at this point in the history
  • Loading branch information
protolambda committed Apr 10, 2024
1 parent 6678d06 commit 5d4bcaa
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/contracts-bedrock/scripts/L2Genesis.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,14 @@ contract L2Genesis is Deployer {
setPredeployProxies();
setPredeployImplementations();

// TODO: preinstalls
// TODO: apply upgrade-txs

if (cfg.fundDevAccounts()) {
fundDevAccounts();
}

writeStateDump();
writeGenesisAllocs();
}

/// @notice Give all of the precompiles 1 wei
Expand Down Expand Up @@ -152,6 +155,7 @@ contract L2Genesis is Deployer {
/// sets the deployed bytecode at their expected predeploy address.
/// LEGACY_ERC20_ETH and L1_MESSAGE_SENDER are deprecated and are not set.
function setPredeployImplementations() internal {
// TODO: sort by address, is this order dependent?
setL2ToL1MessagePasser();
setL2CrossDomainMessenger();
setL2StandardBridge();
Expand All @@ -170,6 +174,7 @@ contract L2Genesis is Deployer {
setGovernanceToken();
setSchemaRegistry();
setEAS();
// TODO: ProxyAdmin predeploy is missing
}

function setL2ToL1MessagePasser() public {
Expand Down Expand Up @@ -434,8 +439,8 @@ contract L2Genesis is Deployer {
return impl;
}

/// @notice Writes the state dump to disk
function writeStateDump() public {
/// @notice Writes the genesis allocs, i.e. the state dump, to disk
function writeGenesisAllocs() public {
/// Reset so its not included state dump
vm.etch(address(cfg), "");
vm.etch(msg.sender, "");
Expand Down

0 comments on commit 5d4bcaa

Please sign in to comment.