Notes
- L1 to L2 only via this contract. For L2 to L1 withdrawals, use the L2StandardBridge on Optimism (takes 7 days)
- OP Stack architecture — same pattern used by Base, Mode, Zora, and other OP chains
depositETH/depositERC20are for an externally owned account only: called from a contract, a Pot included, they revert with “StandardBridge: function can only be called from an EOA”. A Sauce program usesdepositETHTo/depositERC20Toand names the recipient, the user’s wallet unless they chose otherwise- L1 to L2 deposits finalize in ~2-5 minutes (after L1 inclusion + sequencer processing)
- L2 to L1 withdrawals require 7-day challenge period (optimistic rollup security)
_l2Tokenmust be the official bridged token representation on Optimism — incorrect L2 token address will cause deposit to fail- Canonical bridge, secured by the Optimism rollup itself
- L2StandardBridge is at a predefined address:
0x4200000000000000000000000000000000000010
Its names in a program
On Ethereum,OptimismBridge is a namespace: its contracts need no import.
Deployments
ABI
OptimismL1StandardBridgeABI
import OptimismL1StandardBridgeABI from "./protocols/optimism-bridge/OptimismL1StandardBridgeABI.json"; Speaks for: l1StandardBridge.
depositETH(uint32 _minGasLimit, bytes _extraData) payabledepositERC20(address _l1Token, address _l2Token, uint256 _amount, uint32 _minGasLimit, bytes _extraData)depositETHTo(address _to, uint32 _minGasLimit, bytes _extraData) payabledepositERC20To(address _l1Token, address _l2Token, address _to, uint256 _amount, uint32 _minGasLimit, bytes _extraData)
Next steps
- Protocols: the other protocols, by what they do.
- Protocols and tokens: calling a contract by its namespace, or through its ABI.
- Glossary: the words these pages use, in plain terms.
