From 41b35be9139008bf7486987e9000c3680b302b3d Mon Sep 17 00:00:00 2001 From: lumtis Date: Wed, 24 Jan 2024 23:14:29 -0800 Subject: [PATCH] cli commands --- x/crosschain/client/cli/cli_cctx.go | 22 ++++++++++++++++++++++ x/crosschain/client/cli/tx.go | 1 + 2 files changed, 23 insertions(+) diff --git a/x/crosschain/client/cli/cli_cctx.go b/x/crosschain/client/cli/cli_cctx.go index 8f38c4ebe1..e85712f50e 100644 --- a/x/crosschain/client/cli/cli_cctx.go +++ b/x/crosschain/client/cli/cli_cctx.go @@ -277,3 +277,25 @@ func CmdCCTXOutboundVoter() *cobra.Command { return cmd } + +func CmdAbortStuckCCTX() *cobra.Command { + cmd := &cobra.Command{ + Use: "abort-stuck-cctx [index]", + Short: "abort a stuck CCTX", + Args: cobra.ExactArgs(1), + RunE: func(cmd *cobra.Command, args []string) error { + clientCtx := client.GetClientContextFromCmd(cmd) + + msg := &types.MsgAbortStuckCCTX{ + Creator: clientCtx.GetFromAddress().String(), + CctxIndex: args[0], + } + + return tx.GenerateOrBroadcastTxCLI(clientCtx, cmd.Flags(), msg) + }, + } + + flags.AddTxFlagsToCmd(cmd) + + return cmd +} diff --git a/x/crosschain/client/cli/tx.go b/x/crosschain/client/cli/tx.go index 0fc5e3c302..d8e6b3bc0e 100644 --- a/x/crosschain/client/cli/tx.go +++ b/x/crosschain/client/cli/tx.go @@ -30,6 +30,7 @@ func GetTxCmd() *cobra.Command { CmdUpdateTss(), CmdMigrateTssFunds(), CmdAddToInTxTracker(), + CmdAbortStuckCCTX(), ) return cmd