Skip to content

Commit 1c1af23

Browse files
chore: Allow op-deployer version overrides for just create-config
1 parent df5d4fe commit 1c1af23

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ check-genesis-integrity: (_run_ops_bin 'check_genesis_integrity')
5050
codegen L1_RPC_URLS SUPERCHAINS="":
5151
@just _run_ops_bin "codegen" "--l1-rpc-urls {{L1_RPC_URLS}} --superchains={{SUPERCHAINS}}"
5252

53-
create-config SHORTNAME FILENAME: build-deployer-binaries
54-
@just _run_ops_bin "create_config" "--shortname {{SHORTNAME}} --state-filename $(realpath {{FILENAME}})"
53+
create-config SHORTNAME FILENAME OPDEPLOYERVERSION="": build-deployer-binaries
54+
@just _run_ops_bin "create_config" "--shortname {{SHORTNAME}} --state-filename $(realpath {{FILENAME}}) --op-deployer-version={{OPDEPLOYERVERSION}}"
5555

5656
import-devnet STATEFILE MANIFESTFILE OPDEPLOYERVERSION="": build-deployer-binaries
5757
@just _run_ops_bin "import_devnet" "--state-filename $(realpath {{STATEFILE}}) --manifest-path $(realpath {{MANIFESTFILE}}) --op-deployer-version={{OPDEPLOYERVERSION}}"

ops/cmd/create_config/main.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ var (
3030
EnvVars: []string{"DEPLOYER_CACHE_DIR"},
3131
Value: defaultBinDir(),
3232
}
33+
OpDeployerVersion = &cli.StringFlag{
34+
Name: "op-deployer-version",
35+
Usage: "Version of the op-deployer binary to use.",
36+
EnvVars: []string{"DEPLOYER_VERSION"},
37+
Value: "",
38+
}
3339
)
3440

3541
func main() {
@@ -40,6 +46,7 @@ func main() {
4046
StateFilename,
4147
Shortname,
4248
OpDeployerBinDir,
49+
OpDeployerVersion,
4350
},
4451
Action: action,
4552
}
@@ -57,11 +64,12 @@ func action(cliCtx *cli.Context) error {
5764

5865
statePath := cliCtx.String(StateFilename.Name)
5966
opDeployerBinDir := cliCtx.String(OpDeployerBinDir.Name)
67+
opDeployerVersion := cliCtx.String(OpDeployerVersion.Name)
6068

6169
output.WriteWarn("⚠️ Config generation behavior has changed: now generates only essential addresses by default.")
6270
output.WriteWarn("📄 All addresses are still available in addresses.json")
6371

64-
err = manage.GenerateChainArtifacts(statePath, wd, cliCtx.String(Shortname.Name), nil, nil, 0, "", opDeployerBinDir)
72+
err = manage.GenerateChainArtifacts(statePath, wd, cliCtx.String(Shortname.Name), nil, nil, 0, opDeployerVersion, opDeployerBinDir)
6573
if err != nil {
6674
return fmt.Errorf("failed to generate chain config: %w", err)
6775
}

0 commit comments

Comments
 (0)