Documentation
¶
Overview ¶
Package utils contains utility functions for the relayer.
Index ¶
- func Decode(request []byte) (bridgeTransaction *bindings.IFastBridgeBridgeTransaction, err error)
- func Encode(bridgeTransaction *bindings.IFastBridgeBridgeTransaction) (request []byte, err error)
- func GenerateQuoteID(originChainID uint32, originToken common.Address, destChainID uint32, ...) string
- func GenerateTokenID(chainID uint32, tokenAddress common.Address) string
- func IsBridgeRelayed(topic common.Hash, abi abi.ABI) bool
- func IsBridgeRequested(topic common.Hash, abi abi.ABI) bool
- func ParseBridgeRelayed(log types.Log, abi abi.ABI) (*bindings.FastBridgeBridgeRelayed, error)
- func ParseBridgeRequested(log types.Log, abi abi.ABI) (*bindings.FastBridgeBridgeRequested, error)
- func TransactionID(request []byte) common.Hash
- type WrappedLog
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
func Decode(request []byte) (bridgeTransaction *bindings.IFastBridgeBridgeTransaction, err error)
Decode decodes a request into a bridge transaction.
func Encode ¶
func Encode(bridgeTransaction *bindings.IFastBridgeBridgeTransaction) (request []byte, err error)
Encode encodes a bridge transaction into a request.
func GenerateQuoteID ¶
func GenerateQuoteID(originChainID uint32, originToken common.Address, destChainID uint32, destToken common.Address) string
GenerateQuoteID generates a quote ID from the origin chain ID, origin token address, destination chain ID, and destination token address.
func GenerateTokenID ¶
GenerateTokenID generates a token ID from the token address and chain ID.
func IsBridgeRelayed ¶
IsBridgeRelayed checks if the topic is the BridgeRelayed event.
func IsBridgeRequested ¶
IsBridgeRequested checks if the topic is the BridgeRequested event.
func ParseBridgeRelayed ¶
ParseBridgeRelayed parses the BridgeRelayed event.
func ParseBridgeRequested ¶
ParseBridgeRequested parses the BridgeRequested event.
func TransactionID ¶
TransactionID returns the transaction id for a given request.
Types ¶
type WrappedLog ¶
WrappedLog is a struct containing the origin chain ID and a log.