LibCommon
It contains an enum and structs that define the data structures for passing arguments and information related to bridge operations, including bridge types, payload data, recipient network IDs, amounts, asset addresses, and transfer keys. The purpose of these data structures is to provide a standardized format for handling bridge operations and their associated parameters in the contract or system that uses them.
BridgeType
This is an enumeration that defines two values: Wormhole
and Stargate
. It is used to represent different bridge types.
BridgeArgs
An instance of the BridgeType
enum that specifies the type of the bridge.
A bytes
field that contains additional payload data for the bridge operation.
BridgeInArgs
An unsigned 16-bit integer that represents the ID of the recipient network.
An instance of the BridgeArgs
struct that contains the bridge arguments.
A uint256
value that represents the amount being bridged.
An address
that specifies the address of the asset on the recipient network.
An instance of the TransferKey
struct that represents a transfer key for the bridge operation.
BridgeOutArgs
An instance of the BridgeArgs
struct that contains the bridge arguments.
An instance of the Transaction
struct that represents the transaction for the bridge-out operation.
An instance of the TransferKey
struct that represents a transfer key for the bridge operation.
RefundArgs
An unsigned 16-bit integer that represents the ID of the recipient network.
A uint256
value that represents the amount being refunded.
An address
that specifies the address of the asset on the recipient network.
An instance of the TransferKey
struct that represents a transfer key for the bridge operation.
An instance of the BridgeArgs
struct that contains the bridge arguments.
The bytes that contain some message which are required while bridging.
Last updated