cosmos-sdk: github.com/cosmos/cosmos-sdk/client/flags Index | Files

package flags

import "github.com/cosmos/cosmos-sdk/client/flags"

Index

Package Files

flags.go

Constants

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 = 1.0
    DefaultGasLimit      = 200000
    GasFlagAuto          = "auto"

    // DefaultKeyringBackend
    DefaultKeyringBackend = keyring.BackendOS

    // BroadcastBlock defines a tx broadcasting mode where the client waits for
    // the tx to be committed in a block.
    BroadcastBlock = "block"
    // 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"
)
const (
    FlagHome             = tmcli.HomeFlag
    FlagUseLedger        = "ledger"
    FlagChainID          = "chain-id"
    FlagNode             = "node"
    FlagHeight           = "height"
    FlagGasAdjustment    = "gas-adjustment"
    FlagFrom             = "from"
    FlagName             = "name"
    FlagAccountNumber    = "account-number"
    FlagSequence         = "sequence"
    FlagMemo             = "memo"
    FlagFees             = "fees"
    FlagGas              = "gas"
    FlagGasPrices        = "gas-prices"
    FlagBroadcastMode    = "broadcast-mode"
    FlagDryRun           = "dry-run"
    FlagGenerateOnly     = "generate-only"
    FlagOffline          = "offline"
    FlagOutputDocument   = "output-document" // inspired by wget -O
    FlagSkipConfirmation = "yes"
    FlagProve            = "prove"
    FlagKeyringBackend   = "keyring-backend"
    FlagPage             = "page"
    FlagLimit            = "limit"
    FlagSignMode         = "sign-mode"
    FlagPageKey          = "page-key"
    FlagOffset           = "offset"
    FlagCountTotal       = "count-total"
)

List of CLI flags

Variables

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

func AddPaginationFlagsToCmd Uses

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

AddPaginationFlagsToCmd adds common pagination flags to cmd

func AddQueryFlagsToCmd Uses

func AddQueryFlagsToCmd(cmd *cobra.Command)

AddQueryFlagsToCmd adds common flags to a module query command.

func AddTxFlagsToCmd Uses

func AddTxFlagsToCmd(cmd *cobra.Command)

AddTxFlagsToCmd adds common flags to a module tx command.

type GasSetting Uses

type GasSetting struct {
    Simulate bool
    Gas      uint64
}

GasSetting encapsulates the possible values passed through the --gas flag.

func ParseGasSetting Uses

func ParseGasSetting(gasStr string) (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 (*GasSetting) String Uses

func (v *GasSetting) String() string

Package flags imports 5 packages (graph) and is imported by 77 packages. Updated 2020-07-25. Refresh now. Tools for package owners.