From 6e98522f7082469554a551bc282b54587f2323b3 Mon Sep 17 00:00:00 2001 From: zhiqiangxu <652732310@qq.com> Date: Tue, 14 May 2024 16:10:26 +0800 Subject: [PATCH] check either DGFAddress or L2OOAddress was provided (#10528) --- op-proposer/proposer/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/op-proposer/proposer/config.go b/op-proposer/proposer/config.go index f7ff62154973..8786da0c0daa 100644 --- a/op-proposer/proposer/config.go +++ b/op-proposer/proposer/config.go @@ -77,6 +77,9 @@ func (c *CLIConfig) Check() error { return err } + if c.DGFAddress == "" && c.L2OOAddress == "" { + return errors.New("neither the `DisputeGameFactory` nor `L2OutputOracle` address was provided") + } if c.DGFAddress != "" && c.L2OOAddress != "" { return errors.New("both the `DisputeGameFactory` and `L2OutputOracle` addresses were provided") }