BTB
/

Optimism Bridge

Canonical Bridgewebsite
The canonical bridge between Ethereum and OP Mainnet. An agent deposits ETH and ERC-20 tokens to OP Mainnet through the L1 Standard Bridge, and withdraws ETH and ERC-20 tokens from OP Mainnet through the L2 Standard Bridge. Withdrawals are proven and finalized on Ethereum through the Optimism Portal after the challenge period.

What you can do

deposit ETHBridge ETH from Ethereum to OP MainnetCall L1StandardBridgeProxy bridgeETH(minGasLimit, extraData) with ETH as msg.value, or bridgeETHTo(to, minGasLimit, extraData) for another recipient.
deposit ERC-20Bridge an ERC-20 from Ethereum to OP MainnetApprove L1StandardBridgeProxy for the amount, then call bridgeERC20(l1Token, l2Token, amount, minGasLimit, extraData).
withdraw ETHWithdraw ETH from OP Mainnet to EthereumOn OP Mainnet call L2StandardBridge bridgeETH(minGasLimit, extraData) with ETH as msg.value. On Ethereum, prove the withdrawal on OptimismPortal, wait out the challenge period, then call finalizeWithdrawalTransaction.
withdraw ERC-20Withdraw an ERC-20 from OP Mainnet to EthereumOn OP Mainnet call L2StandardBridge withdraw(l2Token, amount, minGasLimit, extraData). Then prove and finalize on Ethereum through OptimismPortal after the challenge period.
Withdrawals to Ethereum need a prove step and a finalize step on OptimismPortal, and they only finish after the challenge period (7 days).
The prove step and the finalize step are separate Ethereum transactions. Each costs L1 gas.
Only the addresses listed here come from the official superchain registry. Check them there before large transfers.

Contracts

Read any function, or build a write and sign it. Amounts are in base units (1 USDC = 1000000).
L1StandardBridgeProxy (OP Mainnet)bridge on ethereum0x99C9fc46f92E8a1c0deC1b1747d010903E884bE1
write bridgeETH(uint32,bytes)
Deposit ETH (msg.value) from Ethereum to the caller's address on OP Mainnet: (minGasLimit, extraData). minGasLimit is the gas for the L2 side. extraData is optional bytes, empty is fine.
write bridgeETHTo(address,uint32,bytes)
Deposit ETH (msg.value) from Ethereum to another address on OP Mainnet: (to, minGasLimit, extraData).
write bridgeERC20(address,address,uint256,uint32,bytes)
Deposit an ERC-20 from Ethereum to the caller on OP Mainnet: (localToken, remoteToken, amount, minGasLimit, extraData). localToken is the L1 token, remoteToken is the mapped L2 token. Approve this bridge for amount first. Amount is in base units.
write bridgeERC20To(address,address,address,uint256,uint32,bytes)
Deposit an ERC-20 from Ethereum to another address on OP Mainnet: (localToken, remoteToken, to, amount, minGasLimit, extraData). Same approval and token mapping rules as bridgeERC20.
OptimismPortalProxy (OP Mainnet)bridge on ethereum0xbEb5Fc579115071764c7423A4f12eDde41f106Ed
write depositTransaction(address,uint256,uint64,bool,bytes)
Low level deposit of ETH and an L2 call: (to, value, gasLimit, isCreation, data). The standard bridge calls this internally. Prefer L1StandardBridgeProxy unless you need a raw L2 call. Set isCreation to false for a normal call.
write finalizeWithdrawalTransaction((uint256,address,address,uint256,uint256,bytes))
Finalize an OP Mainnet withdrawal on Ethereum: a tuple of (nonce, sender, target, value, gasLimit, data). The withdrawal must have been proven on this portal first and the challenge period must have passed. Sends the ETH or tokens to the target.
L2StandardBridge (OP Mainnet predeploy)bridge on optimism0x4200000000000000000000000000000000000010
write bridgeETH(uint32,bytes)
Withdraw ETH (msg.value) from OP Mainnet to the caller's address on Ethereum: (minGasLimit, extraData). Starts the withdrawal. It is finished on Ethereum after proving and the challenge period (see OptimismPortal finalizeWithdrawalTransaction).
write withdraw(address,uint256,uint32,bytes)
Withdraw an ERC-20 from OP Mainnet to the caller on Ethereum: (l2Token, amount, minGasLimit, extraData). Pass the L2 token address. Bridged tokens are burned, so no approval is needed for them. Finished on Ethereum after the challenge period.
write withdrawTo(address,address,uint256,uint32,bytes)
Withdraw an ERC-20 from OP Mainnet to another address on Ethereum: (l2Token, to, amount, minGasLimit, extraData). Same rules as withdraw.
L2ToL1MessagePasser (OP Mainnet predeploy)bridge on optimism0x4200000000000000000000000000000000000016
write initiateWithdrawal(address,uint256,bytes)
Start a raw withdrawal message to Ethereum: (target, gasLimit, data). msg.value is sent to the target on L1. The standard bridge uses this internally. The withdrawal is finished on Ethereum through OptimismPortal finalizeWithdrawalTransaction after the challenge period.