flags

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: Apache-2.0 Imports: 16 Imported by: 6 modules, 15 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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"
	FlagReclamationWindow         = "reclamation-window"
	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
	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 added in v0.2.0

func AddBMELedgerFilterFlags(flags *pflag.FlagSet)

AddBMELedgerFilterFlags add flags to filter for ledger record list

func AddBidClosedReasonFlag added in v0.1.3

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 AddReclamationWindowFlag added in v0.2.3

func AddReclamationWindowFlag(flags *pflag.FlagSet)

AddReclamationWindowFlag adds the optional reclamation window flag for bid creation.

func AddTxFlagsToCmd

func AddTxFlagsToCmd(cmd *cobra.Command)

AddTxFlagsToCmd adds common flags to a module tx command.

func BMELedgerFiltersFromFlags added in v0.2.0

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

BMELedgerFiltersFromFlags returns LedgerRecordFilters with given flags and error if occurred

func BidClosedReasonFromFlags added in v0.1.3

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

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

func BidFiltersFromFlags

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

BidFiltersFromFlags returns BidFilters with given flags and error if occurred

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 ClientOptionsFromFlags

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

ClientOptionsFromFlags reads client options from cli flag set.

func DepFiltersFromFlags

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

DepFiltersFromFlags returns DeploymentFilters with given flags and error if occurred

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

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

GroupIDFromFlags returns GroupID with given flags and error if occurred

func LeaseFiltersFromFlags

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

LeaseFiltersFromFlags returns LeaseFilters with given flags and error if occurred

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

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

OrderFiltersFromFlags returns OrderFilters with given flags and error if occurred

func OrderIDFromFlags

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

OrderIDFromFlags returns OrderID with given flags and error if occurred

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.

func ReclamationWindowFromFlags added in v0.2.3

func ReclamationWindowFromFlags(flags *pflag.FlagSet) (*time.Duration, error)

ReclamationWindowFromFlags parses the --reclamation-window flag. Returns nil if the flag is empty (not specified).

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