Bridge Tokens with Etherscan
How to bridge ERC-20 tokens from Ethereum and Polygon to Celo.
Approve the Bridge
Start by approving token usage on the bridge.
- Navigate to the Etherscan (or Polygonscan) page for the token you want to send
- Open the Write Contract pane > connect your wallet > and select approve
- For spender enter the BridgeRouter address:
- Ethereum
- Polygon
Ethereum BridgeRouter Address = 0x4fc16De11deAc71E8b2Db539d82d93BE4b486892
Polygon BridgeRouter Address = 0x3a5846882C0d5F8B0FA4bB04dc90C013104d125d
- For amount enter the number of tokens you'd like to send in that token's smallest unit.
If you're unsure, check the decimals in the Read Contract pane
- For most tokens the number of digits is 18
- The + button next will help you fill in the right number
Approving too much is usually ok, but not approving enough will cause your next transaction to fail.
- Select write > sign the transaction > then send it to the network.
Call the Bridge
You can now start sending tokens on the approved Bridge.
- Navigate to the appropriate page for the router
- Ethereum
- Polygon
- Celo
- Avalanche
- Open the Write as Proxy pane > connect your wallet > and select send
- For _token, enter the address of the token you want to send
- For _amount, enter the amount of tokens you'd like to send in that token's smallest unit.
This should be the same number you approved earlier.
- For _destination, enter the domain ID of the chain to which you'd like to send tokens.
- On Celo
- On Polygon
- On Ethereum
- On Avalanche
Celo Domain ID = 1667591279
Polygon Domain ID = 1886350457
Ethereum Domain ID = 6648936
Avalanche Domain ID = 1635148152
Domain IDs are like phone numbers. They represent the chain you're going to call.
- For _recipient, enter the address of the recipient on the destination chain.
- To help support future chains with longer addresses, Optics uses 32-byte addresses.
- To convert an Ethereum, Celo, or Polygon address to bytes32 you can add 24 0s after the 0x prefix
Before: bytes32
0x6a39909e805A3eaDd2b61fFf61147796ca6aBB47
After: 24 Zeros after 0x Prefix
0x0000000000000000000000006a39909e805A3eaDd2b61fFf61147796ca6aBB47
- Select write > sign the transaction > then send it to the network.
Wait
Wait for a moment for your transaction to finalize on the network.