Skip to content

IBridgeCoordinatorL1Outbound

Git Source

Interface for the L1 outbound bridge coordinator that manages cross-chain transfers

Handles outbound bridging operations from Layer 1 to destination chains for GUSD transfers

Functions

bridge

Bridges Generic units to another chain using the specified bridge protocol

Restricts units on this chain and sends a message to release equivalent units on destination chain

function bridge(
    uint16 bridgeType,
    uint256 chainId,
    address onBehalf,
    bytes32 remoteRecipient,
    address sourceWhitelabel,
    bytes32 destinationWhitelabel,
    uint256 amount,
    bytes calldata bridgeParams
)
    external
    payable
    returns (bytes32 messageId);
Parameters
NameTypeDescription
bridgeTypeuint16The identifier for the bridge protocol to use (must have registered adapter)
chainIduint256The destination chain ID
onBehalfaddressThe address on this chain on whose behalf the units are bridged
remoteRecipientbytes32The recipient address on the destination chain (encoded as bytes32)
sourceWhitelabeladdressThe whitelabeled unit token address on this chain, or zero address for native unit token
destinationWhitelabelbytes32The whitelabeled unit token address on the destination chain (encoded as bytes32)
amountuint256The amount of units to bridge
bridgeParamsbytesProtocol-specific parameters required by the bridge adapter
Returns
NameTypeDescription
messageIdbytes32Unique identifier for tracking the cross-chain message

predeposit

Predeposits units for bridging to another chain

Restricts units on this chain to be bridged later via bridgePredeposit

function predeposit(
    bytes32 chainNickname,
    address onBehalf,
    bytes32 remoteRecipient,
    uint256 amount
)
    external;
Parameters
NameTypeDescription
chainNicknamebytes32The nickname of the destination chain
onBehalfaddressThe address on behalf of which the predeposit is made
remoteRecipientbytes32The recipient address on the destination chain (encoded as bytes32)
amountuint256The amount of units to predeposit