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.
| Parameter | Type | Description |
|---|---|---|
| minGasLimit | uint32 | Minimum gas limit for the destination execution |
| extraData | bytes | Additional 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.
| Parameter | Type | Description |
|---|---|---|
| to | address | Recipient on the destination rollup |
| minGasLimit | uint32 | Minimum gas limit for the destination execution |
| extraData | bytes | Additional 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.
| Parameter | Type | Description |
|---|---|---|
| localToken | address | Canonical ERC20 token address on Sepolia |
| remoteToken | address | Expected token address on the destination rollup |
| amount | uint256 | Amount to deposit |
| minGasLimit | uint32 | Minimum gas limit for the destination execution |
| extraData | bytes | Additional 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.
| Parameter | Type | Description |
|---|---|---|
| localToken | address | Canonical ERC20 token address on Sepolia |
| remoteToken | address | Expected token address on the destination rollup |
| to | address | Recipient on the destination rollup |
| amount | uint256 | Amount to deposit |
| minGasLimit | uint32 | Minimum gas limit for the destination execution |
| extraData | bytes | Additional 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.
| Parameter | Type | Description |
|---|---|---|
| from | address | Sender on the source rollup |
| to | address | Recipient on Sepolia |
| amount | uint256 | Amount of ETH to release |
| extraData | bytes | Additional 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.
| Parameter | Type | Description |
|---|---|---|
| localToken | address | Canonical ERC20 token address on Sepolia |
| remoteToken | address | Token address on the source rollup |
| from | address | Sender on the source rollup |
| to | address | Recipient on Sepolia |
| amount | uint256 | Amount to release |
| extraData | bytes | Additional 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.