@@ -42,6 +42,7 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() {
42
42
s .Equal (taikoL2 , c .TaikoL2Address .String ())
43
43
s .Equal (taikoToken , c .TaikoTokenAddress .String ())
44
44
s .Equal (goldenTouchAddress , crypto .PubkeyToAddress (c .L1ProposerPrivKey .PublicKey ))
45
+ s .Equal (goldenTouchAddress , c .L2SuggestedFeeRecipient )
45
46
s .Equal (float64 (10 ), c .ProposeInterval .Seconds ())
46
47
s .Equal (1 , len (c .LocalAddresses ))
47
48
s .Equal (goldenTouchAddress , c .LocalAddresses [0 ])
@@ -72,6 +73,7 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContext() {
72
73
"--" + flags .TaikoL2Address .Name , taikoL2 ,
73
74
"--" + flags .TaikoTokenAddress .Name , taikoToken ,
74
75
"--" + flags .L1ProposerPrivKey .Name , encoding .GoldenTouchPrivKey ,
76
+ "--" + flags .L2SuggestedFeeRecipient .Name , goldenTouchAddress .Hex (),
75
77
"--" + flags .ProposeInterval .Name , proposeInterval ,
76
78
"--" + flags .TxPoolLocals .Name , goldenTouchAddress .Hex (),
77
79
"--" + flags .ProposeBlockTxReplacementMultiplier .Name , "5" ,
@@ -99,14 +101,30 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContextPrivKeyErr() {
99
101
}), "invalid L1 proposer private key" )
100
102
}
101
103
104
+ func (s * ProposerTestSuite ) TestNewConfigFromCliContextL2RecipErr () {
105
+ app := s .SetupApp ()
106
+
107
+ s .ErrorContains (app .Run ([]string {
108
+ "TestNewConfigFromCliContextL2RecipErr" ,
109
+ "--" + flags .L1ProposerPrivKey .Name , encoding .GoldenTouchPrivKey ,
110
+ "--" + flags .ProposeInterval .Name , proposeInterval ,
111
+ "--" + flags .ProposeEmptyBlocksInterval .Name , proposeInterval ,
112
+ "--" + flags .L2SuggestedFeeRecipient .Name , "notAnAddress" ,
113
+ }), "invalid L2 suggested fee recipient address" )
114
+ }
115
+
102
116
func (s * ProposerTestSuite ) TestNewConfigFromCliContextTxPoolLocalsErr () {
117
+ goldenTouchAddress , err := s .RPCClient .TaikoL2 .GOLDENTOUCHADDRESS (nil )
118
+ s .Nil (err )
119
+
103
120
app := s .SetupApp ()
104
121
105
122
s .ErrorContains (app .Run ([]string {
106
123
"TestNewConfigFromCliContextTxPoolLocalsErr" ,
107
124
"--" + flags .L1ProposerPrivKey .Name , encoding .GoldenTouchPrivKey ,
108
125
"--" + flags .ProposeInterval .Name , proposeInterval ,
109
126
"--" + flags .ProposeEmptyBlocksInterval .Name , proposeInterval ,
127
+ "--" + flags .L2SuggestedFeeRecipient .Name , goldenTouchAddress .Hex (),
110
128
"--" + flags .TxPoolLocals .Name , "notAnAddress" ,
111
129
}), "invalid account in --txpool.locals" )
112
130
}
@@ -120,6 +138,7 @@ func (s *ProposerTestSuite) TestNewConfigFromCliContextReplMultErr() {
120
138
s .ErrorContains (app .Run ([]string {
121
139
"TestNewConfigFromCliContextReplMultErr" ,
122
140
"--" + flags .L1ProposerPrivKey .Name , encoding .GoldenTouchPrivKey ,
141
+ "--" + flags .L2SuggestedFeeRecipient .Name , goldenTouchAddress .Hex (),
123
142
"--" + flags .ProposeInterval .Name , proposeInterval ,
124
143
"--" + flags .ProposeEmptyBlocksInterval .Name , proposeInterval ,
125
144
"--" + flags .TxPoolLocals .Name , goldenTouchAddress .Hex (),
@@ -136,6 +155,7 @@ func (s *ProposerTestSuite) SetupApp() *cli.App {
136
155
& cli.StringFlag {Name : flags .TaikoL2Address .Name },
137
156
& cli.StringFlag {Name : flags .TaikoTokenAddress .Name },
138
157
& cli.StringFlag {Name : flags .L1ProposerPrivKey .Name },
158
+ & cli.StringFlag {Name : flags .L2SuggestedFeeRecipient .Name },
139
159
& cli.DurationFlag {Name : flags .ProposeEmptyBlocksInterval .Name },
140
160
& cli.DurationFlag {Name : flags .ProposeInterval .Name },
141
161
& cli.StringFlag {Name : flags .TxPoolLocals .Name },
0 commit comments