The following are the steps you need to take to add a chain to the registry:
Important
Ensure your chain is listed at ethereum-lists/chains. This is to ensure your chain has a unique chain ID. Our validation suite will check against this repository. This is a mandatory prerequisite before being added to the registry.
Adding a chain to the Superchain Registry requires using op-deployer
to deploy your chain. Check out the docs for more information on how to use it.
Install the following dependencies:
Dependency | Version | Version Check Command |
---|---|---|
git | ^2 |
git --version |
go | ^1.21 |
go version |
just | ^1.28.0 |
just --version |
You will be raising a Pull Request from your fork to the upstream repo.
We recommend only adding one chain at a time, and starting with a fresh branch of this repo for every chain.
Move the state.json
generated by op-deployer
into the .staging
directory. This will allow the validation tooling to find out information about you r chain and its deployment parameters.
Copy the below template into a file named metadata.toml
, and put it in the .staging
directory. This will provide information about your chain's name, RPC endpoints, governance status, and more. All fields are required:
# Human-readable name for your chain
name = "SlipChain"
# Machine-readable name for your chain. Config filenames will be named after this. Can only contain alphanumeric characters, dashes, and underscores.
short_name = "slipchain"
# Which superchain your chain belongs to. Can by sepolia or mainnet.
superchain = "sepolia"
# Public RPC endpoint for your chain.
public_rpc = "https://foo.bar.net"
# Sequencer RPC endpoint for your chain.
sequencer_rpc = "https://foo.bar.net"
# Block explorer for your chain.
explorer = "https://foo.bar.net"
# Superchain level for your chain.
superchain_level = 0
# Whether or not your chain is governed by Optimism. Must be `false`.
governed_by_optimism = false
# UNIX timestamp after which your chain will be opted into Superchain-wide upgrades.
superchain_time = 0
# DA type. Should probably be eth-da.
data_availability_type = "eth-da"
# Transaction hash of the transaction OP Deployer generated to deploy your chain.
deployment_tx_hash = ""
Run the following script from the root of the repository to open the PR.
just sync-staging
The team will then review and merge your chain when it's ready.
The tool will write the following data:
- The main configuration source, with genesis data, and address of onchain system configuration. These are written to
superchain/configs/<superchain-target>/<chain-short-name>.toml
. - Hardfork override times, where they have been set, will be included. If and when a chain becomes a standard chain, a
superchain_time
is set in the chain config. - Genesis system config data, formatted as JSON data compressed using
zstd
.
When opening a PR:
- Open it from a non-protected branch in your fork (e.g. avoid the
main
branch). This allows maintainers to push to your branch if needed, which streamlines the review and merge process. - Open one PR per chain you would like to add. This ensures the merge of one chain is not blocked by unexpected issues.
- Once the PR is opened, please check the box to allow edits from maintainers.
Automated checks will run on your PR to validate your chain. A report will also be generated that describes your chain's level of compliance with the standard blockchain charter.