mirror of
https://github.com/colinear-labs/chain.git
synced 2026-03-05 13:04:24 -08:00
basic provider fund locking implementation
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"colinear/x/colinearcore/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||
@@ -14,9 +15,9 @@ var _ = strconv.Itoa(0)
|
||||
|
||||
func CmdLockFunds() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "lock-funds",
|
||||
Use: "lock-funds [amount in uCLR]",
|
||||
Short: "Broadcast message lockFunds",
|
||||
Args: cobra.ExactArgs(0),
|
||||
Args: cobra.ExactArgs(1),
|
||||
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||
|
||||
clientCtx, err := client.GetClientTxContext(cmd)
|
||||
@@ -24,8 +25,11 @@ func CmdLockFunds() *cobra.Command {
|
||||
return err
|
||||
}
|
||||
|
||||
argAmount := args[0]
|
||||
|
||||
msg := types.NewMsgLockFunds(
|
||||
clientCtx.GetFromAddress().String(),
|
||||
argAmount,
|
||||
)
|
||||
if err := msg.ValidateBasic(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user