Skip to content

Commit

Permalink
feat: add unbounded-oracle cli in crosschain module (#328)
Browse files Browse the repository at this point in the history
  • Loading branch information
zakir-code authored Apr 11, 2024
1 parent a7b95db commit 3010d6c
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions x/crosschain/client/cli/tx.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ func GetTxSubCmds(chainName string) []*cobra.Command {
CmdUpdateChainOraclesProposal(chainName),

CmdBoundedOracle(chainName),
CmdUnboundedOracle(chainName),
CmdReDelegate(chainName),
CmdAddDelegate(chainName),

Expand Down Expand Up @@ -100,6 +101,26 @@ func CmdBoundedOracle(chainName string) *cobra.Command {
return cmd
}

func CmdUnboundedOracle(chainName string) *cobra.Command {
cmd := &cobra.Command{
Use: "unbounded-oracle",
Short: "Quit the oracle",
Args: cobra.ExactArgs(4),
RunE: func(cmd *cobra.Command, args []string) error {
cliCtx, err := client.GetClientTxContext(cmd)
if err != nil {
return err
}
msg := types.MsgUnbondedOracle{
OracleAddress: cliCtx.GetFromAddress().String(),
ChainName: chainName,
}
return tx.GenerateOrBroadcastTxCLI(cliCtx, cmd.Flags(), &msg)
},
}
return cmd
}

func CmdAddDelegate(chainName string) *cobra.Command {
cmd := &cobra.Command{
Use: "add-delegate [delegate-amount]",
Expand Down

0 comments on commit 3010d6c

Please sign in to comment.