Skip to main content
In this tutorial, you will learn how to programmatically withdraw CELO from Celo Sepolia to Sepolia using the viem OP Stack.

Steps to Withdraw CELO

Withdrawals require the user to submit three transactions:
  1. Withdrawal initiating a transaction, which the user submits on L2.
  2. Withdrawal proving transaction, which the user submits on L1 to prove that the withdrawal is legitimate.
  3. Withdrawal finalizing transaction, which the user submits on L1 after the fault challenge period has passed, to actually run the transaction on L1.

Code Example

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