utils

package
v0.0.0-...-74c1675 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2025 License: LGPL-3.0 Imports: 18 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Coalesce

func Coalesce[T any](first T, others ...T) T

Coalesce returns the first non-nil. It panics if the input type is not nil-able.

func GetEvermintAddressFromBech32

func GetEvermintAddressFromBech32(address string) (sdk.AccAddress, error)

GetEvermintAddressFromBech32 returns the sdk.Account address of given address, while also changing bech32 human read-able prefix (HRP) to the value set on the global sdk.Config. The function fails if the provided bech32 address is invalid.

func GetTxConfigWithSignModeTextureEnabled

func GetTxConfigWithSignModeTextureEnabled(coinMetadataQueryFn signingtextual.CoinMetadataQueryFn, codec codec.Codec) (client.TxConfig, error)

func IsDevnet

func IsDevnet(chainID string) bool

IsDevnet returns true if the chain-id has the current chain's devnet EIP155 chain prefix.

func IsMainnet

func IsMainnet(chainID string) bool

IsMainnet returns true if the chain-id has the current chain's mainnet EIP155 chain prefix.

func IsSupportedKey

func IsSupportedKey(pubkey cryptotypes.PubKey) bool

IsSupportedKey returns true if the pubkey type is supported by the chain (i.e eth_secp256k1, amino multisig, ed25519). NOTE: Nested multisigs are not supported.

func IsTestnet

func IsTestnet(chainID string) bool

IsTestnet returns true if the chain-id has the current chain's testnet EIP155 chain prefix.

func MoveReceiptStatusToFailed

func MoveReceiptStatusToFailed(receipt ethtypes.Receipt, existingGasUsed, newGasUsed uint64) ethtypes.Receipt

MoveReceiptStatusToFailed switch state of Ethereum receipt to failed

func Ptr

func Ptr[T any](s T) *T

Ptr take and returns ptr of the input

func UseZeroGasConfig

func UseZeroGasConfig(ctx sdk.Context) sdk.Context

Types

This section is empty.

Jump to

Keyboard shortcuts

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