mirror of
https://github.com/colinear-labs/chain.git
synced 2026-03-05 04:44:25 -08:00
upgrade auction structure ton include denom + no owner in tx
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"cosmos-test/x/cosmostest/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||
@@ -14,13 +15,13 @@ var _ = strconv.Itoa(0)
|
||||
|
||||
func CmdNewAuction() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "new-auction [owner] [name] [description]",
|
||||
Use: "new-auction [name] [description] [denom]",
|
||||
Short: "Broadcast message newAuction",
|
||||
Args: cobra.ExactArgs(3),
|
||||
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||
argOwner := args[0]
|
||||
argName := args[1]
|
||||
argDescription := args[2]
|
||||
argName := args[0]
|
||||
argDescription := args[1]
|
||||
argDenom := args[2]
|
||||
|
||||
clientCtx, err := client.GetClientTxContext(cmd)
|
||||
if err != nil {
|
||||
@@ -29,9 +30,9 @@ func CmdNewAuction() *cobra.Command {
|
||||
|
||||
msg := types.NewMsgNewAuction(
|
||||
clientCtx.GetFromAddress().String(),
|
||||
argOwner,
|
||||
argName,
|
||||
argDescription,
|
||||
argDenom,
|
||||
)
|
||||
if err := msg.ValidateBasic(); err != nil {
|
||||
return err
|
||||
|
||||
@@ -4,6 +4,7 @@ import (
|
||||
"strconv"
|
||||
|
||||
"cosmos-test/x/cosmostest/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
"github.com/cosmos/cosmos-sdk/client/flags"
|
||||
"github.com/cosmos/cosmos-sdk/client/tx"
|
||||
|
||||
Reference in New Issue
Block a user