Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
be63b65
update tut
krofax Mar 6, 2025
5806584
added a viem
krofax Mar 6, 2025
455696a
updated branch
krofax Mar 6, 2025
a4cf8bd
updating tuts
krofax Mar 6, 2025
a47ce5e
update tut
krofax Mar 10, 2025
22c650c
updated codebase and contents
krofax Mar 21, 2025
3fb2bf2
Auto-fix: Update breadcrumbs, spelling dictionary and other automated…
krofax Mar 21, 2025
723c4b8
Update pages/app-developers/tutorials/bridging/cross-dom-bridge-erc20…
krofax Mar 21, 2025
3fb0ccf
updated the codebase
krofax Mar 27, 2025
b0a6f00
Auto-fix: Update breadcrumbs, spelling dictionary and other automated…
krofax Mar 27, 2025
01cf9ec
updated the codebase and import
krofax Mar 28, 2025
f14cc9b
updated the scripts and file imports
krofax Apr 3, 2025
b448e9a
updated the file imports
krofax Apr 3, 2025
aa7d0a3
updated codes, contents and file imports
krofax Apr 3, 2025
f4d741f
updated codebase
krofax Apr 3, 2025
66850f9
tiny updates
krofax Apr 3, 2025
2b25d0c
Add detailed descriptions
krofax Apr 4, 2025
dd7db17
remove weird css bg color
krofax Apr 4, 2025
eeb11c0
fixed file imports
krofax Apr 4, 2025
dfea4bb
fixed another broken file imports
krofax Apr 4, 2025
beae074
fix typo
krofax Apr 4, 2025
5072187
fix hash
krofax Apr 7, 2025
e88aace
update text
krofax Apr 14, 2025
72d2be7
updated the genesis file
krofax May 5, 2025
75594f2
updated title
krofax May 5, 2025
79b1f10
updated the docs
krofax May 5, 2025
2ec9e85
removed some sections
krofax May 5, 2025
c77df77
Added meta.json
krofax May 6, 2025
3751204
Update pages/operators/chain-operators/deploy/genesis.mdx
krofax May 8, 2025
7bd9bd4
Update pages/operators/chain-operators/deploy/genesis.mdx
krofax May 8, 2025
ca7f3f3
Update pages/operators/chain-operators/deploy/genesis.mdx
krofax May 8, 2025
363849f
updated contents
krofax May 13, 2025
0a096f9
Auto-fix: Update breadcrumbs, spelling dictionary and other automated…
krofax May 13, 2025
5c481ae
Update pages/operators/chain-operators/deploy/genesis.mdx
krofax May 15, 2025
d154c18
Add the tutorial
krofax May 15, 2025
d20c8df
Merge branch 'main' into update-genesis
krofax May 15, 2025
70ab6e2
updated yaml file
krofax May 16, 2025
46e6e0b
updated yaml file
krofax May 16, 2025
bf81b1c
Auto-fix: Update breadcrumbs, spelling dictionary and other automated…
krofax May 16, 2025
2715823
updated package
krofax May 16, 2025
1120073
remove deprecation
krofax May 16, 2025
a07e8a8
Auto-fix: Update breadcrumbs, spelling dictionary and other automated…
krofax May 16, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
263 changes: 143 additions & 120 deletions pages/app-developers/tutorials/bridging/cross-dom-bridge-erc20.mdx

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions pages/notices/_meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,5 @@
"upgrade-14": "Upgrade 14: MT-Cannon and Isthmus L1 Contracts",
"upgrade-13": "Upgrade 13: OPCM and incident response improvements",
"blob-fee-bug": "Superchain testnets' blob fee bug",
"custom-gas-tokens-deprecation": "Preparing for Custom Gas Tokens deprecation",
"sdk-deprecation": "Preparing for Optimism SDK deprecation"
"custom-gas-tokens-deprecation": "Preparing for Custom Gas Tokens deprecation"
}
83 changes: 0 additions & 83 deletions pages/notices/sdk-deprecation.mdx

This file was deleted.

8 changes: 4 additions & 4 deletions pages/operators/chain-operators/deploy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ import { Card, Cards } from 'nextra/components'
This section provides information on OP Stack genesis creation, deployment overview, and smart contract deployment. You'll find guides and overviews to help you understand and work with these topics.

<Cards>
<Card title="Op stack genesis creation" href="/operators/chain-operators/deploy/genesis" />
<Card title="Chain artifacts creation" href="/operators/chain-operators/deploy/genesis" />

<Card title="Op stack deployment overview" href="/operators/chain-operators/deploy/overview" />
<Card title="Deployment overview" href="/operators/chain-operators/deploy/overview" />

<Card title="Op stack smart contract deployment" href="/operators/chain-operators/deploy/smart-contracts" />
<Card title="Smart contract deployment" href="/operators/chain-operators/deploy/smart-contracts" />

<Card title="Learn how to validate your OP Stack deployment using op-validator" href="/operators/chain-operators/deploy/validate-deployment" />
<Card title="Validate your contract deployment" href="/operators/chain-operators/deploy/validate-deployment" />

</Cards>
7 changes: 7 additions & 0 deletions pages/operators/chain-operators/deploy/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"overview": "Deployment overview",
"smart-contracts": "Smart contract deployment",
"validate-deployment": "Validate your contract deployment",
"genesis": "Chain artifacts creation"
}

109 changes: 62 additions & 47 deletions pages/operators/chain-operators/deploy/genesis.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: OP Stack genesis creation
title: Chain artifacts creation
lang: en-US
description: Learn how to create a genesis file for the OP Stack.
description: Learn how to create genesis and rollup configuration files using op-deployer after L1 contract deployment.
content_type: guide
topic: genesis-creation
personas:
Expand All @@ -20,78 +20,93 @@ is_imported_content: 'false'

import { Callout } from 'nextra/components'

# OP Stack genesis creation
# Overview

<Callout type="info">
The recommended way to generate genesis and rollup configuration files is using `op-deployer`.
This ensures standardization and compatibility with the Superchain.
</Callout>
After deploying the L1 system contracts for your OP Stack chain, you need to generate two files to run nodes on the L2 network:

* **Genesis file** (`genesis.json`): Initializes the execution client (`op-geth`)
* **Rollup configuration file** (`rollup.json`): Configures the consensus client (`op-node`)

The `op-deployer` tool simplifies the creation of genesis and rollup configuration files (`genesis.json` and `rollup.json`).
These files are crucial for initializing the execution client (`op-geth`) and consensus client (`op-node`) for your network.
This guide shows you how to generate these files from your L1 contract deployment data using `op-deployer`.

The recommended flow for creating a genesis file and rollup configuration file on the OP Stack is as follows:
## Prerequisites

1. **Deploy the L1 contracts** using [op-deployer](/operators/chain-operators/tools/op-deployer).
2. **Generate** both the L2 genesis file (`genesis.json`) and the rollup configuration file (`rollup.json`) using op-deployer's `inspect` commands.
3. **Initialize** your off-chain components (e.g., execution client, consensus client).
Before generating genesis and rollup configuration files, ensure you have:

## Recommended method: using op-deployer
1. Deployed the L1 contracts successfully using the [`op-deployer apply`](/operators/chain-operators/tools/op-deployer#apply-deploy-your-chain) command

### Prerequisites
2. Access to your deployment workspace directory (`.deployer` if you've followed the instructions in the L1 deployment contracts guide)

1. You have installed the `op-deployer` binary following the instructions in [deployer docs](/operators/chain-operators/tools/op-deployer#installation).
After installation, extract the `op-deployer` into your `PATH` and `cd op-deployer`.
## Generating genesis and rollup files

2. You have created and customized an intent file in a `.deployer` directory, typically by running:
After your L1 contracts have been deployed, follow these steps to generate the configuration files:

```bash
./bin/op-deployer init --l1-chain-id <YOUR_L1_CHAIN_ID> --l2-chain-ids <YOUR_L2_CHAIN_ID> --workdir .deployer
```
### Step 1: Locate your deployment state file

Replace `<YOUR_L1_CHAIN_ID>` and `<YOUR_L2_CHAIN_ID>` with their respective values, see a list of [`chainIds`](https://chainid.network/).
The `op-deployer` tool creates a `state.json` file in your workspace directory that contains all the necessary information about your deployed contracts.

3. You have edited that intent file to your liking (roles, addresses, etc.).
Verify that this file exists in your workspace:

```bash
ls -la .deployer/state.json
```

### Step 1: Deploy the L1 contracts
### Step 2: Generate the L2 genesis file

To deploy your chain to L1, run:
Use the `inspect genesis` command to retrieve your L2 genesis file:

```bash
./bin/op-deployer apply --workdir .deployer \
--l1-rpc-url <RPC_URL_FOR_L1> \
--private-key <DEPLOYER_PRIVATE_KEY_HEX>
op-deployer inspect genesis --workdir .deployer <L2_CHAIN_ID> > .deployer/genesis.json
```

This command:
Replace `<L2_CHAIN_ID>` with your L2 network's chain ID.

### Step 3: Generate the rollup configuration file

* Reads your intent file in `.deployer/.`
* Deploys the OP Stack contracts to the specified L1.
* Updates a local `state.json` file with the results of the deployment.
Use the `inspect rollup` command to retrieve your rollup configuration file:

### Step 2: Generate your L2 genesis file and rollup file
```bash
op-deployer inspect rollup --workdir .deployer <L2_CHAIN_ID> > .deployer/rollup.json
```

After your L1 contracts have been deployed, generate the L2 genesis and rollup configuration files by inspecting the deployer's `state.json`
### Step 4: Verify the generated files

Examine the generated files to ensure they contain the expected configuration:

```bash
./bin/op-deployer inspect genesis --workdir .deployer <L2_CHAIN_ID> > .deployer/genesis.json
./bin/op-deployer inspect rollup --workdir .deployer <L2_CHAIN_ID> > .deployer/rollup.json
# View the genesis file structure
jq . .deployer/genesis.json | head -20

# View the rollup configuration
jq . .deployer/rollup.json
```

* genesis.json is the file you will provide to your execution client (e.g. op-geth).
* rollup.json is the file you will provide to your consensus client (e.g. op-node).
The `genesis.json` file contains the initial state of your L2 blockchain, including:

* Chain configuration parameters
* Initial account states
* Genesis block properties

The `rollup.json` file contains the rollup protocol parameters, including:

### Step 3: Initialize your off-chain components
* L1 contract addresses
* Sequencing settings
* Protocol upgrade activation times

Once you have `genesis.json` and `rollup.json`:
## Troubleshooting

1. Initialize op-geth using genesis.json.
2. Configure op-node with rollup.json.
3. Set up additional off-chain infrastructure as needed (block explorer, indexers, etc.). For more on architecture, see [Architecture overview](/operators/chain-operators/architecture).
If you encounter issues with the generated files:

* [Verify](/operators/chain-operators/tools/op-deployer#verify-verify-contract-source-code-on-block-explorers) that your L1 contract deployment was successful
* Check that you're using the correct **L2 chain ID** in the generation commands
* Ensure your `state.json` file is up-to-date with your latest deployment

<Callout type="warning">
Never manually edit the generated genesis or rollup files unless you fully understand the implications. Incorrect configurations can lead to consensus failures or chain security issues.
</Callout>

## Next steps

* Learn how to [initialize](/operators/node-operators/configuration/base-config#initialization-via-genesis-file)
`op-geth` with your `genesis.json` file.
* Learn how to [initialize](/operators/node-operators/configuration/base-config#configuring-op-node) `op-node` with your `rollup.json` file.
* Learn more about the off chain [architecture](/operators/chain-operators/architecture).
* Learn how to [initialize](/operators/node-operators/configuration/base-config#initialization-via-genesis-file) `op-geth` with your `genesis.json` file
* Learn how to [configure](/operators/node-operators/configuration/base-config#configuring-op-node) `op-node` with your `rollup.json` file
* Learn more about the off-chain [architecture](/operators/chain-operators/architecture)
4 changes: 2 additions & 2 deletions pages/operators/chain-operators/deploy/overview.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: OP Stack deployment overview
title: Deployment overview
lang: en-US
description: Learn about the different components of deploying a standard OP Stack chain.
content_type: guide
Expand All @@ -20,7 +20,7 @@ is_imported_content: 'false'

import { Callout } from 'nextra/components'

# OP Stack deployment overview
# Deployment overview

When deploying a **standard OP Stack chain**, you'll be setting up several key
components. It's useful to understand what each of these components does before
Expand Down
6 changes: 2 additions & 4 deletions pages/operators/chain-operators/deploy/smart-contracts.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: OP Stack Smart Contract Deployment
title: Smart contract deployment
lang: en-US
description: Learn how to deploy the OP Stack L1 smart contracts.
content_type: guide
Expand All @@ -20,12 +20,10 @@ is_imported_content: 'false'

import { Callout, Steps } from 'nextra/components'

# OP Stack smart contract deployment
# Overview

This guide outlines the process for deploying the OP Stack L1 smart contracts using `op-deployer`.

## Overview

Deploying OP Stack L1 contracts is a critical step in setting up your rollup.

<Callout type="warning">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: Validating your OP Stack deployment
title: Validate your contract deployment
lang: en-US
description: Learn how to validate your OP Stack deployment using op-validator
content_type: guide
Expand Down
Loading