Documentation ¶
Index ¶
Constants ¶
const ( MinAddrLen = 20 MaxAddrLen = 32 )
Variables ¶
This section is empty.
Functions ¶
func BridgeLogToEvent ¶
func BridgeLogToEvent( log ethcoretypes.Log, denom string, ) bridgetypes.BridgeEvent
BridgeLogToEvent converts an Ethereum log from Bridge contract to a BridgeEvent. Note: The format of a jInX address is [prefix][separator][address][checksum], where `prefix` is `jinx`, `separator` is `1`, `address` is the actual address portion, and `checksum` occupies last 6 characters. An address in Ethereum logs is in hexadecimal format and in Cosmos bech32 format. For example, a 20-byte address in hexadecimal format is 20*8=160 bits, which is 160/5=32 bech32 characters.
func GetBridgeEventAbi ¶
GetBridgeEventAbi returns the ABI (application binary interface) for the Bridge contract.
func PadOrTruncateAddress ¶
PadOrTruncateAddress right-pads an address with zeros if it's shorter than `MinAddrLen` or takes the first `MaxAddrLen` if it's longer than that.
Types ¶
This section is empty.