Skip to main content

Sepolia Bridge

The ComposeL1Bridge contract is the Layer 1-side bridge for deposits into Ethera rollups and for final settlement of withdrawals back to Sepolia.

Overview

ComposeL1Bridge is responsible for:

  • Bridging native ETH from Sepolia into Ethera rollups
  • Escrowing canonical ERC20 assets on Layer 1 during deposits
  • Sending bridge messages through the canonical cross-domain messenger
  • Finalizing withdrawals by releasing canonical assets back to the recipient on Sepolia

For ERC20 deposits, canonical custody remains on Layer 1. On first use, token metadata can be carried so the destination CET can be deployed on the rollup if it does not already exist.

Contract Interface

contract ComposeL1Bridge {
function bridgeETH(...) external payable;
function bridgeETHTo(...) external payable;
function bridgeERC20(...) external;
function bridgeERC20To(...) external;
function finalizeBridgeETH(...) external payable;
function finalizeBridgeERC20(...) external;
}

Functions

bridgeETH(_minGasLimit, _extraData)

Description: Initiates an ETH deposit from Sepolia to the caller's address on the destination rollup.

ParameterTypeDescription
minGasLimituint32Minimum gas limit for the destination execution
extraDatabytesAdditional data forwarded with the bridge message

Events:

  • ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData)

bridgeETHTo(_to, _minGasLimit, _extraData)

Description: Initiates an ETH deposit from Sepolia to a specified recipient on the destination rollup.

ParameterTypeDescription
toaddressRecipient on the destination rollup
minGasLimituint32Minimum gas limit for the destination execution
extraDatabytesAdditional data forwarded with the bridge message

Events:

  • ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData)

bridgeERC20(_localToken, _remoteToken, _amount, _minGasLimit, _extraData)

Description: Initiates a canonical ERC20 deposit from Sepolia to the caller's address on the destination rollup.

ParameterTypeDescription
localTokenaddressCanonical ERC20 token address on Sepolia
remoteTokenaddressExpected token address on the destination rollup
amountuint256Amount to deposit
minGasLimituint32Minimum gas limit for the destination execution
extraDatabytesAdditional data forwarded with the bridge message

Events:

  • ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData)

bridgeERC20To(_localToken, _remoteToken, _to, _amount, _minGasLimit, _extraData)

Description: Initiates a canonical ERC20 deposit from Sepolia to a specified recipient on the destination rollup.

ParameterTypeDescription
localTokenaddressCanonical ERC20 token address on Sepolia
remoteTokenaddressExpected token address on the destination rollup
toaddressRecipient on the destination rollup
amountuint256Amount to deposit
minGasLimituint32Minimum gas limit for the destination execution
extraDatabytesAdditional data forwarded with the bridge message

Events:

  • ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData)

finalizeBridgeETH(_from, _to, _amount, _extraData)

Description: Finalizes an ETH withdrawal arriving back on Sepolia.

ParameterTypeDescription
fromaddressSender on the source rollup
toaddressRecipient on Sepolia
amountuint256Amount of ETH to release
extraDatabytesAdditional bridge data

Events:

  • ETHBridgeFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData)

finalizeBridgeERC20(_localToken, _remoteToken, _from, _to, _amount, _extraData)

Description: Finalizes an ERC20 withdrawal by releasing the canonical Layer 1 asset back to the recipient on Sepolia.

ParameterTypeDescription
localTokenaddressCanonical ERC20 token address on Sepolia
remoteTokenaddressToken address on the source rollup
fromaddressSender on the source rollup
toaddressRecipient on Sepolia
amountuint256Amount to release
extraDatabytesAdditional bridge data

Events:

  • ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData)

Events

ETHBridgeInitiated

event ETHBridgeInitiated(address indexed from, address indexed to, uint256 amount, bytes extraData)

Emitted when an ETH deposit is initiated from Sepolia.

ETHBridgeFinalized

event ETHBridgeFinalized(address indexed from, address indexed to, uint256 amount, bytes extraData)

Emitted when an ETH withdrawal is finalized back on Sepolia.

ERC20BridgeInitiated

event ERC20BridgeInitiated(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData)

Emitted when a canonical ERC20 deposit is initiated from Sepolia.

ERC20BridgeFinalized

event ERC20BridgeFinalized(address indexed localToken, address indexed remoteToken, address indexed from, address to, uint256 amount, bytes extraData)

Emitted when an ERC20 withdrawal is finalized back on Sepolia.