Bridge
Move tokens from Ethereum mainnet to Immutable Chain.
When to use:
- Bringing ETH or ERC-20 tokens to Immutable Chain
- Players have assets on Ethereum they want to use in-game
- L1 to L2 asset migration
Overview
The bridge widget enables players to transfer tokens between Ethereum L1 and Immutable zkEVM L2. The widget uses different bridge providers based on optimal routes: The widget automatically selects the best bridge provider based on the token being transferred and current network conditions.Prerequisites
Install the Immutable SDK:- npm
- yarn
Quick Start
Parameters
| Parameter | Type | Description |
|---|---|---|
flow | 'BRIDGE' | Required. Specifies the bridge flow |
tokenAddress | string | Optional. Token to bridge (Ethereum address) |
amount | string | Optional. Amount to bridge |
Events
| Event | Description | Payload |
|---|---|---|
SUCCESS | Bridge initiated | { transactionHash, fromToken, toToken, fromAmount, toAmount } |
FAILURE | Bridge failed | { error } |
CLOSE | User closed widget | — |