Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove ValidateBasic check in cli #1427

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions x/crosschain/client/cli/cli_cctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,7 @@ func CmdCCTXInboundVoter() *cobra.Command {
argsAsset,
uint(argsEventIndex),
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down Expand Up @@ -270,9 +268,7 @@ func CmdCCTXOutboundVoter() *cobra.Command {
outTxNonce,
argsCoinType,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/crosschain/client/cli/cli_gas_price.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ func CmdGasPriceVoter() *cobra.Command {
}

msg := types.NewMsgGasPriceVoter(clientCtx.GetFromAddress().String(), argsChain, argsPrice, argsSupply, argsBlockNumber)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/crosschain/client/cli/cli_in_tx_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ func CmdAddToInTxTracker() *cobra.Command {
argsCoinType,
argTxHash,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
8 changes: 2 additions & 6 deletions x/crosschain/client/cli/cli_out_tx_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ func CmdAddToWatchList() *cobra.Command {
"",
-1,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down Expand Up @@ -151,9 +149,7 @@ func CmdRemoveFromWatchList() *cobra.Command {
argChain,
argNonce,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
12 changes: 3 additions & 9 deletions x/crosschain/client/cli/cli_tss.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ func CmdCreateTSSVoter() *cobra.Command {
}

msg := types.NewMsgCreateTSSVoter(clientCtx.GetFromAddress().String(), argsPubkey, keygenBlock, status)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand All @@ -72,9 +70,7 @@ func CmdUpdateTss() *cobra.Command {
}

msg := types.NewMsgUpdateTssAddress(clientCtx.GetFromAddress().String(), argsPubkey)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand All @@ -101,9 +97,7 @@ func CmdMigrateTssFunds() *cobra.Command {
}

msg := types.NewMsgMigrateTssFunds(clientCtx.GetFromAddress().String(), argsChainID, argsAmount)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ func CmdDeployFungibleCoinZRC4() *cobra.Command {
common.CoinType(argCoinType),
argGasLimit,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/fungible/client/cli/tx_remove_foreign_coin.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ func CmdRemoveForeignCoin() *cobra.Command {
clientCtx.GetFromAddress().String(),
argName,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/fungible/client/cli/tx_update_zrc20_liquidity_cap.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ func CmdUpdateZRC20LiquidityCap() *cobra.Command {
args[0],
newCap,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/observer/client/cli/tx_add_blame_vote.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ func CmdAddBlameVote() *cobra.Command {
}

msg := types.NewMsgAddBlameVoteMsg(clientCtx.GetFromAddress().String(), int64(chainID), blameInfo)
if err := msg.ValidateBasic(); err != nil {
return err
}

println("about to broadcast")
return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
Expand Down
4 changes: 1 addition & 3 deletions x/observer/client/cli/tx_add_observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ func CmdAddObserver() *cobra.Command {
args[1],
addNodeAccountOnly,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/observer/client/cli/tx_permission_flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ func CmdUpdateCrosschainFlags() *cobra.Command {
return err
}
msg := types.NewMsgUpdateCrosschainFlags(clientCtx.GetFromAddress().String(), argIsInboundEnabled, arsIsOutboundEnabled)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/observer/client/cli/tx_update_core_params.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ func CmdUpdateCoreParams() *cobra.Command {
clientCtx.GetFromAddress().String(),
&clientParams,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/observer/client/cli/tx_update_keygen.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ func CmdUpdateKeygen() *cobra.Command {
clientCtx.GetFromAddress().String(),
argBlock,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
4 changes: 1 addition & 3 deletions x/observer/client/cli/tx_update_observer.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ func CmdUpdateObserver() *cobra.Command {
args[1],
updateReason,
)
if err := msg.ValidateBasic(); err != nil {
return err
}

return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg)
},
}
Expand Down
Loading