flags

package
v3.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FlagGasLimit  = "gas"
	FlagGasPrices = "gas-prices"
)
View Source
const (
	FlagEvmRpc        = "evm-rpc"
	FlagTendermintRpc = "tm-rpc"
	FlagCosmosRest    = "rest"
)
View Source
const (
	FlagEvmRpcDesc     = "EVM Json-RPC endpoint, default is " + constants.DEFAULT_EVM_RPC + ", can be set via environment variable " + constants.ENV_EVM_RPC
	FlagTmRpcDesc      = "Tendermint RPC endpoint, default is " + constants.DEFAULT_TM_RPC + ", can be set via environment variable " + constants.ENV_TM_RPC
	FlagCosmosRestDesc = "Cosmos Rest API endpoint, default is " + constants.DEFAULT_COSMOS_REST + ", can be set via environment variable " + constants.ENV_COSMOS_REST
)
View Source
const (
	FlagHeight = "height"
)
View Source
const (
	FlagSecretKey = "secret-key"
)
View Source
const (
	FlagSecretKeyDesc = "Secret private key or mnemonic of the account, can be set by environment variable " + constants.ENV_SECRET_KEY
)

Variables

This section is empty.

Functions

func MustGetCosmosRest

func MustGetCosmosRest(cmd *cobra.Command) (rest string)

func MustGetEthClient

func MustGetEthClient(cmd *cobra.Command) (ethClient8545 *ethclient.Client, evmRpc string)

func MustGetTmRpc

func MustGetTmRpc(cmd *cobra.Command) (tendermintRpcHttpClient *httpclient.HTTP, tmRpc string)

func MustSecretEvmAccount

func MustSecretEvmAccount(cmd *cobra.Command) (ecdsaPrivateKey *ecdsa.PrivateKey, ecdsaPubKey *ecdsa.PublicKey, account *common.Address)

func ReadFlagBlockNumberOrNil

func ReadFlagBlockNumberOrNil(cmd *cobra.Command, flag string) (*big.Int, error)

ReadFlagBlockNumberOrNil reads a flag value as block number and returns a big.Int. If the flag value is empty or zero or "latest", it returns nil.

func ReadFlagGasLimit

func ReadFlagGasLimit(cmd *cobra.Command, flag string, _default uint64) (uint64, error)

func ReadFlagGasPrices

func ReadFlagGasPrices(cmd *cobra.Command, flag string, _default uint64) (*big.Int, error)

func ReadFlagShortIntOrHexOrNil

func ReadFlagShortIntOrHexOrNil(cmd *cobra.Command, flag string) (*big.Int, error)

ReadFlagShortIntOrHexOrNil reads a flag value as decimal or hexadecimal and returns a big.Int. If the flag value is empty, it returns nil.

func ReadFlagShortIntOrHexOrZero

func ReadFlagShortIntOrHexOrZero(cmd *cobra.Command, flag string) (finalValue uint64, err error)

ReadFlagShortIntOrHexOrZero reads a flag value as decimal or hexadecimal and returns an uint64. If the flag value is empty, it returns zero.

Types

This section is empty.

Jump to

Keyboard shortcuts

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