op-validator is a tool for validating Standard OP Stack chain configurations and deployments to ensure they’re in compliance with the Standard Rollup Charter.
It works by calling into the StandardValidator smart contracts.
These then perform a set of checks, and return error codes for any issues found.
These checks include:
- Contract implementations and versions
- Proxy configurations
- System parameters
- Cross-component relationships
- Security settings
How to use op-validator
Usage
The validator supports different protocol versions through subcommands:op-contracts version:
v1.8.0- For validatingop-contracts/1.8.0v2.0.0- For validatingop-contracts/2.0.0
Flags
| Option | Description | Required/Optional |
|---|---|---|
--l1-rpc-url | L1 RPC URL (can also be set via L1_RPC_URL environment variable) | Required |
--absolute-prestate | Absolute prestate as hex string | Required |
--proxy-admin | Proxy admin address as hex string. This should be a specific chain’s proxy admin contract on L1. It is not the proxy admin owner or the superchain proxy admin. | Required |
--system-config | System config proxy address as hex string | Required |
--l2-chain-id | L2 chain ID | Required |
--fail | Exit with non-zero code if validation errors are found (defaults to true) | Optional |