utils

package
v0.0.0-...-61d0e0b Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2022 License: Apache-2.0 Imports: 6 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDenomPrefix

func GetDenomPrefix(portID, channelID string) string

GetDenomPrefix returns the receiving denomination prefix

func IBCDenom

func IBCDenom(fullDenomPath string) string

func MarshalJsonIgnoreErr

func MarshalJsonIgnoreErr(v interface{}) string

func ParseDenomTrace

func ParseDenomTrace(rawDenom string) types.DenomTrace

parseDenomTrace parses a string with the ibc prefix (denom trace) and the base denomination into a DenomTrace type.

Examples:

  • "portidone/channelidone/uatom" => DenomTrace{Path: "portidone/channelidone", BaseDenom: "uatom"}
  • "uatom" => DenomTrace{Path: "", BaseDenom: "uatom"}

func ReceiverChainIsSource

func ReceiverChainIsSource(sourcePort, sourceChannel, denom string) bool
returns true if the denomination originally came

from the receiving chain and false otherwise.

func UnMarshalJsonIgnoreErr

func UnMarshalJsonIgnoreErr(data string, v interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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