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 dYdX address is [prefix][separator][address][checksum], where `prefix` is `dydx`, `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 ¶ added in v0.4.0
GetBridgeEventAbi returns the ABI (application binary interface) for the Bridge contract.
func PadOrTruncateAddress ¶ added in v0.4.0
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.