Documentation ¶
Index ¶
- Constants
- func CalculateStorageKey(addr string, i int) string
- func ComputeIBCDenom(portID, channelID, denom string) string
- func ComputeIBCDenomTrace(portID, channelID, denom string) ibctransfertypes.DenomTrace
- func CreateAccAddressFromBech32(address string, bech32prefix string) (sdk.AccAddress, error)
- func GetAccAddressFromEthAddress(addrString string) sdk.AccAddress
- func GetIBCDenomAddress(denom string) (common.Address, error)
- func GetneuraAddressFromBech32(address string) (sdk.AccAddress, error)
- func IsContractAccount(acc authtypes.AccountI) error
- func IsLocalNetwork(chainID string) bool
- func IsMainNetwork(chainID string) bool
- func IsSupportedKey(pubkey cryptotypes.PubKey) bool
- func IsTestEdge1Network(chainID string) bool
- func IsTestEdge2Network(chainID string) bool
- func Keccak256(data []byte) []byte
- func ParseHexValue(hexStr string) *big.Int
- func Remove0xPrefix(s string) string
- func UnsafeBytesToStr(b []byte) string
- func UnsafeStrToBytes(s string) []byte
Constants ¶
const ( MainNetChainID = "neura_11235" TestEdge1ChainID = "neura_53211" TestEdge2ChainID = "neura_54211" LocalNetChainID = "neura_121799" // BaseDenom defines the neura Network mainnet denomination BaseDenom = "aISLM" )
Variables ¶
This section is empty.
Functions ¶
func CalculateStorageKey ¶
CalculateStorageKey calculates the storage key for a given address and index
func ComputeIBCDenom ¶
ComputeIBCDenom compute the ibc voucher denom associated to the portID, channelID, and the given a token denomination.
func ComputeIBCDenomTrace ¶
func ComputeIBCDenomTrace(portID, channelID, denom string) ibctransfertypes.DenomTrace
ComputeIBCDenomTrace compute the ibc voucher denom trace associated with the portID, channelID, and the given a token denomination.
func CreateAccAddressFromBech32 ¶
func CreateAccAddressFromBech32(address string, bech32prefix string) (sdk.AccAddress, error)
CreateAccAddressFromBech32 creates an AccAddress from a Bech32 string.
func GetAccAddressFromEthAddress ¶
func GetAccAddressFromEthAddress(addrString string) sdk.AccAddress
func GetIBCDenomAddress ¶
GetIBCDenomAddress returns the address from the hash of the ICS20's DenomTrace Path.
func GetneuraAddressFromBech32 ¶
func GetneuraAddressFromBech32(address string) (sdk.AccAddress, error)
GetneuraAddressFromBech32 returns the sdk.Account address of given address, while also changing bech32 human readable prefix (HRP) to the value set on the global sdk.Config (eg: `neura`). The function fails if the provided bech32 address is invalid.
func IsContractAccount ¶
IsContractAccount checks if the given account is a contract account
func IsLocalNetwork ¶
func IsMainNetwork ¶
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 IsTestEdge1Network ¶
func IsTestEdge2Network ¶
func ParseHexValue ¶
ParseHexValue parses a hex string into a big.Int
func Remove0xPrefix ¶
Remove0xPrefix removes the 0x prefix from a hex string
func UnsafeBytesToStr ¶
UnsafeBytesToStr is meant to make a zero allocation conversion from []byte -> string to speed up operations, it is not meant to be used generally, but for a specific pattern to delete keys from a map.
func UnsafeStrToBytes ¶
UnsafeStrToBytes uses unsafe to convert string into byte array. Returned bytes must not be altered after this function is called as it will cause a segmentation fault.
Types ¶
This section is empty.