Commit 042433b8 authored by Matthew Slipper's avatar Matthew Slipper Committed by GitHub

op-deployer: Fix invalid intent panic in SR command (#13006)

parent 240d0f84
...@@ -28,6 +28,10 @@ func SuperchainRegistryCLI(cliCtx *cli.Context) error { ...@@ -28,6 +28,10 @@ func SuperchainRegistryCLI(cliCtx *cli.Context) error {
return fmt.Errorf("failed to read intent: %w", err) return fmt.Errorf("failed to read intent: %w", err)
} }
if err := globalIntent.Check(); err != nil {
return fmt.Errorf("intent check failed: %w", err)
}
envVars := map[string]string{} envVars := map[string]string{}
envVars["SCR_CHAIN_NAME"] = "" envVars["SCR_CHAIN_NAME"] = ""
envVars["SCR_CHAIN_SHORT_NAME"] = "" envVars["SCR_CHAIN_SHORT_NAME"] = ""
......
package state package state
import ( import (
"errors"
"fmt" "fmt"
"math/big" "math/big"
...@@ -67,11 +68,11 @@ func (c *Intent) Check() error { ...@@ -67,11 +68,11 @@ func (c *Intent) Check() error {
} }
if c.L1ContractsLocator == nil { if c.L1ContractsLocator == nil {
c.L1ContractsLocator = artifacts.DefaultL1ContractsLocator return errors.New("l1ContractsLocator must be set")
} }
if c.L2ContractsLocator == nil { if c.L2ContractsLocator == nil {
c.L2ContractsLocator = artifacts.DefaultL2ContractsLocator return errors.New("l2ContractsLocator must be set")
} }
var err error var err error
......
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