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.

enum BridgeType {
    Wormhole,
    Stargate,
    Celer
}

BridgeArgs

struct BridgeArgs {
    BridgeType bridgeType;
    bytes payload;
}

BridgeInArgs

struct BridgeInArgs {
    uint16 recipientNetworkId;
    BridgeArgs bridgeArgs;
    uint256 amount;
    address toAssetAddress;
    TransferKey transferKey;
}

BridgeOutArgs

struct BridgeOutArgs {
    BridgeArgs bridgeArgs;
    Transaction transaction;
    TransferKey transferKey;
}

RefundArgs

struct RefundArgs {
    uint16 recipientNetworkId;
    uint256 amount;
    address toAssetAddress;
    TransferKey transferKey;
    BridgeArgs bridgeArgs;
    bytes payload;
}

Last updated