cmd

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 24 Imported by: 0

Documentation

Overview

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

Copyright © 2022 NAME HERE <EMAIL ADDRESS>

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

	// 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"
)
View Source
const (
	//FlagUseLedger     = "ledger"
	//FlagChainID       = "chain-id"
	//FlagNode          = "node"
	//FlagHeight        = "height"
	//FlagGasAdjustment = "gas-adjustment"
	//FlagFrom          = "from"
	//FlagAccountNumber = "account-number"
	//FlagSequence      = "sequence"
	FlagFees          = "fees"
	FlagGasLimit      = "gas-limit"
	FlagGasPrices     = "gas-prices"
	FlagBroadcastMode = "broadcast-mode"
	FlagDryRun        = "dry-run"
	FlagGenerateOnly  = "generate-only"
	FlagOffline       = "offline"
	FlagSignMode      = "sign-mode"
	FlagTimeoutHeight = "timeout-height"
	FlagPrivateKey    = "private-key"
	FlagMemo          = "memo"
	FlagRestApi       = "rest-api"
	FlagBech32Prefix  = "bech32-prefix"
)

Variables

This section is empty.

Functions

func AddBalanceFlagsToCmd

func AddBalanceFlagsToCmd(cmd *cobra.Command)

func AddDumpAddressFlagsToCmd

func AddDumpAddressFlagsToCmd(cmd *cobra.Command)

func AddTransferFlagsToCmd

func AddTransferFlagsToCmd(cmd *cobra.Command)

AddTransferFlagsToCmd adds common flags to a module tx command.

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type GasSetting

type GasSetting struct {
	Simulate bool
	Gas      uint64
}

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

func ParseGasSetting

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

func (v *GasSetting) String() string

Jump to

Keyboard shortcuts

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