Skip to main content
This guide is for developers who want to bridge CELO from Ethereum to Celo programmatically with the viem OP Stack. CELO is an ERC-20 token on Ethereum, so unlike a stock OP Stack chain the deposit goes through depositERC20Transaction rather than a plain value deposit. If you just want to bridge with a UI, use Superbridge. The example below runs against the testnets, bridging CELO from Ethereum Sepolia to Celo Sepolia.

Steps to bridge CELO

Before transferring tokens, you must authorize the OptimismPortalProxy contract to spend CELO on your behalf. Without this approval, the bridging transaction cannot proceed. Call the depositERC20Transaction function on the OptimismPortalProxy contract on Ethereum Sepolia. This function moves CELO tokens from your account to Celo Sepolia.

Code example

The following example demonstrates how to configure a file with all the details you need for interacting with Celo Sepolia.