diff --git a/x/crosschain/client/cli/cli_cctx.go b/x/crosschain/client/cli/cli_cctx.go index 8191ebb152..8f38c4ebe1 100644 --- a/x/crosschain/client/cli/cli_cctx.go +++ b/x/crosschain/client/cli/cli_cctx.go @@ -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) }, } @@ -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) }, } diff --git a/x/crosschain/client/cli/cli_gas_price.go b/x/crosschain/client/cli/cli_gas_price.go index b16aacf3de..b46897b36c 100644 --- a/x/crosschain/client/cli/cli_gas_price.go +++ b/x/crosschain/client/cli/cli_gas_price.go @@ -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) }, } diff --git a/x/crosschain/client/cli/cli_in_tx_tracker.go b/x/crosschain/client/cli/cli_in_tx_tracker.go index 764127a900..6a3f4bd1c0 100644 --- a/x/crosschain/client/cli/cli_in_tx_tracker.go +++ b/x/crosschain/client/cli/cli_in_tx_tracker.go @@ -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) }, } diff --git a/x/crosschain/client/cli/cli_out_tx_tracker.go b/x/crosschain/client/cli/cli_out_tx_tracker.go index fc87399818..18dc21213f 100644 --- a/x/crosschain/client/cli/cli_out_tx_tracker.go +++ b/x/crosschain/client/cli/cli_out_tx_tracker.go @@ -114,9 +114,7 @@ func CmdAddToWatchList() *cobra.Command { "", -1, ) - if err := msg.ValidateBasic(); err != nil { - return err - } + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) }, } @@ -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) }, } diff --git a/x/crosschain/client/cli/cli_tss.go b/x/crosschain/client/cli/cli_tss.go index 18aefa5e75..f3055bbe81 100644 --- a/x/crosschain/client/cli/cli_tss.go +++ b/x/crosschain/client/cli/cli_tss.go @@ -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) }, } @@ -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) }, } @@ -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) }, } diff --git a/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go b/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go index 2697f7f293..adc638e69f 100644 --- a/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go +++ b/x/fungible/client/cli/tx_deploy_fungible_coin_zrc_4.go @@ -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) }, } diff --git a/x/fungible/client/cli/tx_remove_foreign_coin.go b/x/fungible/client/cli/tx_remove_foreign_coin.go index 00c6a32352..29fdc3612e 100644 --- a/x/fungible/client/cli/tx_remove_foreign_coin.go +++ b/x/fungible/client/cli/tx_remove_foreign_coin.go @@ -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) }, } diff --git a/x/fungible/client/cli/tx_update_zrc20_liquidity_cap.go b/x/fungible/client/cli/tx_update_zrc20_liquidity_cap.go index 8bec27e035..4944e12d81 100644 --- a/x/fungible/client/cli/tx_update_zrc20_liquidity_cap.go +++ b/x/fungible/client/cli/tx_update_zrc20_liquidity_cap.go @@ -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) }, } diff --git a/x/observer/client/cli/tx_add_blame_vote.go b/x/observer/client/cli/tx_add_blame_vote.go index 38b56e68a8..95d3b0d5da 100644 --- a/x/observer/client/cli/tx_add_blame_vote.go +++ b/x/observer/client/cli/tx_add_blame_vote.go @@ -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) }, diff --git a/x/observer/client/cli/tx_add_observer.go b/x/observer/client/cli/tx_add_observer.go index c9d3670180..1e35552725 100644 --- a/x/observer/client/cli/tx_add_observer.go +++ b/x/observer/client/cli/tx_add_observer.go @@ -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) }, } diff --git a/x/observer/client/cli/tx_permission_flags.go b/x/observer/client/cli/tx_permission_flags.go index bad44f32af..71c6304e51 100644 --- a/x/observer/client/cli/tx_permission_flags.go +++ b/x/observer/client/cli/tx_permission_flags.go @@ -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) }, } diff --git a/x/observer/client/cli/tx_update_core_params.go b/x/observer/client/cli/tx_update_core_params.go index e506edeec9..6db2daaca5 100644 --- a/x/observer/client/cli/tx_update_core_params.go +++ b/x/observer/client/cli/tx_update_core_params.go @@ -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) }, } diff --git a/x/observer/client/cli/tx_update_keygen.go b/x/observer/client/cli/tx_update_keygen.go index 776389369c..ac98e03046 100644 --- a/x/observer/client/cli/tx_update_keygen.go +++ b/x/observer/client/cli/tx_update_keygen.go @@ -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) }, } diff --git a/x/observer/client/cli/tx_update_observer.go b/x/observer/client/cli/tx_update_observer.go index 3eddcb9a25..f052106136 100644 --- a/x/observer/client/cli/tx_update_observer.go +++ b/x/observer/client/cli/tx_update_observer.go @@ -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) }, }