Skip to content

Commit f627a6a

Browse files
committed
fix: rename flag names
1 parent 68662d8 commit f627a6a

File tree

13 files changed

+27
-27
lines changed

13 files changed

+27
-27
lines changed

cmd/cdk/cdk.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ func mustPrintLogs(logs []types.Log, contractInstance reflect.Value, contractABI
635635
func init() {
636636
// cdk
637637
f := CDKCmd.PersistentFlags()
638-
f.StringVar(&cdkInputArgs.rpcURL, flag.FlagRPCURL, flag.DefaultRPCURL, "RPC URL of network containing CDK contracts")
638+
f.StringVar(&cdkInputArgs.rpcURL, flag.RPCURL, flag.DefaultRPCURL, "RPC URL of network containing CDK contracts")
639639
f.StringVar(&cdkInputArgs.forkID, ArgForkID, defaultForkId, "fork ID of CDK networks")
640640
f.StringVar(&cdkInputArgs.rollupManagerAddress, ArgRollupManagerAddress, "", "address of rollup contract")
641641

@@ -677,5 +677,5 @@ func init() {
677677
gerCmd.AddCommand(gerMonitorCmd)
678678

679679
// Mark required flags
680-
flag.MarkPersistentFlagRequired(CDKCmd, flag.FlagRPCURL)
680+
flag.MarkPersistentFlagRequired(CDKCmd, flag.RPCURL)
681681
}

cmd/contract/cmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@ func fetchContractCreationTx(ctx context.Context, client *ethclient.Client, cont
171171

172172
func init() {
173173
f := Cmd.Flags()
174-
f.StringVar(&inputArgs.rpcURL, flag.FlagRPCURL, flag.DefaultRPCURL, "RPC URL of network containing contract")
174+
f.StringVar(&inputArgs.rpcURL, flag.RPCURL, flag.DefaultRPCURL, "RPC URL of network containing contract")
175175
f.StringVar(&inputArgs.address, ArgAddress, "", "contract address")
176176

177177
// Mark required flags
178178
flag.MarkFlagRequired(Cmd, ArgAddress)
179-
flag.MarkFlagRequired(Cmd, flag.FlagRPCURL)
179+
flag.MarkFlagRequired(Cmd, flag.RPCURL)
180180
}

cmd/dumpblocks/dumpblocks.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func init() {
196196
f.StringVarP(&inputDumpblocks.FilterStr, "filter", "F", "{}", "filter output based on tx to and from, not setting a filter means all are allowed")
197197

198198
// Mark required flags
199-
flag.MarkFlagRequired(DumpblocksCmd, flag.FlagRPCURL)
199+
flag.MarkFlagRequired(DumpblocksCmd, flag.RPCURL)
200200
}
201201

202202
// writeResponses writes the data to either stdout or a file if one is provided.

cmd/ecrecover/ecrecover.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,5 +137,5 @@ func init() {
137137
EcRecoverCmd.MarkFlagsMutuallyExclusive("file", "block-number", "tx")
138138

139139
// Mark required flags
140-
flag.MarkFlagRequired(EcRecoverCmd, flag.FlagRPCURL)
140+
flag.MarkFlagRequired(EcRecoverCmd, flag.RPCURL)
141141
}

cmd/fixnoncegap/fixnoncegap.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,14 @@ func fixNonceGap(cmd *cobra.Command, args []string) error {
227227

228228
func init() {
229229
f := FixNonceGapCmd.Flags()
230-
f.StringVarP(&inputFixNonceGapArgs.rpcURL, flag.FlagRPCURL, "r", "http://localhost:8545", "the RPC endpoint URL")
231-
f.StringVar(&inputFixNonceGapArgs.privateKey, flag.FlagPrivateKey, "", "private key to be used when sending txs to fix nonce gap")
230+
f.StringVarP(&inputFixNonceGapArgs.rpcURL, flag.RPCURL, "r", "http://localhost:8545", "the RPC endpoint URL")
231+
f.StringVar(&inputFixNonceGapArgs.privateKey, flag.PrivateKey, "", "private key to be used when sending txs to fix nonce gap")
232232
f.BoolVar(&inputFixNonceGapArgs.replace, ArgReplace, false, "replace the existing txs in the pool")
233233
f.Uint64Var(&inputFixNonceGapArgs.maxNonce, ArgMaxNonce, 0, "override max nonce value instead of getting it from the pool")
234234

235235
// Mark required flags
236-
flag.MarkFlagRequired(FixNonceGapCmd, flag.FlagRPCURL)
237-
flag.MarkFlagRequired(FixNonceGapCmd, flag.FlagPrivateKey)
236+
flag.MarkFlagRequired(FixNonceGapCmd, flag.RPCURL)
237+
flag.MarkFlagRequired(FixNonceGapCmd, flag.PrivateKey)
238238
}
239239

240240
// Wait for the transaction to be mined

cmd/fund/cmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ func init() {
9090
FundCmd.MarkFlagsOneRequired("addresses", "key-file", "number")
9191

9292
// Mark required flags
93-
flag.MarkFlagRequired(FundCmd, flag.FlagRPCURL)
94-
flag.MarkFlagRequired(FundCmd, flag.FlagPrivateKey)
93+
flag.MarkFlagRequired(FundCmd, flag.RPCURL)
94+
flag.MarkFlagRequired(FundCmd, flag.PrivateKey)
9595

9696
// Funder contract parameters.
9797
f.StringVar(&params.FunderAddress, "contract-address", "", "address of pre-deployed Funder contract")

cmd/loadtest/app.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ v3, uniswapv3 - perform UniswapV3 swaps`)
304304
// TODO Compression
305305

306306
// Mark required flags
307-
flag.MarkPersistentFlagRequired(LoadtestCmd, flag.FlagRPCURL)
308-
flag.MarkPersistentFlagRequired(LoadtestCmd, flag.FlagPrivateKey)
307+
flag.MarkPersistentFlagRequired(LoadtestCmd, flag.RPCURL)
308+
flag.MarkPersistentFlagRequired(LoadtestCmd, flag.PrivateKey)
309309
}
310310

311311
func initSubCommands() {

cmd/monitor/cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ func init() {
9090
f.StringVarP(&intervalStr, "interval", "i", "5s", "amount of time between batch block RPC calls")
9191

9292
// Mark required flags
93-
flag.MarkFlagRequired(MonitorCmd, flag.FlagRPCURL)
93+
flag.MarkFlagRequired(MonitorCmd, flag.RPCURL)
9494
}
9595

9696
func checkFlags() (err error) {

cmd/nodekey/nodekey.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,5 +301,5 @@ func init() {
301301
f.BoolVarP(&inputNodeKeyMarshalProtobuf, "marshal-protobuf", "m", false, "marshal libp2p key to protobuf format instead of raw")
302302

303303
// Mark required flags
304-
flag.MarkFlagRequired(NodekeyCmd, flag.FlagPrivateKey)
304+
flag.MarkFlagRequired(NodekeyCmd, flag.PrivateKey)
305305
}

cmd/publish/publish.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,12 @@ func publish(cmd *cobra.Command, args []string) error {
138138

139139
func init() {
140140
f := Cmd.Flags()
141-
f.StringVar(&publishInputArgs.rpcURL, flag.FlagRPCURL, flag.DefaultRPCURL, "RPC URL of network")
141+
f.StringVar(&publishInputArgs.rpcURL, flag.RPCURL, flag.DefaultRPCURL, "RPC URL of network")
142142
f.Uint64VarP(&publishInputArgs.concurrency, "concurrency", "c", 1, "number of txs to send concurrently (default: one at a time)")
143143
f.Uint64Var(&publishInputArgs.jobQueueSize, "job-queue-size", 100, "number of jobs we can put in the job queue for workers to process")
144144
f.StringVar(&publishInputArgs.inputFileName, "file", "", "provide a filename with transactions to publish")
145145
f.Uint64Var(&publishInputArgs.rateLimit, "rate-limit", 0, "rate limit in txs per second (default: no limit)")
146146

147147
// Mark required flags
148-
flag.MarkFlagRequired(Cmd, flag.FlagRPCURL)
148+
flag.MarkFlagRequired(Cmd, flag.RPCURL)
149149
}

0 commit comments

Comments
 (0)