upgrade auction structure ton include denom + no owner in tx

This commit is contained in:
2022-09-01 04:49:24 +00:00
parent 9727e246ee
commit ed2061213e
9 changed files with 227 additions and 98 deletions

View File

@@ -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

View File

@@ -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"