Skip to content

Commit

Permalink
introduce boolean switch for using legacy deployments format
Browse files Browse the repository at this point in the history
  • Loading branch information
geoknee committed Aug 22, 2024
1 parent 96b1810 commit 11982b8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
8 changes: 6 additions & 2 deletions validation/genesis/genesis-predeploy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,15 @@ func testGenesisPredeploys(t *testing.T, chain *ChainConfig) {
if err != nil {
log.Fatalf("Failed to create directory: %v", err)
}
err = writeDeployments(chainId, path.Join(contractsDir, "deployments", chainIdString))

if vis.UseLegacyDeploymentsFormat {
err = writeDeploymentsLegacy(chainId, path.Join(contractsDir, "deployments", chainIdString))
} else {
err = writeDeployments(chainId, path.Join(contractsDir, "deployments", chainIdString))
}
if err != nil {
log.Fatalf("Failed to write deployments: %v", err)
}
// writeDeploymentsLegacy(chainId, path.Join(contractsDir, "deployments", chainIdString))

// regenerate genesis.json at this monorepo commit.
executeCommandInDir(t, thisDir, exec.Command("cp", "./monorepo-outputs.sh", monorepoDir))
Expand Down
7 changes: 4 additions & 3 deletions validation/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ func init() {
}

type ValidationMetadata struct {
GenesisCreationCommit string `toml:"genesis_creation_commit"` // in https://github.com/ethereum-optimism/optimism/
MonorepoBuildCommand string `toml:"monorepo_build_command"`
GenesisCreationCommand string `toml:"genesis_creation_command"`
GenesisCreationCommit string `toml:"genesis_creation_commit"` // in https://github.com/ethereum-optimism/optimism/
UseLegacyDeploymentsFormat bool `toml:"use_legacy_deployments_format"`
MonorepoBuildCommand string `toml:"monorepo_build_command"`
GenesisCreationCommand string `toml:"genesis_creation_command"`
}

0 comments on commit 11982b8

Please sign in to comment.