Skip to content

Commit

Permalink
refactoring(cmd/state): remove submit-tx from cli (#3348)
Browse files Browse the repository at this point in the history
  • Loading branch information
vgonkivs committed May 9, 2024
1 parent a95003e commit 34fa2ef
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions nodebuilder/state/cmd/state.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package cmd

import (
"encoding/hex"
"fmt"
"strconv"

Expand All @@ -20,7 +19,6 @@ func init() {
balanceCmd,
balanceForAddressCmd,
transferCmd,
submitTxCmd,
cancelUnbondingDelegationCmd,
beginRedelegateCmd,
undelegateCmd,
Expand Down Expand Up @@ -142,29 +140,6 @@ var transferCmd = &cobra.Command{
},
}

var submitTxCmd = &cobra.Command{
Use: "submit-tx [tx]",
Short: "Submits the given transaction/message to the Celestia network and blocks until the tx is included in a block.",
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) error {
client, err := cmdnode.ParseClientFromCtx(cmd.Context())
if err != nil {
return err
}
defer client.Close()

decoded, err := hex.DecodeString(args[0])
if err != nil {
return fmt.Errorf("failed to decode tx: %w", err)
}
txResponse, err := client.State.SubmitTx(
cmd.Context(),
decoded,
)
return cmdnode.PrintOutput(txResponse, err, nil)
},
}

var cancelUnbondingDelegationCmd = &cobra.Command{
Use: "cancel-unbonding-delegation [address] [amount] [height] [fee] [gasLimit]",
Short: "Cancels a user's pending undelegation from a validator.",
Expand Down

0 comments on commit 34fa2ef

Please sign in to comment.