Operators
Validate contract deployment

Overview

After deploying the L1 smart contracts for your OP Stack chain, it's crucial to verify that your deployment conforms to the standard configuration. This guide walks you through using op-validator to validate your deployment against the Superchain standard.

Why validate your deployment?

Validating your deployment ensures:

  1. Standardization - Your chain adheres to the Superchain standards
  2. Interoperability - Your chain will properly interact with other Superchain components
  3. Security - Your deployment follows best practices and security guidelines
  4. Upgradeability - Your chain can receive future protocol upgrades

Prerequisites

Validation process

Install op-validator

If you haven't already installed op-validator, follow the installation instructions.

Gather required information

You'll need the following information to validate your deployment:

  • L1 RPC URL: A reliable RPC endpoint for your L1 network
  • Absolute prestate: The absolute prestate hash of your deployment
  • Proxy admin address: Your chain's proxy admin contract address (not the proxy admin owner)
  • System config address: Your chain's SystemConfig contract address
  • L2 chain ID: The chain ID of your L2 network

With op-deployer, you can retrieve some of this information with:

  # Get deployment information
  op-deployer inspect l1 --workdir .deployer <l2-chain-id>
 
  # For the absolute prestate
  op-deployer inspect prestates --workdir .deployer <l2-chain-id>

Run validation for your contract version

Run the op-validator with the appropriate version parameter matching your deployed contracts:

For op-contracts v1.8.0:

    ./bin/op-validator validate v1.8.0 \
    --l1-rpc-url "<YOUR_L1_RPC_URL>" \
    --absolute-prestate "<YOUR_ABSOLUTE_PRESTATE>" \
    --proxy-admin "<YOUR_PROXY_ADMIN_ADDRESS>" \
    --system-config "<YOUR_SYSTEM_CONFIG_ADDRESS>" \
    --l2-chain-id "<YOUR_L2_CHAIN_ID>" \
    --fail

For op-contracts v2.0.0:

  ./bin/op-validator validate v2.0.0 \
  --l1-rpc-url "<YOUR_L1_RPC_URL>" \
  --absolute-prestate "<YOUR_ABSOLUTE_PRESTATE>" \
  --proxy-admin "<YOUR_PROXY_ADMIN_ADDRESS>" \
  --system-config "<YOUR_SYSTEM_CONFIG_ADDRESS>" \
  --l2-chain-id "<YOUR_L2_CHAIN_ID>" \
  --fail

Review the validation results

The validator will check multiple aspects of your deployment against the standard configuration:

  • Contract implementations and versions
  • Proxy configurations
  • System parameters
  • Cross-component relationships
  • Security settings

If validation passes, you'll see a success message. If there are issues, you'll see error codes with descriptions like:

ERRORDESCRIPTION
PDDG-40Permissioned dispute game
absolute prestate mismatch
PDDG-ANCHORP-40Permissioned dispute game
anchor state registry root
hash mismatch

Address any validation errors

If your deployment has validation errors:

  1. Understand the errors - Review the error codes and descriptions.
  2. Consider redeployment - For critical issues, redeploying with corrected parameters may be necessary.

Next Steps