From 7a1464d8f7eba3bc232ff5795702b0a7ff90b6e4 Mon Sep 17 00:00:00 2001 From: krofax Date: Fri, 24 Jan 2025 15:22:39 +0100 Subject: [PATCH 01/13] Updated callouts --- .../deploy/smart-contracts.mdx | 105 +++++++++++++++--- 1 file changed, 87 insertions(+), 18 deletions(-) diff --git a/pages/builders/chain-operators/deploy/smart-contracts.mdx b/pages/builders/chain-operators/deploy/smart-contracts.mdx index 2a26e2f10..642eb9b50 100644 --- a/pages/builders/chain-operators/deploy/smart-contracts.mdx +++ b/pages/builders/chain-operators/deploy/smart-contracts.mdx @@ -4,13 +4,12 @@ lang: en-US description: Learn how to deploy the OP Stack L1 smart contracts. --- -import { Callout } from 'nextra/components' +import { Callout, Steps } from 'nextra/components' # OP Stack smart contract deployment - -This page is out of date and shows the legacy method for smart contract deployment. -For the latest recommended method, use [op-deployer](/builders/chain-operators/tools/op-deployer). + + Standard OP Stack chains must use the latest governance approved and audited versions of the smart contract code. The following guide shows you how to deploy the OP Stack L1 smart contracts. @@ -19,29 +18,28 @@ official contract releases**. You can visit the see the [smart contract overview for the official release versions. Changes to the smart contracts are generally not considered backwards compatible. - - Standard OP Stack chains should use the latest governance approved and audited versions of the smart contract code. + +The following deployment information outlines the legacy method for deploying the OP Stack L1 contracts. +We do not recommend using this method, and it is provided here only for historical context. -## Deployment configuration +## Deployment Configuration + +To deploy OP Stack contracts, you need to create a deployment configuration JSON file. +The file should be placed in the following monorepo subdirectory: [packages/contracts-bedrock/deploy-config](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts-bedrock/deploy-config). -Deploying your OP Stack contracts requires creating a deployment configuration -JSON file. You will create a new deployment configuration file in the following -monorepo subdirectory: [packages/contracts-bedrock/deploy-config](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts-bedrock/deploy-config) -For the full set of deployment configuration options and their meanings, you -can see the [rollup deployment configuration page](/builders/chain-operators/configuration/rollup). +For a detailed explanation of the configuration options and their meanings, refer to the [rollup deployment configuration page](/builders/chain-operators/configuration/rollup). -## Deployment script +## Deployment script (Legacy Method) -The smart contracts are deployed using [foundry](https://github.com/foundry-rs) -and you can find the script's source code in the monorepo at +The legacy method for deploying smart contracts uses [foundry](https://github.com/foundry-rs) and the deployment script located in the monorepo at [packages/contracts-bedrock/scripts/deploy/Deploy.s.sol](https://github.com/ethereum-optimism/optimism/blob/develop/packages/contracts-bedrock/scripts/deploy/Deploy.s.sol). ### State diff -Before deploying the contracts, you can verify the state diff by using the `runWithStateDiff()` function signature in the deployment script, which produces -the outputs inside [`snapshots/state-diff/`](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts-bedrock/snapshots/state-diff). -Run the deployment with state diffs by executing: +You can verify the state diff before deploying the contracts by using the `runWithStateDiff()` function in the deployment script. +This produces outputs in [`snapshots/state-diff/`](https://github.com/ethereum-optimism/optimism/tree/develop/packages/contracts-bedrock/snapshots/state-diff). +Run the deployment with state diffs using the following command: ```bash forge script -vvv scripts/deploy/Deploy.s.sol:Deploy --sig 'runWithStateDiff()' --rpc-url $ETH_RPC_URL --broadcast --private-key $PRIVATE_KEY @@ -82,6 +80,77 @@ All functions for deploying a single contract are public, meaning that the `--sig` argument to forge script can be used to target the deployment of a single contract. + +## Using `op-deployer` + +The recommended way to deploy the L1 smart contracts is with the `op-deployer` tool. +Follow these steps: + + +{

Install op-deployer

} + +The recommended way to install `op-deployer` is to download the latest release from the monorepo's +[release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary +for your platform then extract it somewhere on your `PATH`. + +{

Configure deployment settings

} +Create a deployment configuration file following the op-deployer specifications. + +* Create a configuration file(`deployer-config.json`) in JSON format that defines the parameters for your deployment. +* You can find a configuration template in the op-deployer documentation. +* The configuration file typically includes parameters like: + * Chain ID + * RPC URLs for L1 and L2 + * Deployment addresses + * Contract configuration. + +{

Bootstrap the deployment

} + +Before deploying the contracts, bootstrap your environment to ensure all prerequisites are met: + +```bash +# Bootstrap the deployment + +op-deployer bootstrap --config <./deploy-config.json> +``` + +This step verifies that: + +* The L1 and L2 RPC URLs are accessible. +* The configuration file is valid and complete. + +{

Deploy contracts

} +Run the following command to deploy the L1 and L2 smart contracts: + +```bash +# Deploy the contracts + +op-deployer deploy --config ./deploy-config.json --rpc https://mainnet.infura.io/v3/ +``` + +*Parameters:* + +* **--config:** Path to your deployment configuration file. +* **--rpc:** The RPC URL for the L1 network. + +{

Verify the deployment

} +Once the deployment is complete, you can verify the deployed contract addresses and configuration: + +* Check the deployment output for contract addresses and transaction details. +* Verify the deployed contracts on the block explorer using the specified `ETHERSCAN_API_KEY` in the configuration file. + +```bash +# Verify the contracts (optional, requires ETHERSCAN_API_KEY in config) + +op-deployer verify --config ./deploy-config.json +``` +
+ + +If you need deterministic deployment (e.g., for deploying contracts at the same address across multiple chains), +use the `CREATE2` method. + + ## Best practices Production users should deploy their L1 contracts from a contracts release. From b51399e7621ea6afd83689c079d3bb6d4d619e60 Mon Sep 17 00:00:00 2001 From: krofax Date: Fri, 24 Jan 2025 15:23:54 +0100 Subject: [PATCH 02/13] fix indentation issues --- .../chain-operators/configuration/batcher.mdx | 98 +++++++++---------- pages/stack/interop/op-supervisor.mdx | 29 +++--- words.txt | 12 +-- 3 files changed, 69 insertions(+), 70 deletions(-) diff --git a/pages/builders/chain-operators/configuration/batcher.mdx b/pages/builders/chain-operators/configuration/batcher.mdx index 5d23e5fef..54db1a3d4 100644 --- a/pages/builders/chain-operators/configuration/batcher.mdx +++ b/pages/builders/chain-operators/configuration/batcher.mdx @@ -59,7 +59,7 @@ You can use [this calculator](https://docs.google.com/spreadsheets/d/12VIiXHaVEC ### active-sequencer-check-duration -The duration between checks to determine the active sequencer endpoint. The +The duration between checks to determine the active sequencer endpoint. The default value is `2m0s`. @@ -68,7 +68,7 @@ default value is `2m0s`. `OP_BATCHER_ACTIVE_SEQUENCER_CHECK_DURATION=2m0s` -### altda.da-server +### altda.da-server HTTP address of a DA Server. @@ -92,7 +92,7 @@ value is `false`. ### altda.enabled Enable Alt-DA mode -Alt-DA Mode is a Beta feature of the MIT licensed OP Stack. +Alt-DA Mode is a Beta feature of the MIT licensed OP Stack. While it has received initial review from core contributors, it is still undergoing testing, and may have bugs or other issues. The default value is `false`. @@ -145,7 +145,7 @@ Verify input data matches the commitments from the DA storage service. ### approx-compr-ratio -The approximate compression ratio (`<=1.0`). Only relevant for ratio +The approximate compression ratio (`<=1.0`). Only relevant for ratio compressor. The default value is `0.6`. @@ -167,9 +167,9 @@ is `0` for `SingularBatch`. ### check-recent-txs-depth -Indicates how many blocks back the batcher should look during startup for a -recent batch tx on L1. This can speed up waiting for node sync. It should be -set to the verifier confirmation depth of the sequencer (e.g. 4). The default +Indicates how many blocks back the batcher should look during startup for a +recent batch tx on L1. This can speed up waiting for node sync. It should be +set to the verifier confirmation depth of the sequencer (e.g. 4). The default value is `0`. @@ -180,7 +180,7 @@ value is `0`. ### compression-algo -The compression algorithm to use. Valid options: zlib, brotli, brotli-9, +The compression algorithm to use. Valid options: zlib, brotli, brotli-9, brotli-10, brotli-11. The default value is `zlib`. @@ -191,7 +191,7 @@ brotli-10, brotli-11. The default value is `zlib`. ### compressor -The type of compressor. Valid options: none, ratio, shadow. The default value +The type of compressor. Valid options: none, ratio, shadow. The default value is `shadow`. @@ -202,7 +202,7 @@ is `shadow`. ### data-availability-type -The data availability type to use for submitting batches to the L1. Valid +The data availability type to use for submitting batches to the L1. Valid options: calldata, blobs. The default value is `calldata`. @@ -245,8 +245,8 @@ HTTP provider URL for L1. ### l2-eth-rpc -HTTP provider URL for L2 execution engine. A comma-separated list enables the -active L2 endpoint provider. Such a list needs to match the number of +HTTP provider URL for L2 execution engine. A comma-separated list enables the +active L2 endpoint provider. Such a list needs to match the number of rollup-rpcs provided. @@ -308,7 +308,7 @@ Maximum number of blocks to add to a span batch. **Default is 0 (no maximum)**. ### max-channel-duration -The maximum duration of L1-blocks to keep a channel open. 0 to disable. The +The maximum duration of L1-blocks to keep a channel open. 0 to disable. The default value is `0`. @@ -319,7 +319,7 @@ default value is `0`. ### max-l1-tx-size-bytes -The maximum size of a batch tx submitted to L1. Ignored for blobs, where max +The maximum size of a batch tx submitted to L1. Ignored for blobs, where max blob size will be used. The default value is `120000`. @@ -391,7 +391,7 @@ Timeout for all network operations. The default value is `10s`. ### num-confirmations -Number of confirmations which we will wait after sending a transaction. The +Number of confirmations which we will wait after sending a transaction. The default value is `10`. @@ -412,7 +412,7 @@ HTTP address of a DA Server. ### altda.da-service -Use DA service type where commitments are generated by altda server. The +Use DA service type where commitments are generated by altda server. The default value is `false`. @@ -433,7 +433,7 @@ Enable altda mode. The default value is `false`. ### altda.verify-on-read -Verify input data matches the commitments from the DA storage service. The +Verify input data matches the commitments from the DA storage service. The default value is `true`. @@ -494,7 +494,7 @@ pprof listening port. The default value is `6060`. ### pprof.type -pprof profile type. One of cpu, heap, goroutine, threadcreate, block, mutex, +pprof profile type. One of cpu, heap, goroutine, threadcreate, block, mutex, allocs. @@ -515,7 +515,7 @@ The private key to use with the service. Must not be used with mnemonic. ### resubmission-timeout -Duration we will wait before resubmitting a transaction to L1. The default +Duration we will wait before resubmitting a transaction to L1. The default value is `48s`. @@ -527,7 +527,7 @@ value is `48s`. ### rollup-rpc HTTP provider URL for Rollup node. A comma-separated list enables the active L2 -endpoint provider. Such a list needs to match the number of l2-eth-rpcs +endpoint provider. Such a list needs to match the number of l2-eth-rpcs provided. @@ -568,7 +568,7 @@ rpc listening port. The default value is `8545`. ### safe-abort-nonce-too-low-count -Number of ErrNonceTooLow observations required to give up on a tx at a +Number of ErrNonceTooLow observations required to give up on a tx at a particular nonce without receiving confirmation. The default value is `3`. @@ -610,9 +610,9 @@ Signer endpoint the client will connect to. ### signer.header -Headers to pass to the remote signer. Format `key=value`. -Value can contain any character allowed in an HTTP header. -When using env vars, split multiple headers with commas. +Headers to pass to the remote signer. Format `key=value`.\ +Value can contain any character allowed in an HTTP header.\ +When using env vars, split multiple headers with commas.\ When using flags, provide one key-value pair per flag. @@ -654,7 +654,7 @@ tls key. The default value is `tls/tls.key`. ### stopped Initialize the batcher in a stopped state. The batcher can be started using the -admin_startBatcher RPC. The default value is `false`. +admin\_startBatcher RPC. The default value is `false`. `--stopped=` @@ -665,7 +665,7 @@ admin_startBatcher RPC. The default value is `false`. ### sub-safety-margin The batcher tx submission safety margin (in #L1-blocks) to subtract from a -channel's timeout and sequencing window, to guarantee safe inclusion of a +channel's timeout and sequencing window, to guarantee safe inclusion of a channel on L1. The default value is `10`. @@ -705,7 +705,7 @@ The total DA limit to start imposing on block building **when we are over the th `OP_BATCHER_THROTTLE_BLOCK_SIZE=50000` ---- +*** ### throttle-interval @@ -717,11 +717,11 @@ Interval between potential DA throttling actions. **Zero disables throttling**. `OP_BATCHER_THROTTLE_INTERVAL=5s` ---- +*** ### throttle-threshold -Threshold on `pending-blocks-bytes-current` beyond which the batcher instructs the +Threshold on `pending-blocks-bytes-current` beyond which the batcher instructs the\ block builder to start throttling transactions with larger DA demands. @@ -730,7 +730,7 @@ block builder to start throttling transactions with larger DA demands. `OP_BATCHER_THROTTLE_THRESHOLD=1500000` ---- +*** ### throttle-tx-size @@ -744,7 +744,7 @@ The DA size of transactions at which throttling begins **when we are over the th ### txmgr.fee-limit-threshold -The minimum threshold (in GWei) at which fee bumping starts to be capped. +The minimum threshold (in GWei) at which fee bumping starts to be capped. Allows arbitrary fee bumps below this threshold. The default value is `100`. @@ -755,7 +755,7 @@ Allows arbitrary fee bumps below this threshold. The default value is `100`. ### txmgr.min-basefee -Enforces a minimum base fee (in GWei) to assume when determining tx fees. 1 +Enforces a minimum base fee (in GWei) to assume when determining tx fees. 1 GWei by default. The default value is `1`. @@ -798,7 +798,7 @@ Frequency to poll for receipts. The default value is `12s`. ### txmgr.send-timeout -Timeout for sending transactions. If 0 it is disabled. The default value is +Timeout for sending transactions. If 0 it is disabled. The default value is `0s`. @@ -809,8 +809,8 @@ Timeout for sending transactions. If 0 it is disabled. The default value is ### wait-node-sync -Indicates if, during startup, the batcher should wait for a recent batcher tx -on L1 to finalize (via more block confirmations). This should help avoid +Indicates if, during startup, the batcher should wait for a recent batcher tx +on L1 to finalize (via more block confirmations). This should help avoid duplicate batcher txs. The default value is `false`. @@ -843,27 +843,27 @@ Print the version. The default value is false. The batcher policy defines high-level constraints and responsibilities regarding how L2 data is posted to L1. Below are the standard guidelines for configuring the batcher within the OP Stack. -| Parameter | Description | Administrator | Requirement | Notes | -|-----------|------------|---------------|-------------|--------| -| Data Availability Type | Specifies whether the batcher uses **blobs** or **calldata** to post transaction data to L1. | Batch submitter address | Ethereum (Blobs or Calldata) | - Alternative data availability (Alt-DA) is not yet supported in the standard configuration.
- The sequencer can switch at will between blob transactions and calldata, with no restrictions, because both are fully secured by L1. | -| Batch Submission Frequency | Determines how frequently the batcher submits aggregated transaction data to L1 (via the batcher transaction). | Batch submitter address | Must target **1,800 L1 blocks** (6 hours on Ethereum, assuming 12s L1 block time) or lower | - Batches must be posted before the sequencing window closes (commonly 12 hours by default).
- Leave a buffer for L1 network congestion and data size to ensure that each batch is fully committed in a timely manner. | -| Output Frequency | Defines how frequently L2 output roots are submitted to L1 (via the output oracle). | L1 Proxy Admin | **43,200 L2 blocks** (24 hours at 2s block times) or lower | - Once fault proofs are implemented, this value may become deprecated.
- It cannot be set to 0 (there must be some cadence for outputs). | +| Parameter | Description | Administrator | Requirement | Notes | +| -------------------------- | -------------------------------------------------------------------------------------------------------------- | ----------------------- | ------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Data Availability Type | Specifies whether the batcher uses **blobs** or **calldata** to post transaction data to L1. | Batch submitter address | Ethereum (Blobs or Calldata) | - Alternative data availability (Alt-DA) is not yet supported in the standard configuration.
- The sequencer can switch at will between blob transactions and calldata, with no restrictions, because both are fully secured by L1. | +| Batch Submission Frequency | Determines how frequently the batcher submits aggregated transaction data to L1 (via the batcher transaction). | Batch submitter address | Must target **1,800 L1 blocks** (6 hours on Ethereum, assuming 12s L1 block time) or lower | - Batches must be posted before the sequencing window closes (commonly 12 hours by default).
- Leave a buffer for L1 network congestion and data size to ensure that each batch is fully committed in a timely manner. | +| Output Frequency | Defines how frequently L2 output roots are submitted to L1 (via the output oracle). | L1 Proxy Admin | **43,200 L2 blocks** (24 hours at 2s block times) or lower | - Once fault proofs are implemented, this value may become deprecated.
- It cannot be set to 0 (there must be some cadence for outputs). | ### Additional Guidance -* **Data Availability Types**: - * **Calldata** is generally simpler but can be more expensive on mainnet Ethereum, depending on gas prices. - * **Blobs** are typically lower cost when your chain has enough transaction volume to fill large chunks of data. +* **Data Availability Types**: + * **Calldata** is generally simpler but can be more expensive on mainnet Ethereum, depending on gas prices. + * **Blobs** are typically lower cost when your chain has enough transaction volume to fill large chunks of data. * The `op-batcher` can toggle between these approaches by setting the `--data-availability-type=` flag or with the `OP_BATCHER_DATA_AVAILABILITY_TYPE` env variable. -* **Batch Submission Frequency** (`OP_BATCHER_MAX_CHANNEL_DURATION` and related flags): - * Standard OP Chains frequently target a maximum channel duration between 1–6 hours. - * Your chain should never exceed your L2's sequencing window (commonly 12 hours). +* **Batch Submission Frequency** (`OP_BATCHER_MAX_CHANNEL_DURATION` and related flags): + * Standard OP Chains frequently target a maximum channel duration between 1–6 hours. + * Your chain should never exceed your L2's sequencing window (commonly 12 hours). * If targeting a longer submission window (e.g., 5 or 6 hours), be aware that the [safe head](https://github.com/ethereum-optimism/specs/blob/main/specs/glossary.md#safe-l2-head) can stall up to that duration. -* **Output Frequency**: - * Used to post output roots to L1 for verification. - * The recommended maximum is 24 hours (43,200 blocks at 2s each), though many chains choose smaller intervals. +* **Output Frequency**: + * Used to post output roots to L1 for verification. + * The recommended maximum is 24 hours (43,200 blocks at 2s each), though many chains choose smaller intervals. * Will eventually be replaced or significantly changed by the introduction of fault proofs. Include these high-level "policy" requirements when you set up or modify your `op-batcher` configuration. See the [Batcher Configuration](#global-options) reference, which explains each CLI flag and environment variable in depth. diff --git a/pages/stack/interop/op-supervisor.mdx b/pages/stack/interop/op-supervisor.mdx index 9f7dfd835..4a3af2c43 100644 --- a/pages/stack/interop/op-supervisor.mdx +++ b/pages/stack/interop/op-supervisor.mdx @@ -11,14 +11,15 @@ import { InteropCallout } from '@/components/WipCallout' # OP-Supervisor -OP-Supervisor is a service that verifies cross-chain messages and manages interoperability between chains in the OP Stack. +OP-Supervisor is a service that verifies cross-chain messages and manages interoperability between chains in the OP Stack. The main information it contains about other blockchains is: -- Log entries, which could be [initiating messages](./explainer#how-messages-get-from-one-chain-to-the-other) for cross-domain messages. -- Blockchain heads, which are the latest blocks at various levels of confidence and safety: - - Unsafe (the latest block available through the gossip protocol) - - Local-safe (the latest block written to L1) - - Cross-safe (the latest block written to L1, and for which all the dependencies are written to L1) - - Finalized (the latest block written to L1, and that L1 block is safe from reorgs) + +* Log entries, which could be [initiating messages](./explainer#how-messages-get-from-one-chain-to-the-other) for cross-domain messages. +* Blockchain heads, which are the latest blocks at various levels of confidence and safety: + * Unsafe (the latest block available through the gossip protocol) + * Local-safe (the latest block written to L1) + * Cross-safe (the latest block written to L1, and for which all the dependencies are written to L1) + * Finalized (the latest block written to L1, and that L1 block is safe from reorgs) ```mermaid @@ -51,14 +52,14 @@ To do this, OP-Supervisor has to have RPC access to all the chains in the depend ## How other components use OP-Supervisor -- The execution client (typically `op-geth`) queries `op-supervisor` during block-building to verify if a message is sufficiently safe to include. - To do this, the execution client looks at every executing message and queries `op-supervisor` to see if there is a corresponding initiating message. +* The execution client (typically `op-geth`) queries `op-supervisor` during block-building to verify if a message is sufficiently safe to include. + To do this, the execution client looks at every executing message and queries `op-supervisor` to see if there is a corresponding initiating message. -- `op-node` queries cross-chain safety information and coordinates safety updates between OP stack nodes and `op-supervisor`. It uses the API provided by `op-supervisor` to: - - Retrieve the unsafe, local-safe, cross-safe, and finalized heads for other chains. - - Update the unsafe, local-safe, and finalized heads for its own chain. - - Attempt to promote blocks in its own chain to cross-safe status. - - Attempt to finalize L2 blocks based on L1 finality. +* `op-node` queries cross-chain safety information and coordinates safety updates between OP stack nodes and `op-supervisor`. It uses the API provided by `op-supervisor` to: + * Retrieve the unsafe, local-safe, cross-safe, and finalized heads for other chains. + * Update the unsafe, local-safe, and finalized heads for its own chain. + * Attempt to promote blocks in its own chain to cross-safe status. + * Attempt to finalize L2 blocks based on L1 finality. ### API diff --git a/words.txt b/words.txt index 98b56d10d..35574bf9d 100644 --- a/words.txt +++ b/words.txt @@ -1,5 +1,5 @@ -accountqueue ACCOUNTQUEUE +accountqueue ACCOUNTSLOTS accountslots ADDI @@ -34,8 +34,8 @@ blobspace Blockdaemon Blockdaemon's blockhash -BLOCKLOGS blocklists +BLOCKLOGS blocklogs BLOCKPROFILERATE blockprofilerate @@ -85,6 +85,7 @@ DATADIR datadir Devnet devnet +Devnets devnets devx direnv @@ -162,7 +163,6 @@ Inator inator INFLUXDBV influxdbv -intiating IPCDISABLE ipcdisable ipcfile @@ -176,7 +176,6 @@ JSPATH jspath jwtsecret Keccak -Learn leveldb lightkdf logfile @@ -195,7 +194,6 @@ MEMPROFILERATE memprofilerate Merkle merkle -mesage MFHI MFLO Minato @@ -275,7 +273,6 @@ PPROF pprof Precommitments precommitments -Preconfigured preconfigured predeploy Predeployed @@ -411,6 +408,7 @@ vhosts Viem viem Viem's +viem's VMDEBUG vmdebug VMODULE @@ -422,4 +420,4 @@ xtensibility ZKPs ZKVM Zora -zora \ No newline at end of file +zora From af231c46af49d1a25cbdcfafcdf7354e881b927a Mon Sep 17 00:00:00 2001 From: krofax Date: Fri, 24 Jan 2025 16:20:44 +0100 Subject: [PATCH 03/13] updated the L1 contract deployement section --- .../deploy/smart-contracts.mdx | 39 ++++++++----------- 1 file changed, 17 insertions(+), 22 deletions(-) diff --git a/pages/builders/chain-operators/deploy/smart-contracts.mdx b/pages/builders/chain-operators/deploy/smart-contracts.mdx index 642eb9b50..eb8b66ed2 100644 --- a/pages/builders/chain-operators/deploy/smart-contracts.mdx +++ b/pages/builders/chain-operators/deploy/smart-contracts.mdx @@ -87,37 +87,32 @@ The recommended way to deploy the L1 smart contracts is with the `op-deployer` t Follow these steps: -{

Install op-deployer

} +{

Set Up Your Environment

} -The recommended way to install `op-deployer` is to download the latest release from the monorepo's -[release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary -for your platform then extract it somewhere on your `PATH`. +* Install `op-deployer`: + The recommended way to install `op-deployer` is to download the latest release from the monorepo's + [release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary + for your platform then extract it somewhere on your `PATH`. +* Access to the L1 blockchain (e.g., Sepolia or Mainnet) via an RPC URL. +* A private key with sufficient funds to cover deployment costs. -{

Configure deployment settings

} -Create a deployment configuration file following the op-deployer specifications. -* Create a configuration file(`deployer-config.json`) in JSON format that defines the parameters for your deployment. -* You can find a configuration template in the op-deployer documentation. -* The configuration file typically includes parameters like: - * Chain ID - * RPC URLs for L1 and L2 - * Deployment addresses - * Contract configuration. +{

Create an intent file

} -{

Bootstrap the deployment

} +* Define the configuration of your chain in an intent file. +* This file specifies the deployment parameters for both L1. +Follow the instructions provided in the [configure your chain](/tools/op-deployer#init-configure-your-chain) section to generate the intent file. -Before deploying the contracts, bootstrap your environment to ensure all prerequisites are met: +{

Run the `apply` command

} -```bash -# Bootstrap the deployment +Execute the following command to deploy the L1 smart contracts: -op-deployer bootstrap --config <./deploy-config.json> +```bash +op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` -This step verifies that: - -* The L1 and L2 RPC URLs are accessible. -* The configuration file is valid and complete. +* Replace `` with your L1 RPC URL. +* Replace `` with the private key of the account used for deployment. {

Deploy contracts

} Run the following command to deploy the L1 and L2 smart contracts: From b83fa28e255270b4719886fa4065bf5e8760286d Mon Sep 17 00:00:00 2001 From: krofax Date: Fri, 24 Jan 2025 16:22:45 +0100 Subject: [PATCH 04/13] removed redundant section --- .../deploy/smart-contracts.mdx | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/pages/builders/chain-operators/deploy/smart-contracts.mdx b/pages/builders/chain-operators/deploy/smart-contracts.mdx index eb8b66ed2..aa003f11c 100644 --- a/pages/builders/chain-operators/deploy/smart-contracts.mdx +++ b/pages/builders/chain-operators/deploy/smart-contracts.mdx @@ -114,31 +114,12 @@ op-deployer apply --workdir .deployer --l1-rpc-url --private-key ` with your L1 RPC URL. * Replace `` with the private key of the account used for deployment. -{

Deploy contracts

} -Run the following command to deploy the L1 and L2 smart contracts: - -```bash -# Deploy the contracts - -op-deployer deploy --config ./deploy-config.json --rpc https://mainnet.infura.io/v3/ -``` - -*Parameters:* - -* **--config:** Path to your deployment configuration file. -* **--rpc:** The RPC URL for the L1 network. - {

Verify the deployment

} Once the deployment is complete, you can verify the deployed contract addresses and configuration: * Check the deployment output for contract addresses and transaction details. * Verify the deployed contracts on the block explorer using the specified `ETHERSCAN_API_KEY` in the configuration file. -```bash -# Verify the contracts (optional, requires ETHERSCAN_API_KEY in config) - -op-deployer verify --config ./deploy-config.json -```
From c553cf3f3cd467f95ead08331228094aca16817d Mon Sep 17 00:00:00 2001 From: krofax Date: Fri, 24 Jan 2025 16:28:03 +0100 Subject: [PATCH 05/13] Add the steps to l2 testnet tutorial --- .../tutorials/create-l2-rollup.mdx | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx index 0090367f1..0361b1bd3 100644 --- a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx +++ b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx @@ -419,20 +419,44 @@ cast codesize 0x4e59b44847b379578588920cA78FbF26c0B4956C --rpc-url $L1_RPC_URL Once you've configured your network, it's time to deploy the L1 contracts necessary for the functionality of the chain. +### Using `op-deployer` + +The recommended way to deploy the L1 smart contracts is with the `op-deployer` tool. +Follow these steps: + +{

Set Up Your Environment

} + +* Install `op-deployer`: + The recommended way to install `op-deployer` is to download the latest release from the monorepo's + [release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary + for your platform then extract it somewhere on your `PATH`. +* Access to the L1 blockchain (e.g., Sepolia or Mainnet) via an RPC URL. +* A private key with sufficient funds to cover deployment costs. + + +{

Create an intent file

} + +* Define the configuration of your chain in an intent file. +* This file specifies the deployment parameters for deploying the L1 smart contract. +Follow the instructions provided in the [configure your chain](/tools/op-deployer#init-configure-your-chain) section to generate the intent file. -{

Deploy the L1 contracts

} +{

Run the `apply` command

} + +Execute the following command to deploy the L1 smart contracts: ```bash -forge script scripts/Deploy.s.sol:Deploy --private-key $GS_ADMIN_PRIVATE_KEY --broadcast --rpc-url $L1_RPC_URL --slow +op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` - -If you see a nondescript error that includes `EvmError: Revert` and `Script failed` then you likely need to change the `IMPL_SALT` environment variable. -This variable determines the addresses of various smart contracts that are deployed via [CREATE2](https://eips.ethereum.org/EIPS/eip-1014). -If the same `IMPL_SALT` is used to deploy the same contracts twice, the second deployment will fail. -**You can generate a new `IMPL_SALT` by running `direnv allow` anywhere in the Optimism Monorepo.** - +* Replace `` with your L1 RPC URL. +* Replace `` with the private key of the account used for deployment. + +{

Verify the deployment

} +Once the deployment is complete, you can verify the deployed contract addresses and configuration: + +* Check the deployment output for contract addresses and transaction details. +* Verify the deployed contracts on the block explorer using the specified `ETHERSCAN_API_KEY` in the configuration file.
From 90586bdda07747f1ac4837d2c72b0f2ccd3a7ec2 Mon Sep 17 00:00:00 2001 From: krofax Date: Fri, 24 Jan 2025 16:36:57 +0100 Subject: [PATCH 06/13] fix format error --- pages/builders/chain-operators/deploy/smart-contracts.mdx | 6 +++--- .../builders/chain-operators/tutorials/create-l2-rollup.mdx | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pages/builders/chain-operators/deploy/smart-contracts.mdx b/pages/builders/chain-operators/deploy/smart-contracts.mdx index aa003f11c..5e10ebaaf 100644 --- a/pages/builders/chain-operators/deploy/smart-contracts.mdx +++ b/pages/builders/chain-operators/deploy/smart-contracts.mdx @@ -97,13 +97,13 @@ Follow these steps: * A private key with sufficient funds to cover deployment costs. -{

Create an intent file

} +### Create an intent file * Define the configuration of your chain in an intent file. * This file specifies the deployment parameters for both L1. Follow the instructions provided in the [configure your chain](/tools/op-deployer#init-configure-your-chain) section to generate the intent file. -{

Run the `apply` command

} +### Run the `apply` command Execute the following command to deploy the L1 smart contracts: @@ -114,7 +114,7 @@ op-deployer apply --workdir .deployer --l1-rpc-url --private-key ` with your L1 RPC URL. * Replace `` with the private key of the account used for deployment. -{

Verify the deployment

} +### Verify the deployment Once the deployment is complete, you can verify the deployed contract addresses and configuration: * Check the deployment output for contract addresses and transaction details. diff --git a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx index 0361b1bd3..80f8a5824 100644 --- a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx +++ b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx @@ -435,13 +435,13 @@ Follow these steps: * A private key with sufficient funds to cover deployment costs. -{

Create an intent file

} +### Create an intent file * Define the configuration of your chain in an intent file. * This file specifies the deployment parameters for deploying the L1 smart contract. Follow the instructions provided in the [configure your chain](/tools/op-deployer#init-configure-your-chain) section to generate the intent file. -{

Run the `apply` command

} +### Run the `apply` command Execute the following command to deploy the L1 smart contracts: @@ -452,7 +452,7 @@ op-deployer apply --workdir .deployer --l1-rpc-url --private-key ` with your L1 RPC URL. * Replace `` with the private key of the account used for deployment. -{

Verify the deployment

} +### Verify the deployment Once the deployment is complete, you can verify the deployed contract addresses and configuration: * Check the deployment output for contract addresses and transaction details. From 08fc670f1d04aaa9e6e35a32c8e0cb248e009a7a Mon Sep 17 00:00:00 2001 From: krofax Date: Mon, 27 Jan 2025 18:08:40 +0100 Subject: [PATCH 07/13] fix lint issues --- words.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/words.txt b/words.txt index d17d59bbc..2319a4d23 100644 --- a/words.txt +++ b/words.txt @@ -94,6 +94,7 @@ DISABLETXPOOLGOSSIP disabletxpoolgossip Discv discv +disincentivize DIVU Drand dripcheck @@ -122,7 +123,6 @@ Farcaster Faultproof FDLIMIT fdlimit -featureset Flashblocks Flashbots forkable @@ -281,7 +281,6 @@ pprof Precommitments precommitments preconfigured -Preconfigured predeploy Predeployed predeployed @@ -377,7 +376,6 @@ Superchain superchain Superchain's Superchainerc -superchainerc Superchains Superscan Supersim @@ -410,7 +408,6 @@ unmetered Unprotect unsubmitted UPNP -usafe VERKLE verkle VHOSTS From 5685246762ce787ee7e36aaa0a48f3292f3091ba Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Tue, 28 Jan 2025 18:32:04 +0100 Subject: [PATCH 08/13] updated the instructions for deployment --- .../deploy/smart-contracts.mdx | 20 ++++-- .../chain-operators/tools/op-deployer.mdx | 4 +- .../tutorials/create-l2-rollup.mdx | 67 ++++++++----------- 3 files changed, 46 insertions(+), 45 deletions(-) diff --git a/pages/builders/chain-operators/deploy/smart-contracts.mdx b/pages/builders/chain-operators/deploy/smart-contracts.mdx index 5e10ebaaf..b9d4bff65 100644 --- a/pages/builders/chain-operators/deploy/smart-contracts.mdx +++ b/pages/builders/chain-operators/deploy/smart-contracts.mdx @@ -92,7 +92,16 @@ Follow these steps: * Install `op-deployer`: The recommended way to install `op-deployer` is to download the latest release from the monorepo's [release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary - for your platform then extract it somewhere on your `PATH`. + for your platform then extract it somewhere on your `PATH`. or simply run the following command to clone it into your system: + + ```bash + git clone git@github.com:ethereum-optimism/optimism.git && cd optimism + cd op-deployer && just build + ``` + + [Install just](https://github.com/just-buildsystem/justbuild/blob/master/INSTALL.md) in your computer, before running the command above or use `brew install just` if you are a mac user. + + * Access to the L1 blockchain (e.g., Sepolia or Mainnet) via an RPC URL. * A private key with sufficient funds to cover deployment costs. @@ -101,18 +110,17 @@ Follow these steps: * Define the configuration of your chain in an intent file. * This file specifies the deployment parameters for both L1. -Follow the instructions provided in the [configure your chain](/tools/op-deployer#init-configure-your-chain) section to generate the intent file. +Follow the instructions provided in the [configure your chain](/builders/chain-operators/tools/op-deployer#init-configure-your-chain) section to generate the intent file. ### Run the `apply` command -Execute the following command to deploy the L1 smart contracts: +The next step is to deploy the L1 smart contracts, by running the following command: ```bash -op-deployer apply --workdir .deployer --l1-rpc-url --private-key +./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` - * Replace `` with your L1 RPC URL. -* Replace `` with the private key of the account used for deployment. +* Replace `` with the private key of the account used for deployment. ### Verify the deployment Once the deployment is complete, you can verify the deployed contract addresses and configuration: diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index c611d27a6..f1f24000f 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -31,6 +31,7 @@ To get started with `op-deployer`, create an intent file that defines your desir ``` ./bin/op-deployer init --l1-chain-id 11155111 --l2-chain-ids --workdir .deployer ``` +Replace `` with the correct value. This command will create a directory called `.deployer` in your current working directory containing the intent file and an empty `state.json` file. `state.json` is populated with the results of your deployment, and never needs to be edited directly. @@ -97,8 +98,9 @@ You can also do chain by chain configurations in the `chains` table. Now that you've created your intent file, you can apply it to your chain to deploy the L1 smart contracts: ``` -op-deployer apply --workdir .deployer --l1-rpc-url --private-key +./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` +* Replace `` with your `L1 RPC URL` and `` with your private key This command will deploy the OP Stack to L1. It will deploy all L2s specified in the intent file. Superchain configuration will be set to the Superchain-wide defaults - i.e., your chain will be opted into the [Superchain pause](https://specs.optimism.io/protocol/superchain-config.html#pausability) diff --git a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx index 80f8a5824..be5ca7e53 100644 --- a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx +++ b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx @@ -10,8 +10,6 @@ import { WipCallout } from '@/components/WipCallout' # Creating your own L2 rollup testnet - - Please **be prepared to set aside approximately one hour** to get everything running properly and **make sure to read through the guide carefully**. You don't want to miss any important steps that might cause issues down the line. @@ -430,27 +428,34 @@ Follow these steps: * Install `op-deployer`: The recommended way to install `op-deployer` is to download the latest release from the monorepo's [release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary - for your platform then extract it somewhere on your `PATH`. + for your platform then extract it somewhere on your `PATH`. or simply run the following command to clone it into your system: + + ```bash + git clone git@github.com:ethereum-optimism/optimism.git && cd optimism + cd op-deployer && just build + ``` + + [Install just](https://github.com/just-buildsystem/justbuild/blob/master/INSTALL.md) in your computer, before running the command above or use `brew install just` if you are a mac user. + + * Access to the L1 blockchain (e.g., Sepolia or Mainnet) via an RPC URL. * A private key with sufficient funds to cover deployment costs. - ### Create an intent file * Define the configuration of your chain in an intent file. * This file specifies the deployment parameters for deploying the L1 smart contract. -Follow the instructions provided in the [configure your chain](/tools/op-deployer#init-configure-your-chain) section to generate the intent file. +Follow the instructions provided in the [configure your chain](/builders/chain-operators/tools/op-deployer#init-configure-your-chain) section to generate the intent file. ### Run the `apply` command -Execute the following command to deploy the L1 smart contracts: +The next step is to deploy the L1 smart contracts, by running the following command: ```bash -op-deployer apply --workdir .deployer --l1-rpc-url --private-key +./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` - * Replace `` with your L1 RPC URL. -* Replace `` with the private key of the account used for deployment. +* Replace `` with the private key of the account used for deployment. ### Verify the deployment Once the deployment is complete, you can verify the deployed contract addresses and configuration: @@ -462,52 +467,38 @@ Once the deployment is complete, you can verify the deployed contract addresses ## Generate the L2 config files -Now that you've set up the L1 smart contracts you can automatically generate several configuration files that are used within the Consensus Client and the Execution Client. +Now that you've set up the L1 smart contracts you can automatically generate several configuration files that are used within the consensus client and the execution client. -You need to generate three important files: +You need to generate two important files: 1. `genesis.json` includes the genesis state of the chain for the Execution Client. 2. `rollup.json` includes configuration information for the Consensus Client. -3. `jwt.txt` is a [JSON Web Token](https://jwt.io/introduction) that allows the Consensus Client and the Execution Client to communicate securely (the same mechanism is used in Ethereum clients). -{

Navigate to the op-node package

} - -```bash -cd ~/optimism/op-node -``` - -{

Create genesis files

} +{

Install op-deployer

} -Now you'll generate the `genesis.json` and `rollup.json` files within the `op-node` folder: - -```bash -go run cmd/main.go genesis l2 \ - --deploy-config ../packages/contracts-bedrock/deploy-config/getting-started.json \ - --l1-deployments ../packages/contracts-bedrock/deployments/getting-started/.deploy \ - --outfile.l2 genesis.json \ - --outfile.rollup rollup.json \ - --l1-rpc $L1_RPC_URL -``` + Ensure you have the `op-deployer` tool installed. + For installation instructions, see the [op-deployer installation section](/builders/chain-operators/tools/op-deployer#installation). -{

Create an authentication key

} +{

Generate configuration files

} -Next you'll create a [JSON Web Token](https://jwt.io/introduction) that will be used to authenticate the Consensus Client and the Execution Client. -This token is used to ensure that only the Consensus Client and the Execution Client can communicate with each other. -You can generate a JWT with the following command: +With the contracts deployed, generate the genesis and rollup configuration files by running the following commands: ```bash -openssl rand -hex 32 > jwt.txt +op-deployer inspect genesis --workdir .deployer > .deployer/genesis.json +op-deployer inspect rollup --workdir .deployer > .deployer/rollup.json ``` +Replace `` with the L2 chain ID. -{

Copy genesis files into the op-geth directory

} +{

Get data

} -Finally, you'll need to copy the `genesis.json` file and `jwt.txt` file into `op-geth` so you can use it to initialize and run `op-geth`: +Now that you have your `genesis.json` and `rollup.json` +you can use the following inspect subcommands to get additional data: ```bash -cp genesis.json ~/op-geth -cp jwt.txt ~/op-geth +op-deployer inspect l1 --workdir .deployer # outputs all L1 contract addresses for an L2 chain +op-deployer inspect deploy-config --workdir .deployer # outputs the deploy config for an L2 chain ```
From acebb69f14878b28f54d70b56cdb996812815528 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Tue, 28 Jan 2025 18:57:43 +0100 Subject: [PATCH 09/13] update the download instructions --- .../chain-operators/deploy/smart-contracts.mdx | 11 +---------- .../chain-operators/tutorials/create-l2-rollup.mdx | 12 +++--------- 2 files changed, 4 insertions(+), 19 deletions(-) diff --git a/pages/builders/chain-operators/deploy/smart-contracts.mdx b/pages/builders/chain-operators/deploy/smart-contracts.mdx index b9d4bff65..8ac3b6cfe 100644 --- a/pages/builders/chain-operators/deploy/smart-contracts.mdx +++ b/pages/builders/chain-operators/deploy/smart-contracts.mdx @@ -92,16 +92,7 @@ Follow these steps: * Install `op-deployer`: The recommended way to install `op-deployer` is to download the latest release from the monorepo's [release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary - for your platform then extract it somewhere on your `PATH`. or simply run the following command to clone it into your system: - - ```bash - git clone git@github.com:ethereum-optimism/optimism.git && cd optimism - cd op-deployer && just build - ``` - - [Install just](https://github.com/just-buildsystem/justbuild/blob/master/INSTALL.md) in your computer, before running the command above or use `brew install just` if you are a mac user. - - + for your platform then extract it somewhere on your `PATH`. * Access to the L1 blockchain (e.g., Sepolia or Mainnet) via an RPC URL. * A private key with sufficient funds to cover deployment costs. diff --git a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx index be5ca7e53..c9e782758 100644 --- a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx +++ b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx @@ -428,15 +428,9 @@ Follow these steps: * Install `op-deployer`: The recommended way to install `op-deployer` is to download the latest release from the monorepo's [release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary - for your platform then extract it somewhere on your `PATH`. or simply run the following command to clone it into your system: - - ```bash - git clone git@github.com:ethereum-optimism/optimism.git && cd optimism - cd op-deployer && just build - ``` - - [Install just](https://github.com/just-buildsystem/justbuild/blob/master/INSTALL.md) in your computer, before running the command above or use `brew install just` if you are a mac user. - + for your platform then extract it somewhere on your `PATH`. +* Access to the L1 blockchain (e.g., Sepolia or Mainnet) via an RPC URL. +* A private key with sufficient funds to cover deployment costs. * Access to the L1 blockchain (e.g., Sepolia or Mainnet) via an RPC URL. * A private key with sufficient funds to cover deployment costs. From 2c77491cc5981549a1f381c3b0851d9bdd7e0fc7 Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Tue, 28 Jan 2025 23:07:20 +0100 Subject: [PATCH 10/13] updated bas command --- .../chain-operators/deploy/smart-contracts.mdx | 2 +- .../chain-operators/tools/op-deployer.mdx | 15 +++++++++++---- .../tutorials/create-l2-rollup.mdx | 2 +- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/pages/builders/chain-operators/deploy/smart-contracts.mdx b/pages/builders/chain-operators/deploy/smart-contracts.mdx index 8ac3b6cfe..a14e35cc5 100644 --- a/pages/builders/chain-operators/deploy/smart-contracts.mdx +++ b/pages/builders/chain-operators/deploy/smart-contracts.mdx @@ -108,7 +108,7 @@ Follow the instructions provided in the [configure your chain](/builders/chain-o The next step is to deploy the L1 smart contracts, by running the following command: ```bash -./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key +./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` * Replace `` with your L1 RPC URL. * Replace `` with the private key of the account used for deployment. diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index f1f24000f..72f502a57 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -15,7 +15,14 @@ import {Callout, Steps} from 'nextra/components' The recommended way to install `op-deployer` is to download the latest release from the monorepo's [release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary -for your platform then extract it somewhere on your `PATH`. The rest of this tutorial will assume that you have +for your platform then extract it somewhere on your `PATH`. + +Run the following commad: + ```bash + cd op-deployer && just build + ``` + +The rest of this tutorial will assume that you have installed `op-deployer` using this method. ## Deployment usage @@ -100,7 +107,7 @@ Now that you've created your intent file, you can apply it to your chain to depl ``` ./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` -* Replace `` with your `L1 RPC URL` and `` with your private key +* Replace `` with your `L1_RPC_URL` and `` with your private key This command will deploy the OP Stack to L1. It will deploy all L2s specified in the intent file. Superchain configuration will be set to the Superchain-wide defaults - i.e., your chain will be opted into the [Superchain pause](https://specs.optimism.io/protocol/superchain-config.html#pausability) @@ -116,8 +123,8 @@ address as other chains on the Superchain. Inspect the `state.json` file by navigating to your working directory. With the contracts deployed, generate the genesis and rollup configuration files by running the following commands: ``` -op-deployer inspect genesis --workdir .deployer > .deployer/genesis.json -op-deployer inspect rollup --workdir .deployer > .deployer/rollup.json +./bin/op-deployer inspect genesis --workdir .deployer > .deployer/genesis.json +./bin/op-deployer inspect rollup --workdir .deployer > .deployer/rollup.json ``` Now that you have your `genesis.json` and `rollup.json` you can spin up a node on your network. You can also use the following inspect subcommands to get additional data: diff --git a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx index c9e782758..1b9f7875c 100644 --- a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx +++ b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx @@ -446,7 +446,7 @@ Follow the instructions provided in the [configure your chain](/builders/chain-o The next step is to deploy the L1 smart contracts, by running the following command: ```bash -./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key +./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` * Replace `` with your L1 RPC URL. * Replace `` with the private key of the account used for deployment. From 3225bc9767031652a2724a43c8e72acf12298d2a Mon Sep 17 00:00:00 2001 From: Blessing Krofegha Date: Wed, 29 Jan 2025 17:01:25 +0100 Subject: [PATCH 11/13] Update pages/builders/chain-operators/deploy/smart-contracts.mdx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- pages/builders/chain-operators/deploy/smart-contracts.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/builders/chain-operators/deploy/smart-contracts.mdx b/pages/builders/chain-operators/deploy/smart-contracts.mdx index a14e35cc5..8a65356cf 100644 --- a/pages/builders/chain-operators/deploy/smart-contracts.mdx +++ b/pages/builders/chain-operators/deploy/smart-contracts.mdx @@ -20,7 +20,7 @@ generally not considered backwards compatible. The following deployment information outlines the legacy method for deploying the OP Stack L1 contracts. -We do not recommend using this method, and it is provided here only for historical context. +This method is not recommended and is provided here only for historical context. ## Deployment Configuration From e8bd0897da6c3d2dfd05c002709b2e2739345a91 Mon Sep 17 00:00:00 2001 From: krofax Date: Wed, 29 Jan 2025 17:02:48 +0100 Subject: [PATCH 12/13] remove duplicated --- pages/builders/chain-operators/tutorials/create-l2-rollup.mdx | 3 --- 1 file changed, 3 deletions(-) diff --git a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx index 1b9f7875c..bc842239f 100644 --- a/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx +++ b/pages/builders/chain-operators/tutorials/create-l2-rollup.mdx @@ -432,9 +432,6 @@ Follow these steps: * Access to the L1 blockchain (e.g., Sepolia or Mainnet) via an RPC URL. * A private key with sufficient funds to cover deployment costs. -* Access to the L1 blockchain (e.g., Sepolia or Mainnet) via an RPC URL. -* A private key with sufficient funds to cover deployment costs. - ### Create an intent file * Define the configuration of your chain in an intent file. From 0be950178eb1b5f5a8e0e810bb012dd546b63741 Mon Sep 17 00:00:00 2001 From: krofax Date: Wed, 29 Jan 2025 17:07:19 +0100 Subject: [PATCH 13/13] fixed typo --- pages/builders/chain-operators/tools/op-deployer.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index 72f502a57..0bd607436 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -17,7 +17,7 @@ The recommended way to install `op-deployer` is to download the latest release f [release page](https://github.com/ethereum-optimism/optimism/releases). To install a release, download the binary for your platform then extract it somewhere on your `PATH`. -Run the following commad: +Run the following command: ```bash cd op-deployer && just build ```