Skip to content

Commit c05bb83

Browse files
authored
Merge pull request #499 from 0xPolygon/jihwan/silence-ulxly-help
refactor: silence help when error returned for ulxly commands
2 parents 2e2cf41 + b5cec7b commit c05bb83

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

cmd/ulxly/ulxly.go

+12-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"encoding/json"
1111
"errors"
1212
"fmt"
13-
"github.com/ethereum/go-ethereum"
1413
"io"
1514
"math/big"
1615
"net/http"
@@ -19,6 +18,8 @@ import (
1918
"strings"
2019
"time"
2120

21+
"github.com/ethereum/go-ethereum"
22+
2223
"github.com/ethereum/go-ethereum/accounts/abi/bind"
2324
"github.com/ethereum/go-ethereum/common"
2425
"github.com/ethereum/go-ethereum/common/hexutil"
@@ -1316,6 +1317,7 @@ func init() {
13161317
RunE: func(cmd *cobra.Command, args []string) error {
13171318
return bridgeAsset(cmd)
13181319
},
1320+
SilenceUsage: true,
13191321
}
13201322
bridgeMessageCommand = &cobra.Command{
13211323
Use: "message",
@@ -1325,6 +1327,7 @@ func init() {
13251327
RunE: func(cmd *cobra.Command, args []string) error {
13261328
return bridgeMessage(cmd)
13271329
},
1330+
SilenceUsage: true,
13281331
}
13291332
bridgeMessageWETHCommand = &cobra.Command{
13301333
Use: "weth",
@@ -1334,6 +1337,7 @@ func init() {
13341337
RunE: func(cmd *cobra.Command, args []string) error {
13351338
return bridgeWETHMessage(cmd)
13361339
},
1340+
SilenceUsage: true,
13371341
}
13381342
claimAssetCommand = &cobra.Command{
13391343
Use: "asset",
@@ -1343,6 +1347,7 @@ func init() {
13431347
RunE: func(cmd *cobra.Command, args []string) error {
13441348
return claimAsset(cmd)
13451349
},
1350+
SilenceUsage: true,
13461351
}
13471352
claimMessageCommand = &cobra.Command{
13481353
Use: "message",
@@ -1352,6 +1357,7 @@ func init() {
13521357
RunE: func(cmd *cobra.Command, args []string) error {
13531358
return claimMessage(cmd)
13541359
},
1360+
SilenceUsage: true,
13551361
}
13561362
claimEverythingCommand = &cobra.Command{
13571363
Use: "claim-everything",
@@ -1360,6 +1366,7 @@ func init() {
13601366
RunE: func(cmd *cobra.Command, args []string) error {
13611367
return claimEverything(cmd)
13621368
},
1369+
SilenceUsage: true,
13631370
}
13641371
emptyProofCommand = &cobra.Command{
13651372
Use: "empty-proof",
@@ -1368,6 +1375,7 @@ func init() {
13681375
RunE: func(cmd *cobra.Command, args []string) error {
13691376
return emptyProof()
13701377
},
1378+
SilenceUsage: true,
13711379
}
13721380
zeroProofCommand = &cobra.Command{
13731381
Use: "zero-proof",
@@ -1381,6 +1389,7 @@ or if it's actually an intermediate hash.`,
13811389
RunE: func(cmd *cobra.Command, args []string) error {
13821390
return zeroProof()
13831391
},
1392+
SilenceUsage: true,
13841393
}
13851394
proofCommand = &cobra.Command{
13861395
Use: "proof",
@@ -1389,6 +1398,7 @@ or if it's actually an intermediate hash.`,
13891398
RunE: func(cmd *cobra.Command, args []string) error {
13901399
return proof(args)
13911400
},
1401+
SilenceUsage: true,
13921402
}
13931403
getDepositCommand = &cobra.Command{
13941404
Use: "get-deposits",
@@ -1397,6 +1407,7 @@ or if it's actually an intermediate hash.`,
13971407
RunE: func(cmd *cobra.Command, args []string) error {
13981408
return readDeposit(cmd)
13991409
},
1410+
SilenceUsage: true,
14001411
}
14011412

14021413
// Arguments for both bridge and claim

0 commit comments

Comments
 (0)