Skip to content

Commit

Permalink
cli commands
Browse files Browse the repository at this point in the history
  • Loading branch information
lumtis committed Jan 25, 2024
1 parent 4ccff79 commit 41b35be
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions x/crosschain/client/cli/cli_cctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
1 change: 1 addition & 0 deletions x/crosschain/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func GetTxCmd() *cobra.Command {
CmdUpdateTss(),
CmdMigrateTssFunds(),
CmdAddToInTxTracker(),
CmdAbortStuckCCTX(),
)

return cmd
Expand Down

0 comments on commit 41b35be

Please sign in to comment.