cli

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanSignEthTx

func CanSignEthTx(ctx client.Context) error

CanSignEthTx returns an error if the signing key algorithm is not eth_secp256k1.

func ConfirmTx

func ConfirmTx(clientCtx client.Context, signingTx signing.Tx) error

ConfirmTx outputs the transaction to be signed and requests confirmation if the SkipConfirm flag is not enabled.

func CreateEthCallContractTx

func CreateEthCallContractTx(
	ctx client.Context,
	contractAddr *common.Address,
	data []byte,
) (signing.Tx, error)

CreateEthCallContractTx creates and signs a Eth transaction wrapped in a cosmos Tx.

func GenerateOrBroadcastTx

func GenerateOrBroadcastTx(clientCtx client.Context, signingTx signing.Tx) error

GenerateOrBroadcastTx checks CLI flags and generates or broadcasts a transaction this is used over tx.GenerateOrBroadcastTxCLI as it does not sign the message.

func GetQueryCmd

func GetQueryCmd() *cobra.Command

GetQueryCmd returns the cli query commands for this module

func GetTxCmd

func GetTxCmd() *cobra.Command

GetTxCmd returns the transaction commands for this module

func PackContractCallData

func PackContractCallData(abi abi.ABI, method string, args ...interface{}) ([]byte, error)

PackContractCallData creates a smart contract method call data with the provided method and args.

func ParseAddrFromHexOrBech32

func ParseAddrFromHexOrBech32(addrString string) (common.Address, error)

ParseAddrFromHexOrBech32 parses a string address that can be either a hex or Bech32 string.

func ParseOrQueryConversionPairAddress

func ParseOrQueryConversionPairAddress(
	queryClient types.QueryClient,
	addrOrDenom string,
) (common.Address, error)

ParseOrQueryConversionPairAddress returns an EVM address of the provided ERC20 contract address string or denom. If an address string, just returns the parsed address. If a denom, fetches params, searches the enabled conversion pairs, and returns corresponding ERC20 contract address.

func PrintTx

func PrintTx(clientCtx client.Context, signingTx signing.Tx) error

PrintTx outputs a signing.Tx in JSON format, ie. when the GenerateOnly flag is enabled.

func QueryDeployedCosmosCoinContractsCmd

func QueryDeployedCosmosCoinContractsCmd() *cobra.Command

func QueryParamsCmd

func QueryParamsCmd() *cobra.Command

QueryParamsCmd queries the evmutil module parameters

Types

This section is empty.

Jump to

Keyboard shortcuts

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