flags

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultGasAdjustment is applied to gas estimates to avoid tx execution
	// failures due to state changes that might occur between the tx simulation
	// and the actual run.
	DefaultGasAdjustment = constants.DefaultGasAdjustment
	GasFlagAuto          = constants.DefaultGas
	DefaultGasLimit      = 200000

	DefaultKeyringBackend = keyring.BackendOS

	// BroadcastSync defines a tx broadcasting mode where the client waits for
	// a CheckTx execution response only.
	BroadcastSync = "sync"
	// BroadcastAsync defines a tx broadcasting mode where the client returns
	// immediately.
	BroadcastAsync = "async"

	BroadcastBlock = "block"

	// SignModeDirect is the value of the --sign-mode flag for SIGN_MODE_DIRECT
	SignModeDirect = "direct"
	// SignModeLegacyAminoJSON is the value of the --sign-mode flag for SIGN_MODE_LEGACY_AMINO_JSON
	SignModeLegacyAminoJSON = "amino-json"
	// SignModeDirectAux is the value of the --sign-mode flag for SIGN_MODE_DIRECT_AUX
	SignModeDirectAux = "direct-aux"
	// SignModeEIP191 is the value of the --sign-mode flag for SIGN_MODE_EIP_191
	SignModeEIP191 = "eip-191"
)
View Source
const (
	FlagGenesisTime = "genesis-time"
	FlagGenTxDir    = "gentx-dir"
	FlagRecover     = "recover"
	// FlagDefaultBondDenom defines the default denom to use in the genesis file.
	FlagDefaultBondDenom = "default-denom"
	// FlagConsensusKeyAlgo defines the algorithm to use for the consensus signing key.
	FlagConsensusKeyAlgo = "consensus-key-algo"

	FlagDenom                     = "denom"
	FlagVestingStart              = "vesting-start-time"
	FlagVestingEnd                = "vesting-end-time"
	FlagVestingAmt                = "vesting-amount"
	FlagAppendMode                = "append"
	FlagEvents                    = "events"
	FlagType                      = "type"
	FlagMultisig                  = "multisig"
	FlagSkipSignatureVerification = "skip-signature-verification"
	FlagOverwrite                 = "overwrite"
	FlagSigOnly                   = "signature-only"
	FlagAmino                     = "amino"
	FlagNoAutoIncrement           = "no-auto-increment"
	FlagAppend                    = "append"
	FlagTitle                     = "title"
	FlagMetadata                  = "metadata"
	FlagSummary                   = "summary"
	FlagExpedited                 = "expedited"
	FlagNoValidate                = "no-validate"
	FlagDaemonName                = "daemon-name"
	FlagPeriod                    = "period"
	FlagPeriodLimit               = "period-limit"
	FlagAllowedMsgs               = "allowed-messages"
	FlagMsgType                   = "msg-type"
	FlagAllowedValidators         = "allowed-validators"
	FlagDenyValidators            = "deny-validators"
	FlagAllowList                 = "allow-list"
	FlagStatus                    = "status"
	FlagState                     = "state"
	FlagOwner                     = "owner"
	FlagDSeq                      = "dseq"
	FlagGSeq                      = "gseq"
	FlagOSeq                      = "oseq"
	FlagProvider                  = "provider"
	FlagClosedReason              = "reason"
	FlagSerial                    = "serial"
	FlagPrice                     = "price"
	FlagDeposit                   = "deposit"
	FlagDepositSources            = "deposit-sources"
	FlagExpiration                = "expiration"
	FlagSpendLimit                = "spend-limit"
	FlagScope                     = "scope"
	FlagHome                      = cmcli.HomeFlag
	FlagKeyringDir                = "keyring-dir"
	FlagUseLedger                 = "ledger"
	FlagChainID                   = "chain-id"
	FlagNode                      = "node"
	FlagGRPC                      = "grpc-addr"
	FlagGRPCInsecure              = "grpc-insecure"
	FlagHeight                    = "height"
	FlagGasAdjustment             = "gas-adjustment"
	FlagFrom                      = "from"
	FlagName                      = "name"
	FlagAccountNumber             = "account-number"
	FlagSequence                  = "sequence"
	FlagNote                      = "note"
	FlagFees                      = "fees"
	FlagGas                       = "gas"
	FlagGasPrices                 = "gas-prices"
	FlagBroadcastMode             = "broadcast-mode"
	FlagDryRun                    = "dry-run"
	FlagGenerateOnly              = "generate-only"
	FlagOffline                   = "offline"
	FlagModulesToExport           = "modules-to-export"
	FlagOutputDocument            = "output-document" // inspired by wget -O
	FlagForZeroHeight             = "for-zero-height"
	FlagJailAllowedAddrs          = "jail-allowed-addrs"
	FlagSkipConfirmation          = "yes"
	FlagProve                     = "prove"
	FlagKeyringBackend            = "keyring-backend"
	FlagPage                      = "page"
	FlagLimit                     = "limit"
	FlagSignMode                  = "sign-mode"
	FlagPageKey                   = "page-key"
	FlagOffset                    = "offset"
	FlagCountTotal                = "count-total"
	FlagTimeoutHeight             = "timeout-height"
	FlagKeyType                   = "key-type"
	FlagFeePayer                  = "fee-payer"
	FlagFeeGranter                = "fee-granter"
	FlagReverse                   = "reverse"
	FlagTip                       = "tip"
	FlagAux                       = "aux"
	FlagInitHeight                = "initial-height"
	FlagDelayed                   = "delayed"
	FlagSkipRPCInit               = "skip-rpc-init"
	// FlagOutput is the flag to set the output format.
	// This differs from FlagOutputDocument that is used to set the output file.
	FlagOutput = cmcli.OutputFlag

	// OutputPretty is the value for --output that renders human-friendly pretty output.
	OutputPretty = "pretty"
	// OutputJSON is the value for --output that renders machine-readable JSON.
	OutputJSON = "json"
	// OutputYAML is the value for --output that renders machine-readable YAML.
	OutputYAML = "yaml"
	FlagSplit  = "split"

	TimeoutDuration  = "timeout-duration"
	FlagUnordered    = "unordered"
	FlagKeyAlgorithm = "algo"

	FlagLogLevel     = "log_level"
	FlagLogFormat    = "log_format"
	FlagLogNoColor   = "log_no_color"
	FlagLogColor     = "log_color"
	FlagLogTimestamp = "log_timestamp"
	FlagTrace        = "trace"

	FlagAddressValidator    = "validator"
	FlagAddressValidatorSrc = "addr-validator-source"
	FlagAddressValidatorDst = "addr-validator-dest"
	FlagPubKey              = "pubkey"
	FlagAmount              = "amount"
	FlagSharesAmount        = "shares-amount"
	FlagSharesFraction      = "shares-fraction"

	FlagMoniker         = "moniker"
	FlagEditMoniker     = "new-moniker"
	FlagIdentity        = "identity"
	FlagWebsite         = "website"
	FlagSecurityContact = "security-contact"
	FlagDetails         = "details"

	FlagCommission              = "commission"
	FlagCommissionRate          = "commission-rate"
	FlagCommissionMaxRate       = "commission-max-rate"
	FlagCommissionMaxChangeRate = "commission-max-change-rate"
	FlagMinSelfDelegation       = "min-self-delegation"

	FlagGenesisFormat = "genesis-format"
	FlagNodeID        = "node-id"
	FlagIP            = "ip"
	FlagP2PPort       = "p2p-port"

	FlagNoChecksumRequired = "no-checksum-required"
	FlagAuthority          = "authority"

	FlagModuleName = "module-name"

	FlagWithTendermint     = "with-tendermint"
	FlagWithComet          = "with-comet"
	FlagAddress            = "address"
	FlagTransport          = "transport"
	FlagTraceStore         = "trace-store"
	FlagCPUProfile         = "cpu-profile"
	FlagMinGasPrices       = "minimum-gas-prices"
	FlagQueryGasLimit      = "query-gas-limit"
	FlagHaltHeight         = "halt-height"
	FlagHaltTime           = "halt-time"
	FlagInterBlockCache    = "inter-block-cache"
	FlagUnsafeSkipUpgrades = "unsafe-skip-upgrades"
	FlagInvCheckPeriod     = "inv-check-period"

	FlagPruning             = "pruning"
	FlagPruningKeepRecent   = "pruning-keep-recent"
	FlagPruningInterval     = "pruning-interval"
	FlagIndexEvents         = "index-events"
	FlagMinRetainBlocks     = "min-retain-blocks"
	FlagIAVLCacheSize       = "iavl-cache-size"
	FlagDisableIAVLFastNode = "iavl-disable-fastnode"
	FlagIAVLLazyLoading     = "iavl-lazy-loading"
	FlagIAVLSyncPruning     = "iavl-sync-pruning"
	FlagShutdownGrace       = "shutdown-grace"

	FlagStateSyncSnapshotInterval   = "state-sync.snapshot-interval"
	FlagStateSyncSnapshotKeepRecent = "state-sync.snapshot-keep-recent"

	FlagAPIEnable             = "api.enable"
	FlagAPISwagger            = "api.swagger"
	FlagAPIAddress            = "api.address"
	FlagAPIMaxOpenConnections = "api.max-open-connections"
	FlagRPCReadTimeout        = "api.rpc-read-timeout"
	FlagRPCWriteTimeout       = "api.rpc-write-timeout"
	FlagRPCMaxBodyBytes       = "api.rpc-max-body-bytes"
	FlagAPIEnableUnsafeCORS   = "api.enabled-unsafe-cors"

	FlagGRPCOnly            = "grpc-only"
	FlagGRPCEnable          = "grpc.enable"
	FlagGRPCAddress         = "grpc.address"
	FlagGRPCWebEnable       = "grpc-web.enable"
	FlagGRPCSkipCheckHeader = "grpc.skip-check-header"

	FlagMempoolMaxTxs = "mempool.max-txs"

	FlagQuery   = "query"
	FlagOrderBy = "order_by"

	TypeHash   = "hash"
	TypeAccSeq = "acc_seq"
	TypeSig    = "signature"
	TypeHeight = "height"

	FlagTestnetRootDir = "testnet-rootdir"
	KeyTestnetRootDir  = FlagTestnetRootDir

	KeyIsTestnet             = "is-testnet"
	KeyTestnetConfig         = "testnet-config"
	KeyTestnetTriggerUpgrade = "testnet-trigger-upgrade"

	FlagLabel                     = "label"
	FlagSource                    = "code-source-url"
	FlagBuilder                   = "builder"
	FlagCodeHash                  = "code-hash"
	FlagAdmin                     = "admin"
	FlagNoAdmin                   = "no-admin"
	FlagFixMsg                    = "fix-msg"
	FlagRunAs                     = "run-as"
	FlagInstantiateByEverybody    = "instantiate-everybody"
	FlagInstantiateNobody         = "instantiate-nobody"
	FlagInstantiateByAddress      = "instantiate-only-address"
	FlagInstantiateByAnyOfAddress = "instantiate-anyof-addresses"
	FlagUnpinCode                 = "unpin-code"
	FlagAllowedMsgKeys            = "allow-msg-keys"
	FlagAllowedRawMsgs            = "allow-raw-msgs"
	FlagMaxCalls                  = "max-calls"
	FlagMaxFunds                  = "max-funds"
	FlagAllowAllMsgs              = "allow-all-messages"
	FlagNoTokenTransfer           = "no-token-transfer" //nolint: gosec
	FlagExpedite                  = "expedite"

	FlagAssetDenom = "asset-denom"
	FlagBaseDenom  = "base-denom"

	FlagTo      = "to"
	FlagToDenom = "to-denom"

	FlagWasmMemoryCacheSize        = "wasm.memory_cache_size"
	FlagWasmQueryGasLimit          = "wasm.query_gas_limit"
	FlagWasmSimulationGasLimit     = "wasm.simulation_gas_limit"
	FlagWasmSkipWasmVMVersionCheck = "wasm.skip_wasmvm_version_check" //nolint: gosec
)
View Source
const (
	OutputFormatJSON = "json"
	OutputFormatText = "text"
)

List of supported output formats

View Source
const (
	// FlagProposal only used for v1beta1 legacy proposals.
	FlagProposal = "proposal"
	// FlagDescription only used for v1beta1 legacy proposals.
	FlagDescription = "description"
	// FlagProposalType only used for v1beta1 legacy proposals.
	FlagProposalType = "type"
	// FlagUpgradeHeight only used for v1beta1 legacy proposals.
	FlagUpgradeHeight = "upgrade-height"
	// FlagUpgradeInfo only used for v1beta1 legacy proposals.
	FlagUpgradeInfo = "upgrade-info"
)

Variables

View Source
var LineBreak = &cobra.Command{Run: func(*cobra.Command, []string) {}}

LineBreak can be included in a command list to provide a blank line to help with readability

Functions

func AddBMELedgerFilterFlags

func AddBMELedgerFilterFlags(flags *pflag.FlagSet)

AddBMELedgerFilterFlags add flags to filter for ledger record list

func AddBidClosedReasonFlag

func AddBidClosedReasonFlag(flags *pflag.FlagSet)

AddBidClosedReasonFlag add the reason flag when the provider initiates lease close

func AddBidFilterFlags

func AddBidFilterFlags(flags *pflag.FlagSet)

AddBidFilterFlags add flags to filter for bid list

func AddBidIDFlags

func AddBidIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)

AddBidIDFlags add flags for bid

func AddDeploymentFilterFlags

func AddDeploymentFilterFlags(flags *pflag.FlagSet)

AddDeploymentFilterFlags add flags to filter for deployment list

func AddDeploymentIDFlags

func AddDeploymentIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)

AddDeploymentIDFlags add flags for deployment except for Owner when NoOwner is set

func AddDepositFlags

func AddDepositFlags(flags *pflag.FlagSet)

func AddDepositSourcesFlags

func AddDepositSourcesFlags(flags *pflag.FlagSet)

func AddGovPropFlagsToCmd

func AddGovPropFlagsToCmd(cmd *cobra.Command)

AddGovPropFlagsToCmd adds flags for defining MsgSubmitProposal fields.

See also ReadGovPropFlags.

func AddGroupIDFlags

func AddGroupIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)

AddGroupIDFlags add flags for Group

func AddKeyringFlags

func AddKeyringFlags(flags *pflag.FlagSet)

AddKeyringFlags sets common keyring flags

func AddLeaseFilterFlags

func AddLeaseFilterFlags(flags *pflag.FlagSet)

AddLeaseFilterFlags add flags to filter for a lease list

func AddLeaseIDFlags

func AddLeaseIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)

func AddOrderFilterFlags

func AddOrderFilterFlags(flags *pflag.FlagSet)

AddOrderFilterFlags add flags to filter for order list

func AddOrderIDFlags

func AddOrderIDFlags(flags *pflag.FlagSet, opts ...DeploymentIDOption)

AddOrderIDFlags add flags for order

func AddPaginationFlagsToCmd

func AddPaginationFlagsToCmd(cmd *cobra.Command, query string)

AddPaginationFlagsToCmd adds common pagination flags to cmd

func AddProviderFlag

func AddProviderFlag(flags *pflag.FlagSet)

AddProviderFlag add provider flag to command flags set

func AddQueryBidIDFlags

func AddQueryBidIDFlags(flags *pflag.FlagSet)

AddQueryBidIDFlags add flags for bid in query commands

func AddQueryFlagsToCmd

func AddQueryFlagsToCmd(cmd *cobra.Command)

AddQueryFlagsToCmd adds common flags to a module query command.

func AddTxFlagsToCmd

func AddTxFlagsToCmd(cmd *cobra.Command)

AddTxFlagsToCmd adds common flags to a module tx command.

func BMELedgerFiltersFromFlags

func BMELedgerFiltersFromFlags(flags *pflag.FlagSet) (types.LedgerRecordFilters, error)

BMELedgerFiltersFromFlags returns LedgerRecordFilters with given flags and error if occurred

func BidClosedReasonFromFlags

func BidClosedReasonFromFlags(flags *pflag.FlagSet) (mv1.LeaseClosedReason, error)

BidClosedReasonFromFlags returns LeaseClosedReason from flags or returns the default value if not set

func BidFiltersFromArg

func BidFiltersFromArg(arg string, defaultOwner string, byProvider bool) (mvbeta.BidFilters, error)

BidFiltersFromArg parses a partial bid/lease path with smart type detection.

Owner perspective (default): [owner/]dseq[/gseq[/oseq[/provider]]] Provider perspective (--by provider): [provider/]dseq[/gseq[/oseq[/owner]]]

When byProvider is true, the leading address is the provider and the trailing address is the owner. Otherwise the leading address is the owner and the trailing address is the provider.

A bare state keyword (open|active|lost|closed) as the sole argument is a state filter. State keywords do not combine with identity paths inside one argument; pass the state as the optional second positional instead.

func BidFiltersFromFlags

func BidFiltersFromFlags(flags *pflag.FlagSet) (mvbeta.BidFilters, error)

BidFiltersFromFlags returns BidFilters with given flags and error if occurred

func BidFiltersIsID

func BidFiltersIsID(f mvbeta.BidFilters) bool

BidFiltersIsID returns true when all ID fields in the bid filters are set, indicating the user wants a single record rather than a filtered list.

func BidIDFromFlags

func BidIDFromFlags(flags *pflag.FlagSet, opts ...MarketOption) (mv1.BidID, error)

BidIDFromFlags returns BidID with given flags and error if occurred Here provider value is taken from flags

func BidStateFromArg

func BidStateFromArg(arg string) (string, error)

BidStateFromArg validates a positional bid state keyword against the bid state vocabulary (open|active|lost|closed). It backs the optional second positional state argument of `query market bid` (SPEC §3.8).

func ClientOptionsFromFlags

func ClientOptionsFromFlags(flagSet *pflag.FlagSet) ([]cltypes.ClientOption, error)

ClientOptionsFromFlags reads client options from cli flag set.

func DSeqFromArgs

func DSeqFromArgs(args []string, fallback uint64) (uint64, error)

DSeqFromArgs resolves a deployment sequence from an optional positional argument. When args is empty the flag-derived fallback is returned; when a positional dseq is present it always wins over the fallback (SPEC §3.8.2: positional values are applied after flags).

func DepFiltersFromArg

func DepFiltersFromArg(arg string, defaultOwner string) (dv1beta.DeploymentFilters, error)

DepFiltersFromArg parses a partial deployment path into DeploymentFilters.

Smart type detection (SPEC §3.8.2):

  • If the first component is a bech32 address, it is the owner.
  • If the first component is a number, it is the dseq and defaultOwner is used.
  • If the arg is a bare state keyword (active|closed), it is a state filter. State keywords do not combine with identity paths inside one argument; pass the state as the optional second positional instead.
  • When the arg is a bare bech32 address with no "/", it lists all deployments for that owner.

Format: [owner/]dseq or owner or state

func DepFiltersFromFlags

func DepFiltersFromFlags(flags *pflag.FlagSet) (dv1beta.DeploymentFilters, error)

DepFiltersFromFlags returns DeploymentFilters with given flags and error if occurred

func DepFiltersIsID

func DepFiltersIsID(f dv1beta.DeploymentFilters) bool

DepFiltersIsID returns true when the deployment filters specify a single deployment (owner and dseq are both set).

func DeploymentIDFromArgs

func DeploymentIDFromArgs(args []string, fallback dv1.DeploymentID, defaultOwner string) (dv1.DeploymentID, error)

DeploymentIDFromArgs resolves a deployment ID from an optional positional [owner/]dseq filter argument (SPEC §3.8), starting from the flag-derived fallback. Positional components win over the fallback and the owner falls back to defaultOwner when neither source sets it (SPEC §3.8.4).

func DeploymentIDFromFlags

func DeploymentIDFromFlags(flags *pflag.FlagSet, opts ...MarketOption) (dv1.DeploymentID, error)

DeploymentIDFromFlags returns DeploymentID with given flags, owner and error if occurred

func DeploymentIDFromFlagsForOwner

func DeploymentIDFromFlagsForOwner(flags *pflag.FlagSet, owner sdk.Address) (dv1.DeploymentID, error)

DeploymentIDFromFlagsForOwner returns DeploymentID with given flags, owner and error if occurred

func DeploymentStateFromArg

func DeploymentStateFromArg(arg string) (string, error)

DeploymentStateFromArg validates a positional deployment state keyword against the deployment state vocabulary (active|closed) — the same vocabulary DepFiltersFromArg accepts for the bare-keyword form. It backs the optional second positional state argument of `query deployment` (SPEC §3.8): `akt query deployment akash1owner/12345 active`.

func ExprFromArgs

func ExprFromArgs(args []string, fallback string) string

ExprFromArgs resolves a search expression from an optional positional argument. When args is empty the flag-derived fallback is returned; a positional expression always wins over the fallback (SPEC §3.8.2).

func FlagSetAmount

func FlagSetAmount() *pflag.FlagSet

FlagSetAmount Returns the FlagSet for amount related operations.

func FlagSetCommissionCreate

func FlagSetCommissionCreate() *pflag.FlagSet

FlagSetCommissionCreate Returns the FlagSet used for commission create.

func FlagSetCommissionUpdate

func FlagSetCommissionUpdate() *pflag.FlagSet

func FlagSetDescriptionCreate

func FlagSetDescriptionCreate() *pflag.FlagSet

func FlagSetDescriptionEdit

func FlagSetDescriptionEdit() *pflag.FlagSet

func FlagSetMinSelfDelegation

func FlagSetMinSelfDelegation() *pflag.FlagSet

FlagSetMinSelfDelegation Returns the FlagSet used for minimum set delegation.

func FlagSetPublicKey

func FlagSetPublicKey() *pflag.FlagSet

FlagSetPublicKey Returns the flagset for Public Key related operations.

func GroupIDFromArg

func GroupIDFromArg(arg string, defaultOwner string) (dv1.GroupID, bool, error)

GroupIDFromArg parses a group path into a GroupID with smart type detection.

Formats:

  • owner/dseq[/gseq] (explicit owner)
  • dseq[/gseq] (owner defaults to defaultOwner)

When gseq is omitted it defaults to 0 (caller should treat as unset).

func GroupIDFromFlags

func GroupIDFromFlags(flags *pflag.FlagSet, opts ...MarketOption) (dv1.GroupID, error)

GroupIDFromFlags returns GroupID with given flags and error if occurred

func GroupSeqsFromArgs

func GroupSeqsFromArgs(args []string, dseq uint64, gseq uint32) (uint64, uint32, error)

GroupSeqsFromArgs resolves deployment and group sequences from optional positional arguments in the form [dseq [gseq]]. Positional values always win over the flag-derived fallbacks (SPEC §3.8.2).

func LeaseFiltersFromArg

func LeaseFiltersFromArg(arg string, defaultOwner string, byProvider bool) (mv1.LeaseFilters, error)

LeaseFiltersFromArg parses a partial lease path into LeaseFilters. See BidFiltersFromArg for format details.

A bare state keyword (active|insufficient_funds|closed) as the sole argument is a state filter. The lease state vocabulary differs from the bid vocabulary, so it is handled here before delegating identity parsing to BidFiltersFromArg.

func LeaseFiltersFromFlags

func LeaseFiltersFromFlags(flags *pflag.FlagSet) (mv1.LeaseFilters, error)

LeaseFiltersFromFlags returns LeaseFilters with given flags and error if occurred. FEEDBACK(2026-07): the lease filter flags are disabled for the positional-only UX trial (see AddLeaseFilterFlags), so this returns empty filters via the (also gutted) BidFiltersFromFlags.

func LeaseFiltersIsID

func LeaseFiltersIsID(f mv1.LeaseFilters) bool

LeaseFiltersIsID returns true when all ID fields in the lease filters are set, indicating the user wants a single record rather than a filtered list.

func LeaseIDFromFlags

func LeaseIDFromFlags(flags *pflag.FlagSet, opts ...MarketOption) (mv1.LeaseID, error)

LeaseIDFromFlags returns LeaseID with given flags and error if occurred Here provider value is taken from flags

func LeaseSeqsFromArgs

func LeaseSeqsFromArgs(args []string, dseq uint64, provider string) (uint64, string, error)

LeaseSeqsFromArgs resolves a deployment sequence and provider address from optional positional arguments in the form [dseq [provider]]. Positional values always win over the flag-derived fallbacks (SPEC §3.8.2).

func LeaseStateFromArg

func LeaseStateFromArg(arg string) (string, error)

LeaseStateFromArg validates a positional lease state keyword against the lease state vocabulary (active|insufficient_funds|closed). It backs the optional second positional state argument of `query market lease` (SPEC §3.8).

func MarkReqBidIDFlags

func MarkReqBidIDFlags(cmd *cobra.Command, opts ...DeploymentIDOption)

MarkReqBidIDFlags marks flags required for bid Used in get bid query command

func MarkReqDeploymentIDFlags

func MarkReqDeploymentIDFlags(cmd *cobra.Command, opts ...DeploymentIDOption)

MarkReqDeploymentIDFlags marks flags required except for Owner when NoOwner is set

func MarkReqGroupIDFlags

func MarkReqGroupIDFlags(cmd *cobra.Command, opts ...DeploymentIDOption)

MarkReqGroupIDFlags marks flags required for group

func MarkReqLeaseIDFlags

func MarkReqLeaseIDFlags(cmd *cobra.Command, opts ...DeploymentIDOption)

MarkReqLeaseIDFlags marks flags required for bid Used in get bid query command

func MarkReqOrderIDFlags

func MarkReqOrderIDFlags(cmd *cobra.Command, opts ...DeploymentIDOption)

MarkReqOrderIDFlags marks flags required for order

func MarkReqProviderFlag

func MarkReqProviderFlag(cmd *cobra.Command)

MarkReqProviderFlag marks provider flag as required

func OrderFiltersFromArg

func OrderFiltersFromArg(arg string, defaultOwner string) (mvbeta.OrderFilters, error)

OrderFiltersFromArg parses a partial order path with smart type detection.

Formats (SPEC §3.8):

  • [owner/]dseq[/gseq[/oseq]]
  • If the first component is a number, it is dseq and defaultOwner is used.
  • If the first component is a bech32 address, it is the owner.
  • If the arg is a bare state keyword (open|active|closed), it is a state filter. State keywords do not combine with identity paths inside one argument; pass the state as the optional second positional instead.

func OrderFiltersFromFlags

func OrderFiltersFromFlags(flags *pflag.FlagSet) (mvbeta.OrderFilters, error)

OrderFiltersFromFlags returns OrderFilters with given flags and error if occurred

func OrderFiltersIsID

func OrderFiltersIsID(f mvbeta.OrderFilters) bool

OrderFiltersIsID returns true when all ID fields in the order filters are set, indicating the user wants a single record rather than a filtered list.

func OrderIDFromFlags

func OrderIDFromFlags(flags *pflag.FlagSet, opts ...MarketOption) (mv1.OrderID, error)

OrderIDFromFlags returns OrderID with given flags and error if occurred

func OrderStateFromArg

func OrderStateFromArg(arg string) (string, error)

OrderStateFromArg validates a positional order state keyword against the order state vocabulary (open|active|closed). It backs the optional second positional state argument of `query market order` (SPEC §3.8).

func ParseGasSetting

func ParseGasSetting(gasStr string) (cltypes.GasSetting, error)

ParseGasSetting parses a string gas value. The value may either be 'auto', which indicates a transaction should be executed in simulate mode to automatically find a sufficient gas value, or a string integer. It returns an error if a string integer is provided which cannot be parsed.

Types

type DeploymentIDOption

type DeploymentIDOption func(*DeploymentIDOptions)

func DeploymentIDOptionNoOwner

func DeploymentIDOptionNoOwner(val bool) DeploymentIDOption

DeploymentIDOptionNoOwner do not add mark as required owner flag

type DeploymentIDOptions

type DeploymentIDOptions struct {
	NoOwner bool
}

type MarketOption

type MarketOption func(*MarketOptions)

func WithOwner

func WithOwner(val sdk.AccAddress) MarketOption

func WithProvider

func WithProvider(val sdk.AccAddress) MarketOption

type MarketOptions

type MarketOptions struct {
	Owner    sdk.AccAddress
	Provider sdk.AccAddress
}

Jump to

Keyboard shortcuts

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