chaincmd

package
v28.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SimulationCommand

func SimulationCommand(appPath string, options ...SimappOption) step.Option

SimulationCommand returns the cli command for simapp tests.

Types

type BankSendOption

type BankSendOption func([]string) []string

BankSendOption for the BankSendCommand.

func BankSendWithFees

func BankSendWithFees(fee sdk.Coin) BankSendOption

BankSendWithFees sets fees to pay along with transaction for the bank send command.

type ChainCmd

type ChainCmd struct {
	// contains filtered or unexported fields
}

func New

func New(appCmd string, options ...Option) ChainCmd

New creates a new ChainCmd to launch command with the chain app.

func (ChainCmd) AddGenesisAccountCommand

func (c ChainCmd) AddGenesisAccountCommand(address, coins string) step.Option

AddGenesisAccountCommand returns the command to add a new account in the genesis file of the chain.

func (ChainCmd) AddKeyCommand

func (c ChainCmd) AddKeyCommand(accountName, coinType string) step.Option

AddKeyCommand returns the command to add a new key in the chain keyring.

func (ChainCmd) AddVestingAccountCommand

func (c ChainCmd) AddVestingAccountCommand(address, originalCoins, vestingCoins string, vestingEndTime int64) step.Option

AddVestingAccountCommand returns the command to add a delayed vesting account in the genesis file of the chain.

func (ChainCmd) BankSendCommand

func (c ChainCmd) BankSendCommand(fromAddress, toAddress, amount string, options ...BankSendOption) step.Option

BankSendCommand returns the command for transferring tokens.

func (ChainCmd) CollectGentxsCommand

func (c ChainCmd) CollectGentxsCommand() step.Option

CollectGentxsCommand returns the command to gather the gentxs in /gentx dir into the genesis file of the chain.

func (ChainCmd) Copy

func (c ChainCmd) Copy(options ...Option) ChainCmd

Copy makes a copy of ChainCmd by overwriting its options with given options.

func (ChainCmd) ExportCommand

func (c ChainCmd) ExportCommand() step.Option

ExportCommand returns the command to export the state of the blockchain into a genesis file.

func (ChainCmd) GentxCommand

func (c ChainCmd) GentxCommand(
	validatorName string,
	selfDelegation string,
	options ...GentxOption,
) step.Option

GentxCommand returns the command to generate a gentx for the chain.

func (ChainCmd) ImportKeyCommand

func (c ChainCmd) ImportKeyCommand(accountName, keyFile string) step.Option

ImportKeyCommand returns the command to import a key into the chain keyring from a key file.

func (ChainCmd) InitCommand

func (c ChainCmd) InitCommand(moniker string) step.Option

InitCommand returns the command to initialize the chain.

func (ChainCmd) IsAutoChainIDDetectionEnabled

func (c ChainCmd) IsAutoChainIDDetectionEnabled() bool

func (ChainCmd) KeyringBackend

func (c ChainCmd) KeyringBackend() KeyringBackend

KeyringBackend returns the underlying keyring backend.

func (ChainCmd) KeyringPassword

func (c ChainCmd) KeyringPassword() string

KeyringPassword returns the underlying keyring password.

func (ChainCmd) ListKeysCommand

func (c ChainCmd) ListKeysCommand() step.Option

ListKeysCommand returns the command to print the list of a keys in the chain keyring.

func (ChainCmd) Name

func (c ChainCmd) Name() string

Name returns the app name (prefix of the chain daemon).

func (ChainCmd) QueryTxCommand

func (c ChainCmd) QueryTxCommand(txHash string) step.Option

QueryTxCommand returns the command to query tx.

func (ChainCmd) QueryTxEventsCommand

func (c ChainCmd) QueryTxEventsCommand(query string) step.Option

QueryTxEventsCommand returns the command to query events.

func (ChainCmd) QueryTxQueryCommand

func (c ChainCmd) QueryTxQueryCommand(query string) step.Option

QueryTxQueryCommand returns the command to query tx.

func (ChainCmd) RecoverKeyCommand

func (c ChainCmd) RecoverKeyCommand(accountName, coinType string) step.Option

RecoverKeyCommand returns the command to recover a key into the chain keyring from a mnemonic.

func (ChainCmd) SDKVersion

func (c ChainCmd) SDKVersion() cosmosver.Version

func (ChainCmd) ShowKeyAddressCommand

func (c ChainCmd) ShowKeyAddressCommand(accountName string) step.Option

ShowKeyAddressCommand returns the command to print the address of a key in the chain keyring.

func (ChainCmd) ShowNodeIDCommand

func (c ChainCmd) ShowNodeIDCommand() step.Option

ShowNodeIDCommand returns the command to print the node ID of the node for the chain.

func (ChainCmd) StartCommand

func (c ChainCmd) StartCommand(options ...string) step.Option

StartCommand returns the command to start the daemon of the chain.

func (ChainCmd) StatusCommand

func (c ChainCmd) StatusCommand() step.Option

StatusCommand returns the command that fetches node's status.

func (ChainCmd) UnsafeResetCommand

func (c ChainCmd) UnsafeResetCommand() step.Option

UnsafeResetCommand returns the command to reset the blockchain database.

func (ChainCmd) ValidateGenesisCommand

func (c ChainCmd) ValidateGenesisCommand() step.Option

ValidateGenesisCommand returns the command to check the validity of the chain genesis.

type GentxOption

type GentxOption func([]string) []string

GentxOption for the GentxCommand.

func GentxWithCommissionMaxChangeRate

func GentxWithCommissionMaxChangeRate(commissionMaxChangeRate string) GentxOption

GentxWithCommissionMaxChangeRate provides commission max change rate option for the gentx command.

func GentxWithCommissionMaxRate

func GentxWithCommissionMaxRate(commissionMaxRate string) GentxOption

GentxWithCommissionMaxRate provides commission max rate option for the gentx command.

func GentxWithCommissionRate

func GentxWithCommissionRate(commissionRate string) GentxOption

GentxWithCommissionRate provides commission rate option for the gentx command.

func GentxWithDetails

func GentxWithDetails(details string) GentxOption

GentxWithDetails provides validator details option for the gentx command.

func GentxWithGasPrices

func GentxWithGasPrices(gasPrices string) GentxOption

GentxWithGasPrices provides gas price option for the gentx command.

func GentxWithIdentity

func GentxWithIdentity(identity string) GentxOption

GentxWithIdentity provides validator identity option for the gentx command.

func GentxWithMinSelfDelegation

func GentxWithMinSelfDelegation(minSelfDelegation string) GentxOption

GentxWithMinSelfDelegation provides minimum self delegation option for the gentx command.

func GentxWithMoniker

func GentxWithMoniker(moniker string) GentxOption

GentxWithMoniker provides moniker option for the gentx command.

func GentxWithSecurityContact

func GentxWithSecurityContact(securityContact string) GentxOption

GentxWithSecurityContact provides validator security contact option for the gentx command.

func GentxWithWebsite

func GentxWithWebsite(website string) GentxOption

GentxWithWebsite provides validator website option for the gentx command.

type KeyringBackend

type KeyringBackend string
const (
	KeyringBackendUnspecified KeyringBackend = ""
	KeyringBackendOS          KeyringBackend = "os"
	KeyringBackendFile        KeyringBackend = "file"
	KeyringBackendPass        KeyringBackend = "pass"
	KeyringBackendTest        KeyringBackend = "test"
	KeyringBackendKwallet     KeyringBackend = "kwallet"
)

func KeyringBackendFromString

func KeyringBackendFromString(kb string) (KeyringBackend, error)

KeyringBackendFromString returns the keyring backend from its string.

type Option

type Option func(*ChainCmd)

Option configures ChainCmd.

func WithAutoChainIDDetection

func WithAutoChainIDDetection() Option

WithAutoChainIDDetection finds out the chain id by communicating with the node running.

func WithChainID

func WithChainID(chainID string) Option

WithChainID provides a specific chain ID for the commands that accept this option.

func WithHome

func WithHome(home string) Option

WithHome replaces the default home used by the chain.

func WithKeyringBackend

func WithKeyringBackend(keyringBackend KeyringBackend) Option

WithKeyringBackend provides a specific keyring backend for the commands that accept this option.

func WithKeyringPassword

func WithKeyringPassword(password string) Option

WithKeyringPassword provides a password to unlock keyring.

func WithNodeAddress

func WithNodeAddress(addr string) Option

WithNodeAddress sets the node address for the commands that needs to make an API request to the node that has a different node address other than the default one.

func WithVersion

func WithVersion(v cosmosver.Version) Option

WithVersion sets the version of the blockchain. when this is not provided, the latest version of SDK is assumed.

type SimappOption

type SimappOption func([]string) []string

SimappOption for the SimulateCommand.

func SimappWithBlockSize

func SimappWithBlockSize(blockSize int) SimappOption

SimappWithBlockSize provides blockSize option for the simapp command.

func SimappWithCommit

func SimappWithCommit(commit bool) SimappOption

SimappWithCommit provides commit option for the simapp command.

func SimappWithEnable

func SimappWithEnable(enable bool) SimappOption

SimappWithEnable provides enable option for the simapp command.

func SimappWithExportParamsHeight

func SimappWithExportParamsHeight(exportParamsHeight int) SimappOption

SimappWithExportParamsHeight provides exportParamsHeight option for the simapp command.

func SimappWithExportParamsPath

func SimappWithExportParamsPath(exportParamsPath string) SimappOption

SimappWithExportParamsPath provides exportParamsPath option for the simapp command.

func SimappWithExportStatePath

func SimappWithExportStatePath(exportStatePath string) SimappOption

SimappWithExportStatePath provides exportStatePath option for the simapp command.

func SimappWithExportStatsPath

func SimappWithExportStatsPath(exportStatsPath string) SimappOption

SimappWithExportStatsPath provides exportStatsPath option for the simapp command.

func SimappWithGenesis

func SimappWithGenesis(genesis string) SimappOption

SimappWithGenesis provides genesis option for the simapp command.

func SimappWithGenesisTime

func SimappWithGenesisTime(genesisTime int64) SimappOption

SimappWithGenesisTime provides genesisTime option for the simapp command.

func SimappWithInitialBlockHeight

func SimappWithInitialBlockHeight(initialBlockHeight int) SimappOption

SimappWithInitialBlockHeight provides initialBlockHeight option for the simapp command.

func SimappWithLean

func SimappWithLean(lean bool) SimappOption

SimappWithLean provides lean option for the simapp command.

func SimappWithNumBlocks

func SimappWithNumBlocks(numBlocks int) SimappOption

SimappWithNumBlocks provides numBlocks option for the simapp command.

func SimappWithParams

func SimappWithParams(params string) SimappOption

SimappWithParams provides params option for the simapp command.

func SimappWithPeriod

func SimappWithPeriod(period uint) SimappOption

SimappWithPeriod provides period option for the simapp command.

func SimappWithPrintAllInvariants

func SimappWithPrintAllInvariants(printAllInvariants bool) SimappOption

SimappWithPrintAllInvariants provides printAllInvariants option for the simapp command.

func SimappWithSeed

func SimappWithSeed(seed int64) SimappOption

SimappWithSeed provides seed option for the simapp command.

func SimappWithSimulateEveryOperation

func SimappWithSimulateEveryOperation(simulateEveryOperation bool) SimappOption

SimappWithSimulateEveryOperation provides simulateEveryOperation option for the simapp command.

func SimappWithVerbose

func SimappWithVerbose(verbose bool) SimappOption

SimappWithVerbose provides verbose option for the simapp command.

Directories

Path Synopsis
Package chaincmdrunner provides high level access to a blockchain's commands.
Package chaincmdrunner provides high level access to a blockchain's commands.

Jump to

Keyboard shortcuts

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