Commit a46cc616 authored by Sam Stokes's avatar Sam Stokes Committed by GitHub

op-deployer: fix nil dereference of SuperchainRoles (#13178)

parent 622fb352
......@@ -98,6 +98,9 @@ func (c *Intent) validateCustomConfig() error {
return ErrL2ContractsLocatorUndefined
}
if c.SuperchainRoles == nil {
return errors.New("SuperchainRoles is set to nil")
}
if err := c.SuperchainRoles.CheckNoZeroAddresses(); err != nil {
return err
}
......@@ -149,7 +152,7 @@ func (c *Intent) validateStandardValues() error {
if err != nil {
return fmt.Errorf("error getting standard superchain roles: %w", err)
}
if *c.SuperchainRoles != *standardSuperchainRoles {
if c.SuperchainRoles == nil || *c.SuperchainRoles != *standardSuperchainRoles {
return fmt.Errorf("SuperchainRoles does not match standard value")
}
......
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