Commit 30b3e984 authored by Joshua Gutow's avatar Joshua Gutow Committed by GitHub

op-chain-ops: Move DA Challenge Proxy Check to the correct location (#10251)

parent 857640a7
...@@ -427,9 +427,6 @@ func (d *DeployConfig) Check() error { ...@@ -427,9 +427,6 @@ func (d *DeployConfig) Check() error {
if d.DAResolveWindow == 0 { if d.DAResolveWindow == 0 {
return fmt.Errorf("%w: DAResolveWindow cannot be 0 when using plasma mode", ErrInvalidDeployConfig) return fmt.Errorf("%w: DAResolveWindow cannot be 0 when using plasma mode", ErrInvalidDeployConfig)
} }
if d.DAChallengeProxy == (common.Address{}) {
return fmt.Errorf("%w: DAChallengeContract cannot be empty when using plasma mode", ErrInvalidDeployConfig)
}
} }
// checkFork checks that fork A is before or at the same time as fork B // checkFork checks that fork A is before or at the same time as fork B
checkFork := func(a, b *hexutil.Uint64, aName, bName string) error { checkFork := func(a, b *hexutil.Uint64, aName, bName string) error {
...@@ -494,6 +491,10 @@ func (d *DeployConfig) CheckAddresses() error { ...@@ -494,6 +491,10 @@ func (d *DeployConfig) CheckAddresses() error {
if d.OptimismPortalProxy == (common.Address{}) { if d.OptimismPortalProxy == (common.Address{}) {
return fmt.Errorf("%w: OptimismPortalProxy cannot be address(0)", ErrInvalidDeployConfig) return fmt.Errorf("%w: OptimismPortalProxy cannot be address(0)", ErrInvalidDeployConfig)
} }
if d.UsePlasma && d.DAChallengeProxy == (common.Address{}) {
return fmt.Errorf("%w: DAChallengeContract cannot be address(0) when using plasma mode", ErrInvalidDeployConfig)
}
return nil return nil
} }
......
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