cli

package
v1.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagAcceptingCommitments = "accepting-commitments"
	FlagAcceptingOrders      = "accepting-orders"
	FlagAccessGrants         = "access-grants"
	FlagAccount              = "account"
	FlagAdmin                = "admin"
	FlagAfter                = "after"
	FlagAllowUserSettle      = "allow-user-settle"
	FlagAmount               = "amount"
	FlagAsk                  = "ask"
	FlagAskAdd               = "ask-add"
	FlagAskRemove            = "ask-remove"
	FlagAsks                 = "asks"
	FlagAssets               = "assets"
	FlagAuthority            = "authority"
	FlagBid                  = "bid"
	FlagBidAdd               = "bid-add"
	FlagBidRemove            = "bid-remove"
	FlagBids                 = "bids"
	FlagBips                 = "bips"
	FlagBuyer                = "buyer"
	FlagBuyerFlat            = "buyer-flat"
	FlagBuyerFlatAdd         = "buyer-flat-add"
	FlagBuyerFlatRemove      = "buyer-flat-remove"
	FlagBuyerRatios          = "buyer-ratios"
	FlagBuyerRatiosAdd       = "buyer-ratios-add"
	FlagBuyerRatiosRemove    = "buyer-ratios-remove"
	FlagCommitmentAdd        = "commitment-add"
	FlagCommitmentRemove     = "commitment-remove"
	FlagCreateAsk            = "create-ask"
	FlagCreateBid            = "create-bid"
	FlagCreateCommitment     = "create-commitment"
	FlagCreationFee          = "creation-fee"
	FlagDefault              = "default"
	FlagDenom                = "denom"
	FlagDescription          = "description"
	FlagDetails              = "details"
	FlagDisable              = "disable"
	FlagEnable               = "enable"
	FlagEmptyExternalID      = "empty-external-id"
	FlagExternalID           = "external-id"
	FlagExternalIDs          = "external-ids"
	FlagFile                 = "file"
	FlagGrant                = "grant"
	FlagIcon                 = "icon"
	FlagInputs               = "inputs"
	FlagMarket               = "market"
	FlagName                 = "name"
	FlagNavs                 = "navs"
	FlagNewTarget            = "new-target"
	FlagOrder                = "order"
	FlagOutputs              = "outputs"
	FlagOwner                = "owner"
	FlagPartial              = "partial"
	FlagPrice                = "price"
	FlagProposal             = "proposal"
	FlagRelease              = "release"
	FlagReleaseAll           = "release-all"
	FlagReqAttrAsk           = "req-attr-ask"
	FlagReqAttrBid           = "req-attr-bid"
	FlagReqAttrCommitment    = "req-attr-commitment"
	FlagRevoke               = "revoke"
	FlagRevokeAll            = "revoke-all"
	FlagSeller               = "seller"
	FlagSellerFlat           = "seller-flat"
	FlagSellerFlatAdd        = "seller-flat-add"
	FlagSellerFlatRemove     = "seller-flat-remove"
	FlagSellerRatios         = "seller-ratios"
	FlagSellerRatiosAdd      = "seller-ratios-add"
	FlagSellerRatiosRemove   = "seller-ratios-remove"
	FlagSettlementFee        = "settlement-fee"
	FlagSettlementFees       = "settlement-fees"
	FlagSigner               = "signer"
	FlagSource               = "source"
	FlagSources              = "sources"
	FlagSourceAmount         = "source-amount"
	FlagSplit                = "split"
	FlagTag                  = "tag"
	FlagTarget               = "target"
	FlagTargetAmount         = "target-amount"
	FlagTo                   = "to"
	FlagUnsetBips            = "unset-bips"
	FlagURL                  = "url"
)

Variables

View Source
var (
	// AuthorityAddr is the governance module's account address.
	// It's not converted to a string here because the global HRP probably isn't set when this is being defined.
	AuthorityAddr = authtypes.NewModuleAddress(govtypes.ModuleName)

	// ExampleAddr is an example bech32 address to use in command descriptions and stuff.
	ExampleAddr = "pb1g4uxzmtsd3j5zerywf047h6lta047h6lycmzwe" // = sdk.AccAddress("ExampleAddr_________")
)
View Source
var (
	// UseFlagsBreak is a string to use to start a new line of flags in the Use string of a command.
	UseFlagsBreak = "\n     "

	// RepeatableDesc is a description of how repeatable flags/values can be provided.
	RepeatableDesc = "If a flag is repeatable, multiple entries can be separated by commas\nand/or the flag can be provided multiple times."

	// ReqAdminUse is the Use string of the --admin flag.
	ReqAdminUse = fmt.Sprintf("{--%s|--%s} <admin>", flags.FlagFrom, FlagAdmin)

	// ReqAdminDesc is a description of how the --admin, --authority, and --from flags work and are sort of required.
	ReqAdminDesc = fmt.Sprintf(`If --%[1]s <admin> is provided, that is used as the <admin>.
If no --%[1]s is provided, but the --%[2]s flag was, the governance module account is used as the <admin>.
Otherwise the --%[3]s account address is used as the <admin>.
An <admin> is required.`,
		FlagAdmin, FlagAuthority, flags.FlagFrom,
	)

	// ReqEnableDisableUse is a use string for the --enable and --disable flags.
	ReqEnableDisableUse = fmt.Sprintf("{--%s|--%s}", FlagEnable, FlagDisable)

	// ReqEnableDisableDesc is a description of the --enable and --disable flags.
	ReqEnableDisableDesc = fmt.Sprintf("One of --%s or --%s must be provided, but not both.", FlagEnable, FlagDisable)

	// AccessGrantsDesc is a description of the <asset grant> format.
	AccessGrantsDesc = fmt.Sprintf(`An <access grant> has the format "<address>:<permissions>"
In <permissions>, separate each permission with a + (plus) or . (period).
An <access grant> of "<address>:all" will have all of the permissions.

Example <access grant>: %s:settle+update

Valid permissions entries: %s
The full Permission enum names are also valid.`,
		ExampleAddr,
		SimplePerms(),
	)

	// FeeRatioDesc is a description of the <fee ratio> format.
	FeeRatioDesc = `` /* 161-byte string literal not displayed */

	// AuthorityDesc is a description of the authority flag.
	AuthorityDesc = fmt.Sprintf("If --%s <authority> is not provided, the governance module account is used as the <authority>.", FlagAuthority)

	// ReqAskBidUse is a use string of the --ask and --bid flags when one is required.
	ReqAskBidUse = fmt.Sprintf("{--%s|--%s}", FlagAsk, FlagBid)

	// ReqAskBidDesc is a description of the --ask and --bid flags when one is required.
	ReqAskBidDesc = fmt.Sprintf("One of --%s or --%s must be provided, but not both.", FlagAsk, FlagBid)

	// OptAsksBidsUse is a use string of the optional mutually exclusive --asks and --bids flags.
	OptAsksBidsUse = fmt.Sprintf("[--%s|--%s]", FlagAsks, FlagBids)

	// OptAsksBidsDesc is a description of the --asks and --bids flags when they're optional.
	OptAsksBidsDesc = fmt.Sprintf("At most one of --%s or --%s can be provided.", FlagAsks, FlagBids)

	AccountAmountDesc = `An <account-amount> has the format "<account>:<amount>".
The <account> should be a bech32 address string.
The <amount> should be a coins string with the format <amount><denom>[,<amount><denom> ...]

Example <account-amount>: ` + ExampleAddr + `:10nhash,3orange`

	NAVDesc = `` /* 173-byte string literal not displayed */

	PageFlagsUse = "[pagination flags]"
)

Functions

func AddFlagsAdmin added in v1.17.1

func AddFlagsAdmin(cmd *cobra.Command)

AddFlagsAdmin adds the --admin and --authority flags to a command and makes them mutually exclusive. It also makes one of --admin, --authority, and --from required.

Use ReadFlagsAdminOrFrom to read these flags.

func AddFlagsAdminOpt added in v1.18.0

func AddFlagsAdminOpt(cmd *cobra.Command)

AddFlagsAdminOpt adds the --admin and --authority flags to a command and makes them mutually exclusive.

Use ReadFlagsAdminOrFrom to read these flags.

func AddFlagsAsksBidsBools added in v1.17.1

func AddFlagsAsksBidsBools(cmd *cobra.Command)

AddFlagsAsksBidsBools adds the --asks and --bids flags as bools for limiting search results. Marks them mutually exclusive (but not required).

Use ReadFlagsAsksBidsOpt to read them.

func AddFlagsEnableDisable added in v1.17.1

func AddFlagsEnableDisable(cmd *cobra.Command, name string)

AddFlagsEnableDisable adds the --enable and --disable flags and marks them mutually exclusive and one is required.

Use ReadFlagsEnableDisable to read these flags.

func AddFlagsMarketDetails added in v1.17.1

func AddFlagsMarketDetails(cmd *cobra.Command)

AddFlagsMarketDetails adds all the flags needed for ReadFlagsMarketDetails.

func AddQueryExample added in v1.17.1

func AddQueryExample(cmd *cobra.Command, args ...string)

AddQueryExample appends an example to a query command's examples.

func AddUseArgs added in v1.17.1

func AddUseArgs(cmd *cobra.Command, args ...string)

AddUseArgs adds the given strings to the cmd's Use, separated by a space.

func AddUseDetails added in v1.17.1

func AddUseDetails(cmd *cobra.Command, sections ...string)

AddUseDetails appends each provided section to the Use field with an empty line between them.

func CmdQuery

func CmdQuery() *cobra.Command

func CmdQueryCommitmentSettlementFeeCalc added in v1.18.0

func CmdQueryCommitmentSettlementFeeCalc() *cobra.Command

CmdQueryCommitmentSettlementFeeCalc creates the commitment-settlement-fee-calc sub-command for the exchange query command.

func CmdQueryGetAccountCommitments added in v1.18.0

func CmdQueryGetAccountCommitments() *cobra.Command

CmdQueryGetAccountCommitments creates the account-commitments sub-command for the exchange query command.

func CmdQueryGetAllCommitments added in v1.18.0

func CmdQueryGetAllCommitments() *cobra.Command

CmdQueryGetAllCommitments creates the all-commitments sub-command for the exchange query command.

func CmdQueryGetAllMarkets added in v1.17.1

func CmdQueryGetAllMarkets() *cobra.Command

CmdQueryGetAllMarkets creates the all-markets sub-command for the exchange query command.

func CmdQueryGetAllOrders added in v1.17.1

func CmdQueryGetAllOrders() *cobra.Command

CmdQueryGetAllOrders creates the all-orders sub-command for the exchange query command.

func CmdQueryGetAllPayments added in v1.18.0

func CmdQueryGetAllPayments() *cobra.Command

CmdQueryGetAllPayments creates the all-payments sub-command for the exchange query command.

func CmdQueryGetAssetOrders added in v1.17.1

func CmdQueryGetAssetOrders() *cobra.Command

CmdQueryGetAssetOrders creates the asset-orders sub-command for the exchange query command.

func CmdQueryGetCommitment added in v1.18.0

func CmdQueryGetCommitment() *cobra.Command

CmdQueryGetCommitment creates the commitment sub-command for the exchange query command.

func CmdQueryGetMarket added in v1.17.1

func CmdQueryGetMarket() *cobra.Command

CmdQueryGetMarket creates the market sub-command for the exchange query command.

func CmdQueryGetMarketCommitments added in v1.18.0

func CmdQueryGetMarketCommitments() *cobra.Command

CmdQueryGetMarketCommitments creates the market-commitments sub-command for the exchange query command.

func CmdQueryGetMarketOrders added in v1.17.1

func CmdQueryGetMarketOrders() *cobra.Command

CmdQueryGetMarketOrders creates the market-orders sub-command for the exchange query command.

func CmdQueryGetOrder added in v1.17.1

func CmdQueryGetOrder() *cobra.Command

CmdQueryGetOrder creates the order sub-command for the exchange query command.

func CmdQueryGetOrderByExternalID added in v1.17.1

func CmdQueryGetOrderByExternalID() *cobra.Command

CmdQueryGetOrderByExternalID creates the order-by-external-id sub-command for the exchange query command.

func CmdQueryGetOwnerOrders added in v1.17.1

func CmdQueryGetOwnerOrders() *cobra.Command

CmdQueryGetOwnerOrders creates the owner-orders sub-command for the exchange query command.

func CmdQueryGetPayment added in v1.18.0

func CmdQueryGetPayment() *cobra.Command

CmdQueryGetPayment creates the payment sub-command for the exchange query command.

func CmdQueryGetPaymentsWithSource added in v1.18.0

func CmdQueryGetPaymentsWithSource() *cobra.Command

CmdQueryGetPaymentsWithSource creates the payments-with-source sub-command for the exchange query command.

func CmdQueryGetPaymentsWithTarget added in v1.18.0

func CmdQueryGetPaymentsWithTarget() *cobra.Command

CmdQueryGetPaymentsWithTarget creates the payments-with-target sub-command for the exchange query command.

func CmdQueryOrderFeeCalc added in v1.17.1

func CmdQueryOrderFeeCalc() *cobra.Command

CmdQueryOrderFeeCalc creates the order-fee-calc sub-command for the exchange query command.

func CmdQueryParams added in v1.17.1

func CmdQueryParams() *cobra.Command

CmdQueryParams creates the params sub-command for the exchange query command.

func CmdQueryPaymentFeeCalc added in v1.18.0

func CmdQueryPaymentFeeCalc() *cobra.Command

CmdQueryPaymentFeeCalc creates the payment-fee-calc sub-command for the exchange query command.

func CmdQueryValidateCreateMarket added in v1.17.1

func CmdQueryValidateCreateMarket() *cobra.Command

CmdQueryValidateCreateMarket creates the validate-create-market sub-command for the exchange query command.

func CmdQueryValidateManageFees added in v1.17.1

func CmdQueryValidateManageFees() *cobra.Command

CmdQueryValidateManageFees creates the validate-manage-fees sub-command for the exchange query command.

func CmdQueryValidateMarket added in v1.17.1

func CmdQueryValidateMarket() *cobra.Command

CmdQueryValidateMarket creates the validate-market sub-command for the exchange query command.

func CmdTx

func CmdTx() *cobra.Command

CmdTx creates the tx command (and sub-commands) for the exchange module.

func CmdTxAcceptPayment added in v1.18.0

func CmdTxAcceptPayment() *cobra.Command

CmdTxAcceptPayment creates the accept-payment sub-command for the exchange tx command.

func CmdTxCancelOrder added in v1.17.1

func CmdTxCancelOrder() *cobra.Command

CmdTxCancelOrder creates the cancel-order sub-command for the exchange tx command.

func CmdTxCancelPayments added in v1.18.0

func CmdTxCancelPayments() *cobra.Command

CmdTxCancelPayments creates the cancel-payments sub-command for the exchange tx command.

func CmdTxChangePaymentTarget added in v1.18.0

func CmdTxChangePaymentTarget() *cobra.Command

CmdTxChangePaymentTarget creates the change-payment-target sub-command for the exchange tx command.

func CmdTxCommitFunds added in v1.18.0

func CmdTxCommitFunds() *cobra.Command

CmdTxCommitFunds creates the commit-funds sub-command for the exchange tx command.

func CmdTxCreateAsk added in v1.17.1

func CmdTxCreateAsk() *cobra.Command

CmdTxCreateAsk creates the create-ask sub-command for the exchange tx command.

func CmdTxCreateBid added in v1.17.1

func CmdTxCreateBid() *cobra.Command

CmdTxCreateBid creates the create-bid sub-command for the exchange tx command.

func CmdTxCreatePayment added in v1.18.0

func CmdTxCreatePayment() *cobra.Command

CmdTxCreatePayment creates the create-payment sub-command for the exchange tx command.

func CmdTxFillAsks added in v1.17.1

func CmdTxFillAsks() *cobra.Command

CmdTxFillAsks creates the fill-asks sub-command for the exchange tx command.

func CmdTxFillBids added in v1.17.1

func CmdTxFillBids() *cobra.Command

CmdTxFillBids creates the fill-bids sub-command for the exchange tx command.

func CmdTxGovCloseMarket added in v1.18.0

func CmdTxGovCloseMarket() *cobra.Command

CmdTxGovCloseMarket creates the gov-close-market sub-command for the exchange tx command.

func CmdTxGovCreateMarket added in v1.17.1

func CmdTxGovCreateMarket() *cobra.Command

CmdTxGovCreateMarket creates the gov-create-market sub-command for the exchange tx command.

func CmdTxGovManageFees added in v1.17.1

func CmdTxGovManageFees() *cobra.Command

CmdTxGovManageFees creates the gov-manage-fees sub-command for the exchange tx command.

func CmdTxGovUpdateParams added in v1.17.1

func CmdTxGovUpdateParams() *cobra.Command

CmdTxGovUpdateParams creates the gov-update-params sub-command for the exchange tx command.

func CmdTxMarketCommitmentSettle added in v1.18.0

func CmdTxMarketCommitmentSettle() *cobra.Command

CmdTxMarketCommitmentSettle creates the market-commitment-settle sub-command for the exchange tx command.

func CmdTxMarketManagePermissions added in v1.17.1

func CmdTxMarketManagePermissions() *cobra.Command

CmdTxMarketManagePermissions creates the market-permissions sub-command for the exchange tx command.

func CmdTxMarketManageReqAttrs added in v1.17.1

func CmdTxMarketManageReqAttrs() *cobra.Command

CmdTxMarketManageReqAttrs creates the market-req-attrs sub-command for the exchange tx command.

func CmdTxMarketReleaseCommitments added in v1.18.0

func CmdTxMarketReleaseCommitments() *cobra.Command

CmdTxMarketReleaseCommitments creates the market-release-commitments sub-command for the exchange tx command.

func CmdTxMarketSetOrderExternalID added in v1.17.1

func CmdTxMarketSetOrderExternalID() *cobra.Command

CmdTxMarketSetOrderExternalID creates the market-set-external-id sub-command for the exchange tx command.

func CmdTxMarketSettle added in v1.17.1

func CmdTxMarketSettle() *cobra.Command

CmdTxMarketSettle creates the market-settle sub-command for the exchange tx command.

func CmdTxMarketUpdateAcceptingCommitments added in v1.18.0

func CmdTxMarketUpdateAcceptingCommitments() *cobra.Command

CmdTxMarketUpdateAcceptingCommitments creates the market-accepting-commitments sub-command for the exchange tx command.

func CmdTxMarketUpdateAcceptingOrders added in v1.18.0

func CmdTxMarketUpdateAcceptingOrders() *cobra.Command

CmdTxMarketUpdateAcceptingOrders creates the market-accepting-orders sub-command for the exchange tx command.

func CmdTxMarketUpdateDetails added in v1.17.1

func CmdTxMarketUpdateDetails() *cobra.Command

CmdTxMarketUpdateDetails creates the market-details sub-command for the exchange tx command.

func CmdTxMarketUpdateIntermediaryDenom added in v1.18.0

func CmdTxMarketUpdateIntermediaryDenom() *cobra.Command

CmdTxMarketUpdateIntermediaryDenom creates the market-intermediary-denom sub-command for the exchange tx command.

func CmdTxMarketUpdateUserSettle added in v1.17.1

func CmdTxMarketUpdateUserSettle() *cobra.Command

CmdTxMarketUpdateUserSettle creates the market-user-settle sub-command for the exchange tx command.

func CmdTxMarketWithdraw added in v1.17.1

func CmdTxMarketWithdraw() *cobra.Command

CmdTxMarketWithdraw creates the market-withdraw sub-command for the exchange tx command.

func CmdTxRejectPayment added in v1.18.0

func CmdTxRejectPayment() *cobra.Command

CmdTxRejectPayment creates the reject-payment sub-command for the exchange tx command.

func CmdTxRejectPayments added in v1.18.0

func CmdTxRejectPayments() *cobra.Command

CmdTxRejectPayments creates the reject-payments sub-command for the exchange tx command.

func MakeMsgAcceptPayment added in v1.18.0

func MakeMsgAcceptPayment(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgAcceptPaymentRequest, error)

MakeMsgAcceptPayment reads all the SetupCmdTxAcceptPayment flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgCancelOrder added in v1.17.1

func MakeMsgCancelOrder(clientCtx client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.MsgCancelOrderRequest, error)

MakeMsgCancelOrder reads all the SetupCmdTxCancelOrder flags and the provided args and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgCancelPayments added in v1.18.0

func MakeMsgCancelPayments(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgCancelPaymentsRequest, error)

MakeMsgCancelPayments reads all the SetupCmdTxCancelPayments flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgChangePaymentTarget added in v1.18.0

func MakeMsgChangePaymentTarget(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgChangePaymentTargetRequest, error)

MakeMsgChangePaymentTarget reads all the SetupCmdTxChangePaymentTarget flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgCommitFunds added in v1.18.0

func MakeMsgCommitFunds(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgCommitFundsRequest, error)

MakeMsgCommitFunds reads all the SetupCmdTxCommitFunds flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgCreateAsk added in v1.17.1

func MakeMsgCreateAsk(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgCreateAskRequest, error)

MakeMsgCreateAsk reads all the SetupCmdTxCreateAsk flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgCreateBid added in v1.17.1

func MakeMsgCreateBid(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgCreateBidRequest, error)

MakeMsgCreateBid reads all the SetupCmdTxCreateBid flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgCreatePayment added in v1.18.0

func MakeMsgCreatePayment(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgCreatePaymentRequest, error)

MakeMsgCreatePayment reads all the SetupCmdTxCreatePayment flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgFillAsks added in v1.17.1

func MakeMsgFillAsks(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgFillAsksRequest, error)

MakeMsgFillAsks reads all the SetupCmdTxFillAsks flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgFillBids added in v1.17.1

func MakeMsgFillBids(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgFillBidsRequest, error)

MakeMsgFillBids reads all the SetupCmdTxFillBids flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgGovCloseMarket added in v1.18.0

func MakeMsgGovCloseMarket(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgGovCloseMarketRequest, error)

MakeMsgGovCloseMarket reads all the SetupCmdTxGovCloseMarket flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgGovCreateMarket added in v1.17.1

func MakeMsgGovCreateMarket(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgGovCreateMarketRequest, error)

MakeMsgGovCreateMarket reads all the SetupCmdTxGovCreateMarket flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgGovManageFees added in v1.17.1

func MakeMsgGovManageFees(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgGovManageFeesRequest, error)

MakeMsgGovManageFees reads all the SetupCmdTxGovManageFees flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgGovUpdateParams added in v1.17.1

func MakeMsgGovUpdateParams(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgGovUpdateParamsRequest, error)

MakeMsgGovUpdateParams reads all the SetupCmdTxGovUpdateParams flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketCommitmentSettle added in v1.18.0

func MakeMsgMarketCommitmentSettle(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketCommitmentSettleRequest, error)

MakeMsgMarketCommitmentSettle reads all the SetupCmdTxMarketCommitmentSettle flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketManagePermissions added in v1.17.1

func MakeMsgMarketManagePermissions(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketManagePermissionsRequest, error)

MakeMsgMarketManagePermissions reads all the SetupCmdTxMarketManagePermissions flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketManageReqAttrs added in v1.17.1

func MakeMsgMarketManageReqAttrs(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketManageReqAttrsRequest, error)

MakeMsgMarketManageReqAttrs reads all the SetupCmdTxMarketManageReqAttrs flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketReleaseCommitments added in v1.18.0

func MakeMsgMarketReleaseCommitments(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketReleaseCommitmentsRequest, error)

MakeMsgMarketReleaseCommitments reads all the SetupCmdTxMarketReleaseCommitments flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketSetOrderExternalID added in v1.17.1

func MakeMsgMarketSetOrderExternalID(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketSetOrderExternalIDRequest, error)

MakeMsgMarketSetOrderExternalID reads all the SetupCmdTxMarketSetOrderExternalID flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketSettle added in v1.17.1

func MakeMsgMarketSettle(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketSettleRequest, error)

MakeMsgMarketSettle reads all the SetupCmdTxMarketSettle flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketUpdateAcceptingCommitments added in v1.18.0

func MakeMsgMarketUpdateAcceptingCommitments(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketUpdateAcceptingCommitmentsRequest, error)

MakeMsgMarketUpdateAcceptingCommitments reads all the SetupCmdTxMarketUpdateAcceptingCommitments flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketUpdateAcceptingOrders added in v1.18.0

func MakeMsgMarketUpdateAcceptingOrders(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketUpdateAcceptingOrdersRequest, error)

MakeMsgMarketUpdateAcceptingOrders reads all the SetupCmdTxMarketUpdateAcceptingOrders flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketUpdateDetails added in v1.17.1

func MakeMsgMarketUpdateDetails(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketUpdateDetailsRequest, error)

MakeMsgMarketUpdateDetails reads all the SetupCmdTxMarketUpdateDetails flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketUpdateIntermediaryDenom added in v1.18.0

func MakeMsgMarketUpdateIntermediaryDenom(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketUpdateIntermediaryDenomRequest, error)

MakeMsgMarketUpdateIntermediaryDenom reads all the SetupCmdTxMarketUpdateIntermediaryDenom flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketUpdateUserSettle added in v1.17.1

func MakeMsgMarketUpdateUserSettle(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketUpdateUserSettleRequest, error)

MakeMsgMarketUpdateUserSettle reads all the SetupCmdTxMarketUpdateUserSettle flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgMarketWithdraw added in v1.17.1

func MakeMsgMarketWithdraw(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketWithdrawRequest, error)

MakeMsgMarketWithdraw reads all the SetupCmdTxMarketWithdraw flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgRejectPayment added in v1.18.0

func MakeMsgRejectPayment(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgRejectPaymentRequest, error)

MakeMsgRejectPayment reads all the SetupCmdTxRejectPayment flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeMsgRejectPayments added in v1.18.0

func MakeMsgRejectPayments(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgRejectPaymentsRequest, error)

MakeMsgRejectPayments reads all the SetupCmdTxRejectPayments flags and creates the desired Msg. Satisfies the msgMaker type.

func MakeQueryCommitmentSettlementFeeCalc added in v1.18.0

func MakeQueryCommitmentSettlementFeeCalc(clientCtx client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryCommitmentSettlementFeeCalcRequest, error)

MakeQueryCommitmentSettlementFeeCalc reads all the SetupCmdQueryCommitmentSettlementFeeCalc flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetAccountCommitments added in v1.18.0

func MakeQueryGetAccountCommitments(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetAccountCommitmentsRequest, error)

MakeQueryGetAccountCommitments reads all the SetupCmdQueryGetAccountCommitments flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetAllCommitments added in v1.18.0

func MakeQueryGetAllCommitments(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryGetAllCommitmentsRequest, error)

MakeQueryGetAllCommitments reads all the SetupCmdQueryGetAllCommitments flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetAllMarkets added in v1.17.1

func MakeQueryGetAllMarkets(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryGetAllMarketsRequest, error)

MakeQueryGetAllMarkets reads all the SetupCmdQueryGetAllMarkets flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetAllOrders added in v1.17.1

func MakeQueryGetAllOrders(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryGetAllOrdersRequest, error)

MakeQueryGetAllOrders reads all the SetupCmdQueryGetAllOrders flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetAllPayments added in v1.18.0

func MakeQueryGetAllPayments(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryGetAllPaymentsRequest, error)

MakeQueryGetAllPayments reads all the SetupCmdQueryGetAllPayments flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetAssetOrders added in v1.17.1

func MakeQueryGetAssetOrders(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetAssetOrdersRequest, error)

MakeQueryGetAssetOrders reads all the SetupCmdQueryGetAssetOrders flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetCommitment added in v1.18.0

func MakeQueryGetCommitment(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryGetCommitmentRequest, error)

MakeQueryGetCommitment reads all the SetupCmdQueryGetCommitment flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetMarket added in v1.17.1

func MakeQueryGetMarket(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetMarketRequest, error)

MakeQueryGetMarket reads all the SetupCmdQueryGetMarket flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetMarketCommitments added in v1.18.0

func MakeQueryGetMarketCommitments(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetMarketCommitmentsRequest, error)

MakeQueryGetMarketCommitments reads all the SetupCmdQueryGetMarketCommitments flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetMarketOrders added in v1.17.1

func MakeQueryGetMarketOrders(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetMarketOrdersRequest, error)

MakeQueryGetMarketOrders reads all the SetupCmdQueryGetMarketOrders flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetOrder added in v1.17.1

func MakeQueryGetOrder(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetOrderRequest, error)

MakeQueryGetOrder reads all the SetupCmdQueryGetOrder flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetOrderByExternalID added in v1.17.1

func MakeQueryGetOrderByExternalID(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryGetOrderByExternalIDRequest, error)

MakeQueryGetOrderByExternalID reads all the SetupCmdQueryGetOrderByExternalID flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetOwnerOrders added in v1.17.1

func MakeQueryGetOwnerOrders(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetOwnerOrdersRequest, error)

MakeQueryGetOwnerOrders reads all the SetupCmdQueryGetOwnerOrders flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetPayment added in v1.18.0

func MakeQueryGetPayment(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetPaymentRequest, error)

MakeQueryGetPayment reads all the SetupCmdQueryGetPayment flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetPaymentsWithSource added in v1.18.0

func MakeQueryGetPaymentsWithSource(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetPaymentsWithSourceRequest, error)

MakeQueryGetPaymentsWithSource reads all the SetupCmdQueryGetPaymentsWithSource flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryGetPaymentsWithTarget added in v1.18.0

func MakeQueryGetPaymentsWithTarget(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetPaymentsWithTargetRequest, error)

MakeQueryGetPaymentsWithTarget reads all the SetupCmdQueryGetPaymentsWithTarget flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryOrderFeeCalc added in v1.17.1

func MakeQueryOrderFeeCalc(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryOrderFeeCalcRequest, error)

MakeQueryOrderFeeCalc reads all the SetupCmdQueryOrderFeeCalc flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryParams added in v1.17.1

func MakeQueryParams(_ client.Context, _ *pflag.FlagSet, _ []string) (*exchange.QueryParamsRequest, error)

MakeQueryParams reads all the SetupCmdQueryParams flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryPaymentFeeCalc added in v1.18.0

func MakeQueryPaymentFeeCalc(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryPaymentFeeCalcRequest, error)

MakeQueryPaymentFeeCalc reads all the SetupCmdQueryPaymentFeeCalc flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryValidateCreateMarket added in v1.17.1

func MakeQueryValidateCreateMarket(clientCtx client.Context, flags *pflag.FlagSet, args []string) (*exchange.QueryValidateCreateMarketRequest, error)

MakeQueryValidateCreateMarket reads all the SetupCmdQueryValidateCreateMarket flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryValidateManageFees added in v1.17.1

func MakeQueryValidateManageFees(clientCtx client.Context, flags *pflag.FlagSet, args []string) (*exchange.QueryValidateManageFeesRequest, error)

MakeQueryValidateManageFees reads all the SetupCmdQueryValidateManageFees flags and creates the desired request. Satisfies the queryReqMaker type.

func MakeQueryValidateMarket added in v1.17.1

func MakeQueryValidateMarket(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryValidateMarketRequest, error)

MakeQueryValidateMarket reads all the SetupCmdQueryValidateMarket flags and creates the desired request. Satisfies the queryReqMaker type.

func MarkFlagsRequired added in v1.17.1

func MarkFlagsRequired(cmd *cobra.Command, names ...string)

MarkFlagsRequired marks the provided flags as required and panics if there's a problem.

func MsgFileDesc added in v1.18.0

func MsgFileDesc(msgType sdk.Msg) string

MsgFileDesc is a description of the --file flag and expected file.

func OptFlagUse added in v1.17.1

func OptFlagUse(name string, opt string) string

OptFlagUse wraps a ReqFlagUse in [], e.g. "[--name <opt>]".

func ParseAccessGrant added in v1.17.1

func ParseAccessGrant(val string) (*exchange.AccessGrant, error)

ParseAccessGrant parses an AccessGrant from a string with the format "<address>:<perm 1>[+<perm 2>...]".

func ParseAccessGrants added in v1.17.1

func ParseAccessGrants(vals []string) ([]exchange.AccessGrant, error)

ParseAccessGrants parses an AccessGrant from each of the provided vals.

func ParseAccountAmount added in v1.18.0

func ParseAccountAmount(val string) (*exchange.AccountAmount, error)

ParseAccountAmount parses an AccountAmount from the provided string with the format "<account>:<amount>".

func ParseAccountAmounts added in v1.18.0

func ParseAccountAmounts(vals []string) ([]exchange.AccountAmount, error)

ParseAccountAmounts parses an AccountAmount from each of the provided strings.

func ParseCoins added in v1.17.1

func ParseCoins(coinsStr string) (sdk.Coins, error)

ParseCoins parses a string into sdk.Coins.

func ParseFeeRatios added in v1.17.1

func ParseFeeRatios(vals []string) ([]exchange.FeeRatio, error)

ParseFeeRatios parses a FeeRatio from each of the provided vals.

func ParseFlatFeeOptions added in v1.17.1

func ParseFlatFeeOptions(vals []string) ([]sdk.Coin, error)

ParseFlatFeeOptions parses each of the provided vals to sdk.Coin.

func ParseNetAssetPrice added in v1.18.0

func ParseNetAssetPrice(val string) (*exchange.NetAssetPrice, error)

ParseNetAssetPrice parses a NetAssetPrice from the provided string with the format "<assets>:<price>".

func ParseNetAssetPrices added in v1.18.0

func ParseNetAssetPrices(vals []string) ([]exchange.NetAssetPrice, error)

ParseNetAssetPrices parses a NetAssetPrice from each of the provided strings.

func ParseSplit added in v1.17.1

func ParseSplit(val string) (*exchange.DenomSplit, error)

ParseSplit parses a DenomSplit from a string with the format "<denom>:<amount>".

func ParseSplits added in v1.17.1

func ParseSplits(vals []string) ([]exchange.DenomSplit, error)

ParseSplits parses a DenomSplit from each of the provided vals.

func ProposalFileDesc added in v1.17.1

func ProposalFileDesc(msgType sdk.Msg) string

ProposalFileDesc is a description of the --proposal flag and expected file.

func ReadAccessGrantsFlag added in v1.17.1

func ReadAccessGrantsFlag(flagSet *pflag.FlagSet, name string, def []exchange.AccessGrant) ([]exchange.AccessGrant, error)

ReadAccessGrantsFlag reads a StringSlice flag and converts it to a slice of AccessGrants. This assumes that the flag was defined with a default of nil or []string{}.

func ReadAddrFlagOrFrom added in v1.17.1

func ReadAddrFlagOrFrom(clientCtx client.Context, flagSet *pflag.FlagSet, name string) (string, error)

ReadAddrFlagOrFrom gets the requested flag or, if it wasn't provided, gets the --from address. Returns an error if neither the flag nor --from were provided. This assumes that the flag was defined with a default of "".

func ReadAddrFlagOrFromOrDefault added in v1.18.0

func ReadAddrFlagOrFromOrDefault(clientCtx client.Context, flagSet *pflag.FlagSet, name string, def string) (string, error)

ReadAddrFlagOrFromOrDefault gets the requested flag or, if it wasn't provided, gets the --from address. If neither are provided, the default is returned. Returns an error if neither the flag, --from, or a default were provided. This assumes that the flag was defined with a default of "".

func ReadCoinFlag added in v1.17.1

func ReadCoinFlag(flagSet *pflag.FlagSet, name string) (*sdk.Coin, error)

ReadCoinFlag reads a string flag and converts it into *sdk.Coin. If the flag wasn't provided, this returns nil, nil.

Use ReadReqCoinFlag if the flag is required.

func ReadCoinsFlag added in v1.17.1

func ReadCoinsFlag(flagSet *pflag.FlagSet, name string) (sdk.Coins, error)

ReadCoinsFlag reads a string flag and converts it into sdk.Coins. If the flag wasn't provided, this returns nil, nil.

If the flag is a StringSlice, use ReadFlatFeeFlag.

func ReadCoinsFlagOrDefault added in v1.18.0

func ReadCoinsFlagOrDefault(flagSet *pflag.FlagSet, name string, def sdk.Coins) (sdk.Coins, error)

ReadCoinsFlagOrDefault reads a string flag and converts it into sdk.Coins. If the flag wasn't provided, or an error was encountered, the default is returned.

func ReadFeeRatiosFlag added in v1.17.1

func ReadFeeRatiosFlag(flagSet *pflag.FlagSet, name string, def []exchange.FeeRatio) ([]exchange.FeeRatio, error)

ReadFeeRatiosFlag reads a StringSlice flag and converts it into a slice of exchange.FeeRatio. If the flag wasn't provided, the provided default is returned. This assumes that the flag was defined with a default of nil or []string{}.

func ReadFlagAccountAmounts added in v1.18.0

func ReadFlagAccountAmounts(flagSet *pflag.FlagSet, name string) ([]exchange.AccountAmount, error)

ReadFlagAccountAmounts reads a StringSlice flag and converts it into a slice of exchange.AccountAmount. This assumes that the flag was defined with a default of nil or []string{}.

func ReadFlagAccountAmountsOrDefault added in v1.18.0

func ReadFlagAccountAmountsOrDefault(flagSet *pflag.FlagSet, name string, def []exchange.AccountAmount) ([]exchange.AccountAmount, error)

func ReadFlagAccountsWithoutAmounts added in v1.18.0

func ReadFlagAccountsWithoutAmounts(flagSet *pflag.FlagSet, name string) ([]exchange.AccountAmount, error)

ReadFlagAccountsWithoutAmounts reads a StringSlice flag and converts it into a slice of exchange.AccountAmount with only the Account field populated using the values provided with the flag. This assumes that the flag was defined with a default of nil or []string{}.

func ReadFlagAuthority added in v1.17.1

func ReadFlagAuthority(flagSet *pflag.FlagSet) (string, error)

ReadFlagAuthority reads the --authority flag, or if not provided, returns the standard authority address. This assumes that the flag was defined with a default of "".

func ReadFlagAuthorityOrDefault added in v1.17.1

func ReadFlagAuthorityOrDefault(flagSet *pflag.FlagSet, def string) (string, error)

ReadFlagAuthorityOrDefault reads the --authority flag, or if not provided, returns the default. If the provided default is "", the standard authority address is used as the default. This assumes that the flag was defined with a default of "".

func ReadFlagBoolOrDefault added in v1.17.1

func ReadFlagBoolOrDefault(flagSet *pflag.FlagSet, name string, def bool) (bool, error)

ReadFlagBoolOrDefault gets a bool flag or returns the provided default. This assumes that the flag was defined with a default of false (it actually just ignores that default).

func ReadFlagMarketOrArg added in v1.17.1

func ReadFlagMarketOrArg(flagSet *pflag.FlagSet, args []string) (uint32, error)

ReadFlagMarketOrArg gets a required market id from either the --market flag or the first provided arg. This assumes that the flag was defined with a default of 0.

func ReadFlagNetAssetPrices added in v1.18.0

func ReadFlagNetAssetPrices(flagSet *pflag.FlagSet, name string) ([]exchange.NetAssetPrice, error)

ReadFlagNetAssetPrices reads a StringSlice flag and converts it into a slice of exchange.NetAssetPrice. This assumes that the flag was defined with a default of nil or []string{}.

func ReadFlagNetAssetPricesOrDefault added in v1.18.0

func ReadFlagNetAssetPricesOrDefault(flagSet *pflag.FlagSet, name string, def []exchange.NetAssetPrice) ([]exchange.NetAssetPrice, error)

ReadFlagNetAssetPricesOrDefault reads a StringSlice flag and converts it into a slice of exchange.NetAssetPrice. If none are provided or there's an error, the default is returned (along with the error). This assumes that the flag was defined with a default of nil or []string{}.

func ReadFlagOrderOrArg added in v1.17.1

func ReadFlagOrderOrArg(flagSet *pflag.FlagSet, args []string) (uint64, error)

ReadFlagOrderOrArg gets a required order id from either the --order flag or the first provided arg. This assumes that the flag was defined with a default of 0.

func ReadFlagStringOrDefault added in v1.17.1

func ReadFlagStringOrDefault(flagSet *pflag.FlagSet, name string, def string) (string, error)

ReadFlagStringOrDefault gets a string flag or returns the provided default. This assumes that the flag was defined with a default of "".

func ReadFlagStringSliceOrDefault added in v1.17.1

func ReadFlagStringSliceOrDefault(flagSet *pflag.FlagSet, name string, def []string) ([]string, error)

ReadFlagStringSliceOrDefault gets a string slice flag or returns the provided default. This assumes that the flag was defined with a default of nil or []string{}.

func ReadFlagUint32OrDefault added in v1.17.1

func ReadFlagUint32OrDefault(flagSet *pflag.FlagSet, name string, def uint32) (uint32, error)

ReadFlagUint32OrDefault gets a uit32 flag or returns the provided default. This assumes that the flag was defined with a default of 0.

func ReadFlagsAdminOrFrom added in v1.17.1

func ReadFlagsAdminOrFrom(clientCtx client.Context, flagSet *pflag.FlagSet) (string, error)

ReadFlagsAdminOrFrom reads the --admin flag if provided. If not, but the --authority flag was provided, the gov module account address is returned. If no --admin or --authority flag was provided, returns the --from address. Returns an error if none of those flags were provided or there was an error reading one.

This assumes AddFlagsAdmin was used to define the flags, and that the context comes from client.GetClientTxContext.

func ReadFlagsAdminOrFromOrDefault added in v1.18.0

func ReadFlagsAdminOrFromOrDefault(clientCtx client.Context, flagSet *pflag.FlagSet, def string) (string, error)

ReadFlagsAdminOrFromOrDefault reads the --admin flag if provided. If not, but the --authority flag was provided, the gov module account address is returned. If no --admin or --authority flag was provided, the --from address is returned. If none of that was provided, but a default was provided, the default is returned. Returns an error if none of those flags nor a default were provided or there was an error reading one.

This assumes AddFlagsAdmin was used to define the flags, and that the context comes from client.GetClientTxContext.

func ReadFlagsAsksBidsOpt added in v1.17.1

func ReadFlagsAsksBidsOpt(flagSet *pflag.FlagSet) (string, error)

ReadFlagsAsksBidsOpt reads the --asks and --bids bool flags, returning either "ask", "bid" or "".

This assumes that the flags were defined using AddFlagsAsksBidsBools.

func ReadFlagsEnableDisable added in v1.17.1

func ReadFlagsEnableDisable(flagSet *pflag.FlagSet) (bool, error)

ReadFlagsEnableDisable reads the --enable and --disable flags. If --enable is given, returns true, if --disable is given, returns false.

This assumes that the flags were defined with AddFlagsEnableDisable.

func ReadFlagsMarketDetails added in v1.17.1

func ReadFlagsMarketDetails(flagSet *pflag.FlagSet, def exchange.MarketDetails) (exchange.MarketDetails, error)

ReadFlagsMarketDetails reads all the AddFlagsMarketDetails flags and creates the desired MarketDetails.

func ReadFlatFeeFlag added in v1.17.1

func ReadFlatFeeFlag(flagSet *pflag.FlagSet, name string, def []sdk.Coin) ([]sdk.Coin, error)

ReadFlatFeeFlag reads a StringSlice flag and converts it into a slice of sdk.Coin. If the flag wasn't provided, the provided default is returned. This assumes that the flag was defined with a default of nil or []string{}.

If the flag is a String, use ReadCoinsFlag.

func ReadMsgGovCreateMarketRequestFromProposalFlag added in v1.17.1

func ReadMsgGovCreateMarketRequestFromProposalFlag(clientCtx client.Context, flagSet *pflag.FlagSet) (*exchange.MsgGovCreateMarketRequest, error)

ReadMsgGovCreateMarketRequestFromProposalFlag reads the --proposal flag and extracts the MsgGovCreateMarketRequest from the file points to. An error is returned if anything goes wrong or the file doesn't have exactly one MsgGovCreateMarketRequest. A MsgGovCreateMarketRequest is returned even if an error is returned. This assumes that the flag was defined with a default of "".

func ReadMsgGovManageFeesRequestFromProposalFlag added in v1.17.1

func ReadMsgGovManageFeesRequestFromProposalFlag(clientCtx client.Context, flagSet *pflag.FlagSet) (*exchange.MsgGovManageFeesRequest, error)

ReadMsgGovManageFeesRequestFromProposalFlag reads the --proposal flag and extracts the MsgGovManageFeesRequest from the file points to. An error is returned if anything goes wrong or the file doesn't have exactly one MsgGovManageFeesRequest. A MsgGovManageFeesRequest is returned even if an error is returned. This assumes that the flag was defined with a default of "".

func ReadMsgMarketCommitmentSettleFromFileFlag added in v1.18.0

func ReadMsgMarketCommitmentSettleFromFileFlag(clientCtx client.Context, flagSet *pflag.FlagSet) (*exchange.MsgMarketCommitmentSettleRequest, error)

ReadMsgMarketCommitmentSettleFromFileFlag reads the --file flag and extracts the MsgMarketCommitmentSettleRequest from the file points to. An error is returned if anything goes wrong or the file doesn't have exactly one MsgMarketCommitmentSettleRequest. A MsgMarketCommitmentSettleRequest is returned even if an error is returned. This assumes that the flag was defined with a default of "".

func ReadOptStringFlagOrArg added in v1.18.0

func ReadOptStringFlagOrArg(flagSet *pflag.FlagSet, args []string, flagName, varName string) (string, error)

ReadOptStringFlagOrArg gets an optional string from either a flag or the first provided arg. This assumes that the flag was defined with a default of "".

func ReadOrderIDsFlag added in v1.17.1

func ReadOrderIDsFlag(flagSet *pflag.FlagSet, name string) ([]uint64, error)

ReadOrderIDsFlag reads a UintSlice flag and converts it into a []uint64.

func ReadPaymentFromFileFlag added in v1.18.0

func ReadPaymentFromFileFlag(clientCtx client.Context, flagSet *pflag.FlagSet) (exchange.Payment, error)

ReadPaymentFromFileFlag reads the --file flag and extracts a Payment from either a MsgCreatePaymentRequest or MsgAcceptPaymentRequest contained in the file. An error is returned if anything goes wrong, or the file doesn't have exactly one Payment. A Payment is returned even if an error is returned. This assumes that the flag was defined with a default of "".

func ReadProposalFlag added in v1.17.1

func ReadProposalFlag(clientCtx client.Context, flagSet *pflag.FlagSet) (string, []*codectypes.Any, error)

ReadProposalFlag gets the --proposal string value and attempts to read the file in as a Tx in json. It then attempts to extract any messages contained in any govv1.MsgSubmitProposal messages in that Tx. An error is returned if anything goes wrong. This assumes that the flag was defined with a default of "".

func ReadReqCoinFlag added in v1.17.1

func ReadReqCoinFlag(flagSet *pflag.FlagSet, name string) (sdk.Coin, error)

ReadReqCoinFlag reads a string flag and converts it into a sdk.Coin and requires it to have a value. Returns an error if not provided.

Use ReadCoinFlag if the flag is optional.

func ReadReqCoinsFlag added in v1.18.0

func ReadReqCoinsFlag(flagSet *pflag.FlagSet, name string) (sdk.Coins, error)

ReadReqCoinsFlag reads a string flag and converts it into sdk.Coins. If the flag wasn't provided, this returns an error.

If the flag is a StringSlice, use ReadFlatFeeFlag.

func ReadSplitsFlag added in v1.17.1

func ReadSplitsFlag(flagSet *pflag.FlagSet, name string) ([]exchange.DenomSplit, error)

ReadSplitsFlag reads a StringSlice flag and converts it into a slice of exchange.DenomSplit. This assumes that the flag was defined with a default of nil or []string{}.

func ReadStringFlagOrArg added in v1.17.1

func ReadStringFlagOrArg(flagSet *pflag.FlagSet, args []string, flagName, varName string) (string, error)

ReadStringFlagOrArg gets a required string from either a flag or the first provided arg. This assumes that the flag was defined with a default of "".

func ReadTxFileFlag added in v1.18.0

func ReadTxFileFlag(clientCtx client.Context, flagSet *pflag.FlagSet, fileFlag string) (string, *txtypes.Tx, error)

ReadTxFileFlag gets a filename from the flag with the provided fileFlag and tries to read that file as a Tx. Then it gets all the messages out of it.

func ReqFlagUse added in v1.17.1

func ReqFlagUse(name string, opt string) string

ReqFlagUse returns the string "--name <opt>" if an opt is provided, or just "--name" if not.

func ReqSignerDesc added in v1.17.1

func ReqSignerDesc(name string) string

ReqSignerDesc returns a description of how the --<name> flag is used and sort of required.

func ReqSignerUse added in v1.17.1

func ReqSignerUse(name string) string

ReqSignerUse is the Use string for a signer flag.

func SetupCmdQueryCommitmentSettlementFeeCalc added in v1.18.0

func SetupCmdQueryCommitmentSettlementFeeCalc(cmd *cobra.Command)

SetupCmdQueryCommitmentSettlementFeeCalc adds all the flags needed for MakeQueryCommitmentSettlementFeeCalc.

func SetupCmdQueryGetAccountCommitments added in v1.18.0

func SetupCmdQueryGetAccountCommitments(cmd *cobra.Command)

SetupCmdQueryGetAccountCommitments adds all the flags needed for MakeQueryGetAccountCommitments.

func SetupCmdQueryGetAllCommitments added in v1.18.0

func SetupCmdQueryGetAllCommitments(cmd *cobra.Command)

SetupCmdQueryGetAllCommitments adds all the flags needed for MakeQueryGetAllCommitments.

func SetupCmdQueryGetAllMarkets added in v1.17.1

func SetupCmdQueryGetAllMarkets(cmd *cobra.Command)

SetupCmdQueryGetAllMarkets adds all the flags needed for MakeQueryGetAllMarkets.

func SetupCmdQueryGetAllOrders added in v1.17.1

func SetupCmdQueryGetAllOrders(cmd *cobra.Command)

SetupCmdQueryGetAllOrders adds all the flags needed for MakeQueryGetAllOrders.

func SetupCmdQueryGetAllPayments added in v1.18.0

func SetupCmdQueryGetAllPayments(cmd *cobra.Command)

SetupCmdQueryGetAllPayments adds all the flags needed for MakeQueryGetAllPayments.

func SetupCmdQueryGetAssetOrders added in v1.17.1

func SetupCmdQueryGetAssetOrders(cmd *cobra.Command)

SetupCmdQueryGetAssetOrders adds all the flags needed for MakeQueryGetAssetOrders.

func SetupCmdQueryGetCommitment added in v1.18.0

func SetupCmdQueryGetCommitment(cmd *cobra.Command)

SetupCmdQueryGetCommitment adds all the flags needed for MakeQueryGetCommitment.

func SetupCmdQueryGetMarket added in v1.17.1

func SetupCmdQueryGetMarket(cmd *cobra.Command)

SetupCmdQueryGetMarket adds all the flags needed for MakeQueryGetMarket.

func SetupCmdQueryGetMarketCommitments added in v1.18.0

func SetupCmdQueryGetMarketCommitments(cmd *cobra.Command)

SetupCmdQueryGetMarketCommitments adds all the flags needed for MakeQueryGetMarketCommitments.

func SetupCmdQueryGetMarketOrders added in v1.17.1

func SetupCmdQueryGetMarketOrders(cmd *cobra.Command)

SetupCmdQueryGetMarketOrders adds all the flags needed for MakeQueryGetMarketOrders.

func SetupCmdQueryGetOrder added in v1.17.1

func SetupCmdQueryGetOrder(cmd *cobra.Command)

SetupCmdQueryGetOrder adds all the flags needed for MakeQueryGetOrder.

func SetupCmdQueryGetOrderByExternalID added in v1.17.1

func SetupCmdQueryGetOrderByExternalID(cmd *cobra.Command)

SetupCmdQueryGetOrderByExternalID adds all the flags needed for MakeQueryGetOrderByExternalID.

func SetupCmdQueryGetOwnerOrders added in v1.17.1

func SetupCmdQueryGetOwnerOrders(cmd *cobra.Command)

SetupCmdQueryGetOwnerOrders adds all the flags needed for MakeQueryGetOwnerOrders.

func SetupCmdQueryGetPayment added in v1.18.0

func SetupCmdQueryGetPayment(cmd *cobra.Command)

SetupCmdQueryGetPayment adds all the flags needed for MakeQueryGetPayment.

func SetupCmdQueryGetPaymentsWithSource added in v1.18.0

func SetupCmdQueryGetPaymentsWithSource(cmd *cobra.Command)

SetupCmdQueryGetPaymentsWithSource adds all the flags needed for MakeQueryGetPaymentsWithSource.

func SetupCmdQueryGetPaymentsWithTarget added in v1.18.0

func SetupCmdQueryGetPaymentsWithTarget(cmd *cobra.Command)

SetupCmdQueryGetPaymentsWithTarget adds all the flags needed for MakeQueryGetPaymentsWithTarget.

func SetupCmdQueryOrderFeeCalc added in v1.17.1

func SetupCmdQueryOrderFeeCalc(cmd *cobra.Command)

SetupCmdQueryOrderFeeCalc adds all the flags needed for MakeQueryOrderFeeCalc.

func SetupCmdQueryParams added in v1.17.1

func SetupCmdQueryParams(cmd *cobra.Command)

SetupCmdQueryParams adds all the flags needed for MakeQueryParams.

func SetupCmdQueryPaymentFeeCalc added in v1.18.0

func SetupCmdQueryPaymentFeeCalc(cmd *cobra.Command)

SetupCmdQueryPaymentFeeCalc adds all the flags needed for MakeQueryPaymentFeeCalc.

func SetupCmdQueryValidateCreateMarket added in v1.17.1

func SetupCmdQueryValidateCreateMarket(cmd *cobra.Command)

SetupCmdQueryValidateCreateMarket adds all the flags needed for MakeQueryValidateCreateMarket.

func SetupCmdQueryValidateManageFees added in v1.17.1

func SetupCmdQueryValidateManageFees(cmd *cobra.Command)

SetupCmdQueryValidateManageFees adds all the flags needed for MakeQueryValidateManageFees.

func SetupCmdQueryValidateMarket added in v1.17.1

func SetupCmdQueryValidateMarket(cmd *cobra.Command)

SetupCmdQueryValidateMarket adds all the flags needed for MakeQueryValidateMarket.

func SetupCmdTxAcceptPayment added in v1.18.0

func SetupCmdTxAcceptPayment(cmd *cobra.Command)

SetupCmdTxAcceptPayment adds all the flags needed for MakeMsgAcceptPayment.

func SetupCmdTxCancelOrder added in v1.17.1

func SetupCmdTxCancelOrder(cmd *cobra.Command)

SetupCmdTxCancelOrder adds all the flags needed for the MakeMsgCancelOrder.

func SetupCmdTxCancelPayments added in v1.18.0

func SetupCmdTxCancelPayments(cmd *cobra.Command)

SetupCmdTxCancelPayments adds all the flags needed for MakeMsgCancelPayments.

func SetupCmdTxChangePaymentTarget added in v1.18.0

func SetupCmdTxChangePaymentTarget(cmd *cobra.Command)

SetupCmdTxChangePaymentTarget adds all the flags needed for MakeMsgChangePaymentTarget.

func SetupCmdTxCommitFunds added in v1.18.0

func SetupCmdTxCommitFunds(cmd *cobra.Command)

SetupCmdTxCommitFunds adds all the flags needed for the MakeMsgCommitFunds.

func SetupCmdTxCreateAsk added in v1.17.1

func SetupCmdTxCreateAsk(cmd *cobra.Command)

SetupCmdTxCreateAsk adds all the flags needed for MakeMsgCreateAsk.

func SetupCmdTxCreateBid added in v1.17.1

func SetupCmdTxCreateBid(cmd *cobra.Command)

SetupCmdTxCreateBid adds all the flags needed for MakeMsgCreateBid.

func SetupCmdTxCreatePayment added in v1.18.0

func SetupCmdTxCreatePayment(cmd *cobra.Command)

SetupCmdTxCreatePayment adds all the flags needed for MakeMsgCreatePayment.

func SetupCmdTxFillAsks added in v1.17.1

func SetupCmdTxFillAsks(cmd *cobra.Command)

SetupCmdTxFillAsks adds all the flags needed for MakeMsgFillAsks.

func SetupCmdTxFillBids added in v1.17.1

func SetupCmdTxFillBids(cmd *cobra.Command)

SetupCmdTxFillBids adds all the flags needed for MakeMsgFillBids.

func SetupCmdTxGovCloseMarket added in v1.18.0

func SetupCmdTxGovCloseMarket(cmd *cobra.Command)

SetupCmdTxGovCloseMarket adds all the flags needed for MakeMsgGovCloseMarket.

func SetupCmdTxGovCreateMarket added in v1.17.1

func SetupCmdTxGovCreateMarket(cmd *cobra.Command)

SetupCmdTxGovCreateMarket adds all the flags needed for MakeMsgGovCreateMarket.

func SetupCmdTxGovManageFees added in v1.17.1

func SetupCmdTxGovManageFees(cmd *cobra.Command)

SetupCmdTxGovManageFees adds all the flags needed for MakeMsgGovManageFees.

func SetupCmdTxGovUpdateParams added in v1.17.1

func SetupCmdTxGovUpdateParams(cmd *cobra.Command)

SetupCmdTxGovUpdateParams adds all the flags needed for MakeMsgGovUpdateParams.

func SetupCmdTxMarketCommitmentSettle added in v1.18.0

func SetupCmdTxMarketCommitmentSettle(cmd *cobra.Command)

SetupCmdTxMarketCommitmentSettle adds all the flags needed for MakeMsgMarketCommitmentSettle.

func SetupCmdTxMarketManagePermissions added in v1.17.1

func SetupCmdTxMarketManagePermissions(cmd *cobra.Command)

SetupCmdTxMarketManagePermissions adds all the flags needed for MakeMsgMarketManagePermissions.

func SetupCmdTxMarketManageReqAttrs added in v1.17.1

func SetupCmdTxMarketManageReqAttrs(cmd *cobra.Command)

SetupCmdTxMarketManageReqAttrs adds all the flags needed for MakeMsgMarketManageReqAttrs.

func SetupCmdTxMarketReleaseCommitments added in v1.18.0

func SetupCmdTxMarketReleaseCommitments(cmd *cobra.Command)

SetupCmdTxMarketReleaseCommitments adds all the flags needed for MakeMsgMarketReleaseCommitments.

func SetupCmdTxMarketSetOrderExternalID added in v1.17.1

func SetupCmdTxMarketSetOrderExternalID(cmd *cobra.Command)

SetupCmdTxMarketSetOrderExternalID adds all the flags needed for MakeMsgMarketSetOrderExternalID.

func SetupCmdTxMarketSettle added in v1.17.1

func SetupCmdTxMarketSettle(cmd *cobra.Command)

SetupCmdTxMarketSettle adds all the flags needed for MakeMsgMarketSettle.

func SetupCmdTxMarketUpdateAcceptingCommitments added in v1.18.0

func SetupCmdTxMarketUpdateAcceptingCommitments(cmd *cobra.Command)

SetupCmdTxMarketUpdateAcceptingCommitments adds all the flags needed for MakeMarketUpdateAcceptingCommitmentsOrders.

func SetupCmdTxMarketUpdateAcceptingOrders added in v1.18.0

func SetupCmdTxMarketUpdateAcceptingOrders(cmd *cobra.Command)

SetupCmdTxMarketUpdateAcceptingOrders adds all the flags needed for MakeMsgMarketUpdateAcceptingOrders.

func SetupCmdTxMarketUpdateDetails added in v1.17.1

func SetupCmdTxMarketUpdateDetails(cmd *cobra.Command)

SetupCmdTxMarketUpdateDetails adds all the flags needed for MakeMsgMarketUpdateDetails.

func SetupCmdTxMarketUpdateIntermediaryDenom added in v1.18.0

func SetupCmdTxMarketUpdateIntermediaryDenom(cmd *cobra.Command)

SetupCmdTxMarketUpdateIntermediaryDenom adds all the flags needed for MakeMsgMarketUpdateIntermediaryDenom.

func SetupCmdTxMarketUpdateUserSettle added in v1.17.1

func SetupCmdTxMarketUpdateUserSettle(cmd *cobra.Command)

SetupCmdTxMarketUpdateUserSettle adds all the flags needed for MakeMsgMarketUpdateUserSettle.

func SetupCmdTxMarketWithdraw added in v1.17.1

func SetupCmdTxMarketWithdraw(cmd *cobra.Command)

SetupCmdTxMarketWithdraw adds all the flags needed for MakeMsgMarketWithdraw.

func SetupCmdTxRejectPayment added in v1.18.0

func SetupCmdTxRejectPayment(cmd *cobra.Command)

SetupCmdTxRejectPayment adds all the flags needed for MakeMsgRejectPayment.

func SetupCmdTxRejectPayments added in v1.18.0

func SetupCmdTxRejectPayments(cmd *cobra.Command)

SetupCmdTxRejectPayments adds all the flags needed for MakeMsgRejectPayments.

func SimplePerms added in v1.17.1

func SimplePerms() string

SimplePerms returns a string containing all the Permission.SimpleString() values.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL