Documentation ¶
Index ¶
- Constants
- Variables
- func AddFlagsAdmin(cmd *cobra.Command)
- func AddFlagsAsksBidsBools(cmd *cobra.Command)
- func AddFlagsEnableDisable(cmd *cobra.Command, name string)
- func AddFlagsMarketDetails(cmd *cobra.Command)
- func AddQueryExample(cmd *cobra.Command, args ...string)
- func AddUseArgs(cmd *cobra.Command, args ...string)
- func AddUseDetails(cmd *cobra.Command, sections ...string)
- func CmdQuery() *cobra.Command
- func CmdQueryGetAllMarkets() *cobra.Command
- func CmdQueryGetAllOrders() *cobra.Command
- func CmdQueryGetAssetOrders() *cobra.Command
- func CmdQueryGetMarket() *cobra.Command
- func CmdQueryGetMarketOrders() *cobra.Command
- func CmdQueryGetOrder() *cobra.Command
- func CmdQueryGetOrderByExternalID() *cobra.Command
- func CmdQueryGetOwnerOrders() *cobra.Command
- func CmdQueryOrderFeeCalc() *cobra.Command
- func CmdQueryParams() *cobra.Command
- func CmdQueryValidateCreateMarket() *cobra.Command
- func CmdQueryValidateManageFees() *cobra.Command
- func CmdQueryValidateMarket() *cobra.Command
- func CmdTx() *cobra.Command
- func CmdTxCancelOrder() *cobra.Command
- func CmdTxCreateAsk() *cobra.Command
- func CmdTxCreateBid() *cobra.Command
- func CmdTxFillAsks() *cobra.Command
- func CmdTxFillBids() *cobra.Command
- func CmdTxGovCreateMarket() *cobra.Command
- func CmdTxGovManageFees() *cobra.Command
- func CmdTxGovUpdateParams() *cobra.Command
- func CmdTxMarketManagePermissions() *cobra.Command
- func CmdTxMarketManageReqAttrs() *cobra.Command
- func CmdTxMarketSetOrderExternalID() *cobra.Command
- func CmdTxMarketSettle() *cobra.Command
- func CmdTxMarketUpdateDetails() *cobra.Command
- func CmdTxMarketUpdateEnabled() *cobra.Command
- func CmdTxMarketUpdateUserSettle() *cobra.Command
- func CmdTxMarketWithdraw() *cobra.Command
- func MakeMsgCancelOrder(clientCtx client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.MsgCancelOrderRequest, error)
- func MakeMsgCreateAsk(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgCreateAskRequest, error)
- func MakeMsgCreateBid(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgCreateBidRequest, error)
- func MakeMsgFillAsks(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgFillAsksRequest, error)
- func MakeMsgFillBids(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgFillBidsRequest, error)
- func MakeMsgGovCreateMarket(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgGovCreateMarketRequest, error)
- func MakeMsgGovManageFees(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgGovManageFeesRequest, error)
- func MakeMsgGovUpdateParams(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgGovUpdateParamsRequest, error)
- func MakeMsgMarketManagePermissions(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketManagePermissionsRequest, error)
- func MakeMsgMarketManageReqAttrs(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketManageReqAttrsRequest, error)
- func MakeMsgMarketSetOrderExternalID(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketSetOrderExternalIDRequest, error)
- func MakeMsgMarketSettle(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketSettleRequest, error)
- func MakeMsgMarketUpdateDetails(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketUpdateDetailsRequest, error)
- func MakeMsgMarketUpdateEnabled(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketUpdateEnabledRequest, error)
- func MakeMsgMarketUpdateUserSettle(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketUpdateUserSettleRequest, error)
- func MakeMsgMarketWithdraw(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketWithdrawRequest, error)
- func MakeQueryGetAllMarkets(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryGetAllMarketsRequest, error)
- func MakeQueryGetAllOrders(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryGetAllOrdersRequest, error)
- func MakeQueryGetAssetOrders(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetAssetOrdersRequest, error)
- func MakeQueryGetMarket(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetMarketRequest, error)
- func MakeQueryGetMarketOrders(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetMarketOrdersRequest, error)
- func MakeQueryGetOrder(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetOrderRequest, error)
- func MakeQueryGetOrderByExternalID(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryGetOrderByExternalIDRequest, error)
- func MakeQueryGetOwnerOrders(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryGetOwnerOrdersRequest, error)
- func MakeQueryOrderFeeCalc(_ client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.QueryOrderFeeCalcRequest, error)
- func MakeQueryParams(_ client.Context, _ *pflag.FlagSet, _ []string) (*exchange.QueryParamsRequest, error)
- func MakeQueryValidateCreateMarket(clientCtx client.Context, flags *pflag.FlagSet, args []string) (*exchange.QueryValidateCreateMarketRequest, error)
- func MakeQueryValidateManageFees(clientCtx client.Context, flags *pflag.FlagSet, args []string) (*exchange.QueryValidateManageFeesRequest, error)
- func MakeQueryValidateMarket(_ client.Context, flagSet *pflag.FlagSet, args []string) (*exchange.QueryValidateMarketRequest, error)
- func MarkFlagsRequired(cmd *cobra.Command, names ...string)
- func OptFlagUse(name string, opt string) string
- func ParseAccessGrant(val string) (*exchange.AccessGrant, error)
- func ParseAccessGrants(vals []string) ([]exchange.AccessGrant, error)
- func ParseCoins(coinsStr string) (sdk.Coins, error)
- func ParseFeeRatios(vals []string) ([]exchange.FeeRatio, error)
- func ParseFlatFeeOptions(vals []string) ([]sdk.Coin, error)
- func ParseSplit(val string) (*exchange.DenomSplit, error)
- func ParseSplits(vals []string) ([]exchange.DenomSplit, error)
- func ProposalFileDesc(msgType sdk.Msg) string
- func ReadAccessGrantsFlag(flagSet *pflag.FlagSet, name string, def []exchange.AccessGrant) ([]exchange.AccessGrant, error)
- func ReadAddrFlagOrFrom(clientCtx client.Context, flagSet *pflag.FlagSet, name string) (string, error)
- func ReadCoinFlag(flagSet *pflag.FlagSet, name string) (*sdk.Coin, error)
- func ReadCoinsFlag(flagSet *pflag.FlagSet, name string) (sdk.Coins, error)
- func ReadFeeRatiosFlag(flagSet *pflag.FlagSet, name string, def []exchange.FeeRatio) ([]exchange.FeeRatio, error)
- func ReadFlagAuthority(flagSet *pflag.FlagSet) (string, error)
- func ReadFlagAuthorityOrDefault(flagSet *pflag.FlagSet, def string) (string, error)
- func ReadFlagBoolOrDefault(flagSet *pflag.FlagSet, name string, def bool) (bool, error)
- func ReadFlagMarketOrArg(flagSet *pflag.FlagSet, args []string) (uint32, error)
- func ReadFlagOrderOrArg(flagSet *pflag.FlagSet, args []string) (uint64, error)
- func ReadFlagStringOrDefault(flagSet *pflag.FlagSet, name string, def string) (string, error)
- func ReadFlagStringSliceOrDefault(flagSet *pflag.FlagSet, name string, def []string) ([]string, error)
- func ReadFlagUint32OrDefault(flagSet *pflag.FlagSet, name string, def uint32) (uint32, error)
- func ReadFlagsAdminOrFrom(clientCtx client.Context, flagSet *pflag.FlagSet) (string, error)
- func ReadFlagsAsksBidsOpt(flagSet *pflag.FlagSet) (string, error)
- func ReadFlagsEnableDisable(flagSet *pflag.FlagSet) (bool, error)
- func ReadFlagsMarketDetails(flagSet *pflag.FlagSet, def exchange.MarketDetails) (exchange.MarketDetails, error)
- func ReadFlatFeeFlag(flagSet *pflag.FlagSet, name string, def []sdk.Coin) ([]sdk.Coin, error)
- func ReadMsgGovCreateMarketRequestFromProposalFlag(clientCtx client.Context, flagSet *pflag.FlagSet) (*exchange.MsgGovCreateMarketRequest, error)
- func ReadMsgGovManageFeesRequestFromProposalFlag(clientCtx client.Context, flagSet *pflag.FlagSet) (*exchange.MsgGovManageFeesRequest, error)
- func ReadOrderIDsFlag(flagSet *pflag.FlagSet, name string) ([]uint64, error)
- func ReadProposalFlag(clientCtx client.Context, flagSet *pflag.FlagSet) (string, []*codectypes.Any, error)
- func ReadReqCoinFlag(flagSet *pflag.FlagSet, name string) (sdk.Coin, error)
- func ReadSplitsFlag(flagSet *pflag.FlagSet, name string) ([]exchange.DenomSplit, error)
- func ReadStringFlagOrArg(flagSet *pflag.FlagSet, args []string, flagName, varName string) (string, error)
- func ReqFlagUse(name string, opt string) string
- func ReqSignerDesc(name string) string
- func ReqSignerUse(name string) string
- func SetupCmdQueryGetAllMarkets(cmd *cobra.Command)
- func SetupCmdQueryGetAllOrders(cmd *cobra.Command)
- func SetupCmdQueryGetAssetOrders(cmd *cobra.Command)
- func SetupCmdQueryGetMarket(cmd *cobra.Command)
- func SetupCmdQueryGetMarketOrders(cmd *cobra.Command)
- func SetupCmdQueryGetOrder(cmd *cobra.Command)
- func SetupCmdQueryGetOrderByExternalID(cmd *cobra.Command)
- func SetupCmdQueryGetOwnerOrders(cmd *cobra.Command)
- func SetupCmdQueryOrderFeeCalc(cmd *cobra.Command)
- func SetupCmdQueryParams(cmd *cobra.Command)
- func SetupCmdQueryValidateCreateMarket(cmd *cobra.Command)
- func SetupCmdQueryValidateManageFees(cmd *cobra.Command)
- func SetupCmdQueryValidateMarket(cmd *cobra.Command)
- func SetupCmdTxCancelOrder(cmd *cobra.Command)
- func SetupCmdTxCreateAsk(cmd *cobra.Command)
- func SetupCmdTxCreateBid(cmd *cobra.Command)
- func SetupCmdTxFillAsks(cmd *cobra.Command)
- func SetupCmdTxFillBids(cmd *cobra.Command)
- func SetupCmdTxGovCreateMarket(cmd *cobra.Command)
- func SetupCmdTxGovManageFees(cmd *cobra.Command)
- func SetupCmdTxGovUpdateParams(cmd *cobra.Command)
- func SetupCmdTxMarketManagePermissions(cmd *cobra.Command)
- func SetupCmdTxMarketManageReqAttrs(cmd *cobra.Command)
- func SetupCmdTxMarketSetOrderExternalID(cmd *cobra.Command)
- func SetupCmdTxMarketSettle(cmd *cobra.Command)
- func SetupCmdTxMarketUpdateDetails(cmd *cobra.Command)
- func SetupCmdTxMarketUpdateEnabled(cmd *cobra.Command)
- func SetupCmdTxMarketUpdateUserSettle(cmd *cobra.Command)
- func SetupCmdTxMarketWithdraw(cmd *cobra.Command)
- func SimplePerms() string
Constants ¶
const ( FlagAcceptingOrders = "accepting-orders" FlagAccessGrants = "access-grants" 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" FlagBuyer = "buyer" FlagBuyerFlat = "buyer-flat" FlagBuyerFlatAdd = "buyer-flat-add" FlagBuyerFlatRemove = "buyer-flat-remove" FlagBuyerRatios = "buyer-ratios" FlagBuyerRatiosAdd = "buyer-ratios-add" FlagBuyerRatiosRemove = "buyer-ratios-remove" FlagCreateAsk = "create-ask" FlagCreateBid = "create-bid" FlagCreationFee = "creation-fee" FlagDefault = "default" FlagDenom = "denom" FlagDescription = "description" FlagDisable = "disable" FlagEnable = "enable" FlagExternalID = "external-id" FlagGrant = "grant" FlagIcon = "icon" FlagMarket = "market" FlagName = "name" FlagOrder = "order" FlagOwner = "owner" FlagPartial = "partial" FlagPrice = "price" FlagProposal = "proposal" FlagReqAttrAsk = "req-attr-ask" FlagReqAttrBid = "req-attr-bid" 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" FlagSigner = "signer" FlagSplit = "split" FlagTo = "to" FlagURL = "url" )
Variables ¶
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_________") )
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) )
Functions ¶
func AddFlagsAdmin ¶ added in v1.17.1
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 AddFlagsAsksBidsBools ¶ added in v1.17.1
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
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
AddFlagsMarketDetails adds all the flags needed for ReadFlagsMarketDetails.
func AddQueryExample ¶ added in v1.17.1
AddQueryExample appends an example to a query command's examples.
func AddUseArgs ¶ added in v1.17.1
AddUseArgs adds the given strings to the cmd's Use, separated by a space.
func AddUseDetails ¶ added in v1.17.1
AddUseDetails appends each provided section to the Use field with an empty line between them.
func CmdQueryGetAllMarkets ¶ added in v1.17.1
CmdQueryGetAllMarkets creates the all-markets sub-command for the exchange query command.
func CmdQueryGetAllOrders ¶ added in v1.17.1
CmdQueryGetAllOrders creates the all-orders sub-command for the exchange query command.
func CmdQueryGetAssetOrders ¶ added in v1.17.1
CmdQueryGetAssetOrders creates the asset-orders sub-command for the exchange query command.
func CmdQueryGetMarket ¶ added in v1.17.1
CmdQueryGetMarket creates the market sub-command for the exchange query command.
func CmdQueryGetMarketOrders ¶ added in v1.17.1
CmdQueryGetMarketOrders creates the market-orders sub-command for the exchange query command.
func CmdQueryGetOrder ¶ added in v1.17.1
CmdQueryGetOrder creates the order sub-command for the exchange query command.
func CmdQueryGetOrderByExternalID ¶ added in v1.17.1
CmdQueryGetOrderByExternalID creates the order-by-external-id sub-command for the exchange query command.
func CmdQueryGetOwnerOrders ¶ added in v1.17.1
CmdQueryGetOwnerOrders creates the owner-orders sub-command for the exchange query command.
func CmdQueryOrderFeeCalc ¶ added in v1.17.1
CmdQueryOrderFeeCalc creates the order-fee-calc sub-command for the exchange query command.
func CmdQueryParams ¶ added in v1.17.1
CmdQueryParams creates the params sub-command for the exchange query command.
func CmdQueryValidateCreateMarket ¶ added in v1.17.1
CmdQueryValidateCreateMarket creates the validate-create-market sub-command for the exchange query command.
func CmdQueryValidateManageFees ¶ added in v1.17.1
CmdQueryValidateManageFees creates the validate-manage-fees sub-command for the exchange query command.
func CmdQueryValidateMarket ¶ added in v1.17.1
CmdQueryValidateMarket creates the validate-market sub-command for the exchange query command.
func CmdTxCancelOrder ¶ added in v1.17.1
CmdTxCancelOrder creates the cancel-order sub-command for the exchange tx command.
func CmdTxCreateAsk ¶ added in v1.17.1
CmdTxCreateAsk creates the create-ask sub-command for the exchange tx command.
func CmdTxCreateBid ¶ added in v1.17.1
CmdTxCreateBid creates the create-bid sub-command for the exchange tx command.
func CmdTxFillAsks ¶ added in v1.17.1
CmdTxFillAsks creates the fill-asks sub-command for the exchange tx command.
func CmdTxFillBids ¶ added in v1.17.1
CmdTxFillBids creates the fill-bids sub-command for the exchange tx command.
func CmdTxGovCreateMarket ¶ added in v1.17.1
CmdTxGovCreateMarket creates the gov-create-market sub-command for the exchange tx command.
func CmdTxGovManageFees ¶ added in v1.17.1
CmdTxGovManageFees creates the gov-manage-fees sub-command for the exchange tx command.
func CmdTxGovUpdateParams ¶ added in v1.17.1
CmdTxGovUpdateParams creates the gov-update-params sub-command for the exchange tx command.
func CmdTxMarketManagePermissions ¶ added in v1.17.1
CmdTxMarketManagePermissions creates the market-permissions sub-command for the exchange tx command.
func CmdTxMarketManageReqAttrs ¶ added in v1.17.1
CmdTxMarketManageReqAttrs creates the market-req-attrs sub-command for the exchange tx command.
func CmdTxMarketSetOrderExternalID ¶ added in v1.17.1
CmdTxMarketSetOrderExternalID creates the market-set-external-id sub-command for the exchange tx command.
func CmdTxMarketSettle ¶ added in v1.17.1
CmdTxMarketSettle creates the market-settle sub-command for the exchange tx command.
func CmdTxMarketUpdateDetails ¶ added in v1.17.1
CmdTxMarketUpdateDetails creates the market-details sub-command for the exchange tx command.
func CmdTxMarketUpdateEnabled ¶ added in v1.17.1
CmdTxMarketUpdateEnabled creates the market-enabled sub-command for the exchange tx command.
func CmdTxMarketUpdateUserSettle ¶ added in v1.17.1
CmdTxMarketUpdateUserSettle creates the market-user-settle sub-command for the exchange tx command.
func CmdTxMarketWithdraw ¶ added in v1.17.1
CmdTxMarketWithdraw creates the market-withdraw sub-command for the exchange tx command.
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 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 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 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 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 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 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 MakeMsgMarketUpdateEnabled ¶ added in v1.17.1
func MakeMsgMarketUpdateEnabled(clientCtx client.Context, flagSet *pflag.FlagSet, _ []string) (*exchange.MsgMarketUpdateEnabledRequest, error)
MakeMsgMarketUpdateEnabled reads all the SetupCmdTxMarketUpdateEnabled 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 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 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 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 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 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 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
MarkFlagsRequired marks the provided flags as required and panics if there's a problem.
func OptFlagUse ¶ added in v1.17.1
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 ParseCoins ¶ added in v1.17.1
ParseCoins parses a string into sdk.Coins.
func ParseFeeRatios ¶ added in v1.17.1
ParseFeeRatios parses a FeeRatio from each of the provided vals.
func ParseFlatFeeOptions ¶ added in v1.17.1
ParseFlatFeeOptions parses each of the provided vals to sdk.Coin.
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
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 ReadCoinFlag ¶ added in v1.17.1
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
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 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 ReadFlagAuthority ¶ added in v1.17.1
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
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
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
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 ReadFlagOrderOrArg ¶ added in v1.17.1
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
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
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
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 ReadFlagsAsksBidsOpt ¶ added in v1.17.1
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
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
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 ReadOrderIDsFlag ¶ added in v1.17.1
ReadOrderIDsFlag reads a UintSlice flag and converts it into a []uint64.
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
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 ReadSplitsFlag ¶ added in v1.17.1
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 ReqFlagUse ¶ added in v1.17.1
ReqFlagUse returns the string "--name <opt>" if an opt is provided, or just "--name" if not.
func ReqSignerDesc ¶ added in v1.17.1
ReqSignerDesc returns a description of how the --<name> flag is used and sort of required.
func ReqSignerUse ¶ added in v1.17.1
ReqSignerUse is the Use string for a signer flag.
func SetupCmdQueryGetAllMarkets ¶ added in v1.17.1
SetupCmdQueryGetAllMarkets adds all the flags needed for MakeQueryGetAllMarkets.
func SetupCmdQueryGetAllOrders ¶ added in v1.17.1
SetupCmdQueryGetAllOrders adds all the flags needed for MakeQueryGetAllOrders.
func SetupCmdQueryGetAssetOrders ¶ added in v1.17.1
SetupCmdQueryGetAssetOrders adds all the flags needed for MakeQueryGetAssetOrders.
func SetupCmdQueryGetMarket ¶ added in v1.17.1
SetupCmdQueryGetMarket adds all the flags needed for MakeQueryGetMarket.
func SetupCmdQueryGetMarketOrders ¶ added in v1.17.1
SetupCmdQueryGetMarketOrders adds all the flags needed for MakeQueryGetMarketOrders.
func SetupCmdQueryGetOrder ¶ added in v1.17.1
SetupCmdQueryGetOrder adds all the flags needed for MakeQueryGetOrder.
func SetupCmdQueryGetOrderByExternalID ¶ added in v1.17.1
SetupCmdQueryGetOrderByExternalID adds all the flags needed for MakeQueryGetOrderByExternalID.
func SetupCmdQueryGetOwnerOrders ¶ added in v1.17.1
SetupCmdQueryGetOwnerOrders adds all the flags needed for MakeQueryGetOwnerOrders.
func SetupCmdQueryOrderFeeCalc ¶ added in v1.17.1
SetupCmdQueryOrderFeeCalc adds all the flags needed for MakeQueryOrderFeeCalc.
func SetupCmdQueryParams ¶ added in v1.17.1
SetupCmdQueryParams adds all the flags needed for MakeQueryParams.
func SetupCmdQueryValidateCreateMarket ¶ added in v1.17.1
SetupCmdQueryValidateCreateMarket adds all the flags needed for MakeQueryValidateCreateMarket.
func SetupCmdQueryValidateManageFees ¶ added in v1.17.1
SetupCmdQueryValidateManageFees adds all the flags needed for MakeQueryValidateManageFees.
func SetupCmdQueryValidateMarket ¶ added in v1.17.1
SetupCmdQueryValidateMarket adds all the flags needed for MakeQueryValidateMarket.
func SetupCmdTxCancelOrder ¶ added in v1.17.1
SetupCmdTxCancelOrder adds all the flags needed for the MakeMsgCancelOrder.
func SetupCmdTxCreateAsk ¶ added in v1.17.1
SetupCmdTxCreateAsk adds all the flags needed for MakeMsgCreateAsk.
func SetupCmdTxCreateBid ¶ added in v1.17.1
SetupCmdTxCreateBid adds all the flags needed for MakeMsgCreateBid.
func SetupCmdTxFillAsks ¶ added in v1.17.1
SetupCmdTxFillAsks adds all the flags needed for MakeMsgFillAsks.
func SetupCmdTxFillBids ¶ added in v1.17.1
SetupCmdTxFillBids adds all the flags needed for MakeMsgFillBids.
func SetupCmdTxGovCreateMarket ¶ added in v1.17.1
SetupCmdTxGovCreateMarket adds all the flags needed for MakeMsgGovCreateMarket.
func SetupCmdTxGovManageFees ¶ added in v1.17.1
SetupCmdTxGovManageFees adds all the flags needed for MakeMsgGovManageFees.
func SetupCmdTxGovUpdateParams ¶ added in v1.17.1
SetupCmdTxGovUpdateParams adds all the flags needed for MakeMsgGovUpdateParams.
func SetupCmdTxMarketManagePermissions ¶ added in v1.17.1
SetupCmdTxMarketManagePermissions adds all the flags needed for MakeMsgMarketManagePermissions.
func SetupCmdTxMarketManageReqAttrs ¶ added in v1.17.1
SetupCmdTxMarketManageReqAttrs adds all the flags needed for MakeMsgMarketManageReqAttrs.
func SetupCmdTxMarketSetOrderExternalID ¶ added in v1.17.1
SetupCmdTxMarketSetOrderExternalID adds all the flags needed for MakeMsgMarketSetOrderExternalID.
func SetupCmdTxMarketSettle ¶ added in v1.17.1
SetupCmdTxMarketSettle adds all the flags needed for MakeMsgMarketSettle.
func SetupCmdTxMarketUpdateDetails ¶ added in v1.17.1
SetupCmdTxMarketUpdateDetails adds all the flags needed for MakeMsgMarketUpdateDetails.
func SetupCmdTxMarketUpdateEnabled ¶ added in v1.17.1
SetupCmdTxMarketUpdateEnabled adds all the flags needed for MakeMsgMarketUpdateEnabled.
func SetupCmdTxMarketUpdateUserSettle ¶ added in v1.17.1
SetupCmdTxMarketUpdateUserSettle adds all the flags needed for MakeMsgMarketUpdateUserSettle.
func SetupCmdTxMarketWithdraw ¶ added in v1.17.1
SetupCmdTxMarketWithdraw adds all the flags needed for MakeMsgMarketWithdraw.
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.