mirror of
https://github.com/colinear-labs/chain.git
synced 2026-03-05 14:54:27 -08:00
factor verified providers into bidding tx flow
This commit is contained in:
@@ -3,6 +3,7 @@ package cli
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"colinear/x/colinearcore/auctionconfig"
|
||||
"colinear/x/colinearcore/types"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
@@ -15,9 +16,10 @@ var _ = strconv.Itoa(0)
|
||||
|
||||
func CmdNewAuction() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "new-auction [name] [description] [ceiling] [denom] [end date]",
|
||||
Use: "new-auction [name] [description] [ceiling] [denom] [end date] [verified providers (separated by spaces)...]",
|
||||
Short: "Broadcast message newAuction",
|
||||
Args: cobra.ExactArgs(5),
|
||||
// Args: cobra.ExactArgs(5),
|
||||
Args: cobra.RangeArgs(5, auctionconfig.MaxVerifiedProviders+5),
|
||||
RunE: func(cmd *cobra.Command, args []string) (err error) {
|
||||
argName := args[0]
|
||||
argDescription := args[1]
|
||||
@@ -25,6 +27,12 @@ func CmdNewAuction() *cobra.Command {
|
||||
argDenom := args[3]
|
||||
argLeaseEnd := args[4]
|
||||
|
||||
verifiedProviders := []string{}
|
||||
if len(args) >= 6 {
|
||||
// set to remaining arguments
|
||||
verifiedProviders = args[5:]
|
||||
}
|
||||
|
||||
clientCtx, err := client.GetClientTxContext(cmd)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -43,6 +51,7 @@ func CmdNewAuction() *cobra.Command {
|
||||
argCeiling,
|
||||
argDenom,
|
||||
uint64(le),
|
||||
verifiedProviders,
|
||||
)
|
||||
if err := msg.ValidateBasic(); err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user