Skip to main content
Use this guide to deploy a production-like Pessimistic Proof (PP) (cdk-opgeth-sovereign) devnet.

Prerequisites

Before starting, ensure you have:
  • A valid L1 RPC URL
  • A wallet address with Sepolia testnet funds (deployer)
  • Docker (or any other container orchestrator of your choice)
  • Cast
  • Polycli
  • Reference Repo (configuration files used in the guide)
Export these variables:
The values shown are specific to this example. Replace them with values relevant to your own setup.

Rollup Network Creation

Step 1: Submit a Request

To initiate the rollup creation:
  1. The Implementation Provider (IP) must submit a request to Polygon Labs.
  2. Use the Polygon Support Portal to raise a support ticket.

Required Parameters


Step 2: Setup by Polygon Labs

Once approved:
  • Polygon Labs provisions your Rollup.
  • A transaction is recorded (e.g., example).
You will receive:
  • combined.json: Core deployment details
  • genesis-base.json: Needed for genesis generation
Store these files securely. They are required for further deployment steps.

Genesis File Generation

Option Selection

Choose one:
  • Option 1 (Recommended): Merge OP + Polygon Genesis with pre-deployed contracts.
  • Option 2: Manual L2 contract deployment.
This guide focuses on Option 1.

Step-by-Step Instructions

  1. Environment Setup
Checkout the Desired Version. We will be usingv10.0.0-rc.7 in this example
Install dependencies as described in the repo’s README.
  1. Parameter File Creation
Update this file with the relevant information from your combined.json and your wallet addresses.
  1. Base Genesis Template
Paste the contents of your genesis-base.json into this file.
  1. Generate Genesis Files
  1. Rename the Output Files for Clarity

Network Deployment

Environment Variables

The values shown are specific to this example. Replace them with values relevant to your own setup.

L2 Deployment (Using op-deployer)

To set up your Layer 2 (L2) network using the OP Stack, we recommend starting with the official Optimism L2 Rollup tutorial. This guide provides a practical reference based on that tutorial and uses the op-deployer tool to streamline the deployment process.
All commands in this section are executed from the root directory of your project.
  1. Initialize deployer Folder
  1. Edit intent.toml with your parameters.
  2. Deploy L1 Contracts
  1. Merge Genesis Files
Next, you’ll need to combine the polygon-genesis.json file with the OP Stack’s genesis.json. The recommended approach is to embed the contents of polygon-genesis.json directly into the op-deployer state.
  1. Generate Files

Component Setup

OP Stack

  1. Create .env values
The values shown are specific to this example. Replace them with values relevant to your own setup.
  1. Generate secret
  1. Fund the batcher wallet on L1
  2. Initialize Data Directory
  1. Start Services

Aggkit

  1. Config
Update the config/aggkit.toml and config/bridge.toml config files with the relevant information from your combined.json, polygon-genesis-info.json and your wallet addresses.
  1. Create keystore files
The aggkit and bridge services require the sequencer, aggoracle, and claimtx wallet addresses to be provided through an encrypted keystore.
  1. Fund ClaimTX & Aggoracle
  1. Start PostgreSQL DB
  1. Run Services

Bridge

Environment Variables

The values shown are specific to this example. Replace them with values relevant to your own setup.

L1 to L2

  1. Initiate the Deposit from L1
Use the following command to bridge assets from L1 to your L2 network:
  1. Verify the Deposit on L2
Once the deposit is claimed on L2, you can verify it by checking the balance of the target address:

L2 to L1

  1. Initiate a Deposit
Start by making a deposit from L2 using the following command:
  1. Wait for the Pessimistic Proof
Once the deposit is made, a pessimistic proof will be generated. After this proof is available, the deposit becomes eligible for claiming.
  1. Verify the Deposit Status
You can check the status of your deposit by querying the bridge service:
If "ready_for_claim": true, the deposit is ready to be claimed.
  1. Claim the Deposit on L1
Run the following command to claim the deposit:
  1. Confirm the Claim
Finally, confirm that the deposit has been successfully claimed by checking the balance of the destination address:

Your PP network is now live.