From 9919df74448423fe4c9765a42c48710e7115a623 Mon Sep 17 00:00:00 2001 From: soyboy Date: Mon, 21 Oct 2024 12:56:47 -0600 Subject: [PATCH 1/9] adding todos for op-deployer docs --- .../chain-operators/tools/op-deployer.mdx | 90 +++++++++++-------- 1 file changed, 53 insertions(+), 37 deletions(-) diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index 85794f497..25d5be866 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -2,19 +2,19 @@ title: Deployer lang: en-US tags: ["op-deployer","eng-platforms"] -description: Learn how op-deployer can simplify deployment of the OP Stack. +description: Learn how op-deployer can simplify deployment of the standard OP Stack. --- import {Callout, Steps} from 'nextra/components' # Deployer -`op-deployer` simplifies the process of deploying the OP Stack. It works similarly to [Terraform](https://www.terraform.io). Like Terraform, you define a declarative config file called an "intent," then run a -command to apply the intent to your chain. `op-deployer` will compare the state of your chain against the intent, -and make whatever changes are necessary for them to match. +`op-deployer` simplifies the process of deploying the OP Stack. It works similarly to [Terraform](https://www.terraform.io). Like Terraform, you define a declarative config file called an "intent," then run a command to apply the intent to your chain. `op-deployer` will compare the state of your chain against the intent, and make whatever changes are necessary for them to match. In its current state, it is intended to deploy new standard chains. Upgrade funcionality and beta-feature support will likely come in the future. ## Installation +todo: we need to link a production ready release of op-deployer + `op-deployer` is currently under active development, and must be compiled from source. Assuming you have the Go toolchain installed, you can install `op-deployer` by following these steps: @@ -32,28 +32,19 @@ toolchain installed, you can install `op-deployer` by following these steps: Run the following commands to build the binary: ```bash - cd op-chain-ops - make op-deployer - ``` - - ### (Optional) Move `op-deployer` Into `$PATH` - - Run the following command to move the `op-deployer` binary into your `$PATH`. Note that the path for your system - may be different: - - ```bash - sudo mv ./bin/op-deployer /usr/local/bin/op-deployer + cd op-deployer + just build ``` ## Usage -### Configuring your Chain +### Configuring your chain To get started with `op-deployer`, you need to create an intent file that outlines your desired chain configuration. You can use the built-in `op-deployer` utility to generate this file. Just run the following command to create an example intent file for a development chain: ``` -op-deployer init --l1-chain-id 11155111 --l2-chain-ids 12345 --workdir .deployer +./bin/op-deployer init --l1-chain-id 11155111 --l2-chain-ids 12345 --workdir .deployer ``` This command will create a directory called `.deployer` in your current working directory containing the intent file @@ -62,37 +53,66 @@ be edited directly. Your intent file will look something like this: +todo: update the toml file for the latest output +todo: add annotations on each of the chains.roles + ```toml +deploymentStrategy = "live" # todo: add description l1ChainID = 11155111 # The chain ID of the L1 chain you'll be deploying to fundDevAccounts = true # Whether or not to fund dev accounts using the test... junk mnemonic on L2. -contractsRelease = "op-contracts/v1.6.0" # The version of the smart contracts to deploy. +l1ContractsLocator = "tag://op-contracts/v1.6.0" # The version of the L1 smart contracts to deploy. +l2ContractsLocator = "tag://op-contracts/v1.7.0-beta.1+l2-contracts" # The version of the L2 smart contracts to encode into genesis + +# todo: add comment on this section +[superchainRoles] + proxyAdminOwner = "0xb9cdf788704088a4c0191d045c151fcbe2db14a4" # todo: whose address is this? + protocolVersionsOwner = "0x85d646ed26c3f46400ede51236d8d7528196849b" # todo: add comment + guardian = "0x8c7e4a51acb17719d225bd17598b8a94b46c8767" # todo: is this the guardian on the superchain config contract? # List of L2s to deploy. op-deployer can deploy multiple L2s at once [[chains]] -# Your chain's ID, encoded as a 32-byte hex string -id = "0x0000000000000000000000000000000000000000000000000000000000003039" -# Various ownership roles for your chain. When you use op-deployer init, these roles are generated using the -# test... junk mnemonic. You should replace these with your own addresses for production chains. -[chains.roles] -proxyAdminOwner = "0x7759a8a43aa6a7ee9434ddb597beed64180c40fd" -systemConfigOwner = "0x8e35d9523a0c4c9ac537d254079c2398c6f3b35f" -governanceTokenOwner = "0x7759a8a43aa6a7ee9434ddb597beed64180c40fd" -unsafeBlockSigner = "0xbb19dce4ce51f353a98dbab31b5fa3bc80dc7769" -batcher = "0x0e9c62712ab826e06b16b2236ce542f711eaffaf" -proposer = "0x86dfafe0689e20685f7872e0cb264868454627bc" -challenger = "0xf1658da627dd0738c555f9572f658617511c49d5" + # Your chain's ID, encoded as a 32-byte hex string + id = "0x0000000000000000000000000000000000000000000000000000000000003039" + # todo: comments on these values + baseFeeVaultRecipient = "0x0000000000000000000000000000000000000000" + l1FeeVaultRecipient = "0x0000000000000000000000000000000000000000" + sequencerFeeVaultRecipient = "0x0000000000000000000000000000000000000000" + eip1559Denominator = 50 + eip1559Elasticity = 6 + # Various ownership roles for your chain. When you use op-deployer init, these roles are generated using the + # test... junk mnemonic. You should replace these with your own addresses for production chains. + [chains.roles] + proxyAdminOwner = "0x7759a8a43aa6a7ee9434ddb597beed64180c40fd" # todo: highlight the difference between this and the one in the [superchainRoles] + systemConfigOwner = "0x8e35d9523a0c4c9ac537d254079c2398c6f3b35f" # todo: mention that the chain operator should retain this role for system behavior modifications + governanceTokenOwner = "0x7759a8a43aa6a7ee9434ddb597beed64180c40fd" # todo: what guidance should we have on this + unsafeBlockSigner = "0xbb19dce4ce51f353a98dbab31b5fa3bc80dc7769" + batcher = "0x0e9c62712ab826e06b16b2236ce542f711eaffaf" + proposer = "0x86dfafe0689e20685f7872e0cb264868454627bc" + challenger = "0xf1658da627dd0738c555f9572f658617511c49d5" # todo: what address should this be? ``` See the code comments above for explanations of each field. By default, `op-deployer` will fill in all other configuration variables with those that match our standard config. You can override these defaults by adding them to your intent file, but that won't be covered here. -### Applying your Intent +### Overriding default values + +The default values that op-deployer utilizes are defined [here](todo: add link). If you'd like to override these values, you need to add the following stanza to your intent file like this: + +```toml +todo: add override examples +``` + +todo: reference the default values +todo: figure our if we should use the global overrides or the chain overrides +todo: give example of 1s blocktime override + +### Applying your intent Now that you've created your intent file, you can apply it to your chain: ``` -op-deployer apply --workdir .deployer --l1-rpc-url --private-key +./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` Hardware wallets are not supported, but you can use ephemeral hot wallets since this deployer key has no privileges. @@ -102,7 +122,7 @@ configuration will be set to the Superchain-wide defaults - i.e., your chain wil and will use the same [protocol versions](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md) address as other chains on the Superchain. -### Generating Genesis Files +### Generating genesis files With the contracts deployed, you can generate a genesis file for any of your L2s. Run the following command to do so: @@ -117,10 +137,6 @@ else. You can run another member of the `inspect` family, `rollup`, to get the ` ./bin/op-deployer inspect rollup --outfile rollup.json ``` -## More Information - -`op-deployer` uses the OP Contracts Manager (OPCM) under the hood to deploy contracts. - ## Next Steps * For more details, check out the tool and documentation in the [op-deployer repository](https://github.com/ethereum-optimism/optimism/tree/develop/op-deployer/cmd/op-deployer). From cc6f732cdd972ced823f4552fe9cee134c808b15 Mon Sep 17 00:00:00 2001 From: soyboy Date: Mon, 21 Oct 2024 13:17:14 -0600 Subject: [PATCH 2/9] adding a todo --- pages/builders/chain-operators/tools/op-deployer.mdx | 1 + 1 file changed, 1 insertion(+) diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index 25d5be866..3e6d25ae4 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -106,6 +106,7 @@ todo: add override examples todo: reference the default values todo: figure our if we should use the global overrides or the chain overrides todo: give example of 1s blocktime override +todo: how do you deploy your own superchain contracts? opt out of the shared ones ### Applying your intent From 35769eba60da059caa7785abff17e404c45d1c9d Mon Sep 17 00:00:00 2001 From: soyboy <85043086+sbvegan@users.noreply.github.com> Date: Sun, 27 Oct 2024 10:27:54 -0600 Subject: [PATCH 3/9] updating deployer docs --- .../chain-operators/tools/op-deployer.mdx | 96 +++++++++---------- 1 file changed, 47 insertions(+), 49 deletions(-) diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index f2c61d973..fff7b4d9b 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -9,14 +9,11 @@ import {Callout, Steps} from 'nextra/components' # Deployer -`op-deployer` simplifies the process of deploying the OP Stack. It works similarly to [Terraform](https://www.terraform.io). Like Terraform, you define a declarative config file called an "intent," then run a command to apply the intent to your chain. `op-deployer` will compare the state of your chain against the intent, and make whatever changes are necessary for them to match. In its current state, it is intended to deploy new standard chains. Upgrade funcionality and beta-feature support will likely come in the future. +`op-deployer` simplifies the process of deploying the OP Stack. It works similarly to [Terraform](https://www.terraform.io). Like Terraform, you define a declarative config file called an "intent," then run a command to apply the intent to your chain. `op-deployer` will compare the state of your chain against the intent, and make whatever changes are necessary for them to match. In its current state, it is intended to deploy new standard chains that utilize the Superchain wide contracts. ## Installation -todo: we need to link a production ready release of op-deployer - -`op-deployer` is currently under active development, and must be compiled from source. Assuming you have the Go -toolchain installed, you can install `op-deployer` by following these steps: +You can find the latest releases in the monorepo's [release page](https://github.com/ethereum-optimism/optimism/releases). The following guide is how to complie it from source. Assuming you have the Go toolchain installed, you can install `op-deployer` by following these steps: ### **Clone the monorepo**: @@ -39,41 +36,39 @@ toolchain installed, you can install `op-deployer` by following these steps: ## Usage -### Configuring your chain + + +### `init`: configuring your chain To get started with `op-deployer`, you need to create an intent file that outlines your desired chain configuration. You can use the built-in `op-deployer` utility to generate this file. Just run the following command to create an example intent file for a development chain: ``` -./bin/op-deployer init --l1-chain-id 11155111 --l2-chain-ids 12345 --workdir .deployer +./bin/op-deployer init --l1-chain-id 11155111 --l2-chain-ids --workdir .deployer ``` -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. - -Your intent file will look something like this: +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. -todo: update the toml file for the latest output -todo: add annotations on each of the chains.roles +Your intent file will need to be modified to your parameters, but it will initally look something like this: ```toml -deploymentStrategy = "live" # todo: add description +deploymentStrategy = "live" # Deploying a chain to a live network i.e. Sepolia l1ChainID = 11155111 # The chain ID of the L1 chain you'll be deploying to fundDevAccounts = true # Whether or not to fund dev accounts using the test... junk mnemonic on L2. -l1ContractsLocator = "tag://op-contracts/v1.6.0" # The version of the L1 smart contracts to deploy. -l2ContractsLocator = "tag://op-contracts/v1.7.0-beta.1+l2-contracts" # The version of the L2 smart contracts to encode into genesis +l1ContractsLocator = "tag://op-contracts/v1.6.0" # L1 smart contracts versions +l2ContractsLocator = "tag://op-contracts/v1.7.0-beta.1+l2-contracts" # L2 smart contracts versions -# todo: add comment on this section +# Delete this table if you are using the shared Superchain contracts on the L1 +# If you are deploying your own SuperchainConfig and ProtocolVersions contracts, fill in these details [superchainRoles] - proxyAdminOwner = "0xb9cdf788704088a4c0191d045c151fcbe2db14a4" # todo: whose address is this? - protocolVersionsOwner = "0x85d646ed26c3f46400ede51236d8d7528196849b" # todo: add comment - guardian = "0x8c7e4a51acb17719d225bd17598b8a94b46c8767" # todo: is this the guardian on the superchain config contract? + proxyAdminOwner = "0xb9cdf788704088a4c0191d045c151fcbe2db14a4" + protocolVersionsOwner = "0x85d646ed26c3f46400ede51236d8d7528196849b" + guardian = "0x8c7e4a51acb17719d225bd17598b8a94b46c8767" # List of L2s to deploy. op-deployer can deploy multiple L2s at once [[chains]] # Your chain's ID, encoded as a 32-byte hex string id = "0x0000000000000000000000000000000000000000000000000000000000003039" - # todo: comments on these values + # Update the fee receipiant contract baseFeeVaultRecipient = "0x0000000000000000000000000000000000000000" l1FeeVaultRecipient = "0x0000000000000000000000000000000000000000" sequencerFeeVaultRecipient = "0x0000000000000000000000000000000000000000" @@ -82,63 +77,66 @@ l2ContractsLocator = "tag://op-contracts/v1.7.0-beta.1+l2-contracts" # The versi # Various ownership roles for your chain. When you use op-deployer init, these roles are generated using the # test... junk mnemonic. You should replace these with your own addresses for production chains. [chains.roles] - proxyAdminOwner = "0x7759a8a43aa6a7ee9434ddb597beed64180c40fd" # todo: highlight the difference between this and the one in the [superchainRoles] - systemConfigOwner = "0x8e35d9523a0c4c9ac537d254079c2398c6f3b35f" # todo: mention that the chain operator should retain this role for system behavior modifications - governanceTokenOwner = "0x7759a8a43aa6a7ee9434ddb597beed64180c40fd" # todo: what guidance should we have on this + l1ProxyAdminOwner = "0x1a66b55a4f0139c32eddf4f8c60463afc3832e76" + l2ProxyAdminOwner = "0x7759a8a43aa6a7ee9434ddb597beed64180c40fd" + systemConfigOwner = "0x8e35d9523a0c4c9ac537d254079c2398c6f3b35f" unsafeBlockSigner = "0xbb19dce4ce51f353a98dbab31b5fa3bc80dc7769" batcher = "0x0e9c62712ab826e06b16b2236ce542f711eaffaf" proposer = "0x86dfafe0689e20685f7872e0cb264868454627bc" - challenger = "0xf1658da627dd0738c555f9572f658617511c49d5" # todo: what address should this be? -``` - -See the code comments above for explanations of each field. By default, `op-deployer` will fill in all other configuration variables -with those that match our standard config. You can override these defaults by adding them to your intent file, but -that won't be covered here. + challenger = "0xf1658da627dd0738c555f9572f658617511c49d5" -### Overriding default values +``` -The default values that op-deployer utilizes are defined [here](todo: add link). If you'd like to override these values, you need to add the following stanza to your intent file like this: +By default, `op-deployer` will fill in all other configuration variables with those that match the [standard configuration](https://specs.optimism.io/protocol/configurability.html). You can override these defaults by adding them to your intent file by adding the following table: ```toml -todo: add override examples +[globalDeployOverrides] + l2BlockTime = 1 # 1s L2blockTime is also standard, op-deployer defaults to 2s ``` -todo: reference the default values -todo: figure our if we should use the global overrides or the chain overrides -todo: give example of 1s blocktime override -todo: how do you deploy your own superchain contracts? opt out of the shared ones +You can also do chain by chain configurations in the `chains` table. -### Applying your intent +### `apply`: deploy your chain -Now that you've created your intent file, you can apply it to your chain: + + Hardware wallets are not supported, but you can use ephemeral hot wallets since this deployer key has no privileges. + + +Now that you've created your intent file, you can apply it to your chain to deploy the L1 smart contracts: ``` ./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` -Hardware wallets are not supported, but you can use ephemeral hot wallets since this deployer key has no privileges. - 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-configuration.html#pausability) and will use the same [protocol versions](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md) address as other chains on the Superchain. -### Generating genesis files -### Generating genesis files +### `inspect`: generating genesis files and chain information -With the contracts deployed, you can generate a genesis file for any of your L2s. Run the following command to do so: +You'll be inspecting the `state.json` file, so you need to navigate into your working directory to inspect the file. With the contracts deployed, you can generate the genesis and rollup configuration files. Run the following commands to do so: ``` -./bin/op-deployer inspect genesis --outfile genesis.json +cd .deployer +../bin/op-deployer inspect genesis > genesis.json +../bin/op-deployer inspect rollup > rollup.json ``` -This will write the genesis file to `genesis.json`. You can change the `--outfile` parameter to write it somewhere -else. You can run another member of the `inspect` family, `rollup`, to get the `rollup.json` file: +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: ``` -./bin/op-deployer inspect rollup --outfile rollup.json +../bin/op-deployer inspect l1 # outputs all L1 contract addresses for an L2 chain +../bin/op-deployer inspect deploy-config # outputs the deploy config for an L2 chain +../bin/op-deployer inspect l2-semvers # outputs the semvers for all L2 chains ``` + + +## `bootstrap` + +todo: how does this work? + ## Next steps * For more details, check out the tool and documentation in the [op-deployer repository](https://github.com/ethereum-optimism/optimism/tree/develop/op-deployer/cmd/op-deployer). From e5e774fd89d990d53de9dcab927b50e511c864c4 Mon Sep 17 00:00:00 2001 From: soyboy <85043086+sbvegan@users.noreply.github.com> Date: Sun, 27 Oct 2024 13:59:53 -0600 Subject: [PATCH 4/9] fixing linter --- words.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/words.txt b/words.txt index c4cf76483..0c0ade27a 100644 --- a/words.txt +++ b/words.txt @@ -11,6 +11,7 @@ Allocs allocs altda ANDI +Ankr Apeworx Arweave authrpc @@ -59,12 +60,14 @@ Chugsplash Clabby codebases collateralized +complie compr COMPUTEPENDINGBLOCK computependingblock confs corsdomain counterfactually +Crosschain crosschain Crossmint daserver @@ -146,11 +149,13 @@ Holesky holesky IGNOREPRICE ignoreprice +Immunefi implicity Inator inator INFLUXDBV influxdbv +initally initcode IPCDISABLE ipcdisable @@ -194,6 +199,7 @@ minsuggestedpriorityfee Mintable Mintplex MIPSEVM +Mitigations Monitorism Moralis Mordor @@ -288,6 +294,8 @@ Proxied Proxyd proxyd pseudorandomly +Pyth +Pyth's QRNG Quicknode quicknode @@ -320,6 +328,9 @@ Schnorr secp SELFDESTRUCT Sendrawtransactionconditional +SEPOLIA +Sepolia +sepolia seqnr SEQUENCERHTTP sequencerhttp @@ -387,6 +398,7 @@ VMDEBUG vmdebug VMODULE vmodule +voxel wagmi Warpcast XORI From 365ac3cbae9b4750882f4688a7a59fcaf95c47a5 Mon Sep 17 00:00:00 2001 From: Matthew Slipper Date: Mon, 28 Oct 2024 14:27:25 -0600 Subject: [PATCH 5/9] Small cleanups and describe bootstrapping --- .../chain-operators/tools/op-deployer.mdx | 51 ++++++++++++++----- 1 file changed, 39 insertions(+), 12 deletions(-) diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index fff7b4d9b..446d69a46 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -13,7 +13,12 @@ import {Callout, Steps} from 'nextra/components' ## Installation -You can find the latest releases in the monorepo's [release page](https://github.com/ethereum-optimism/optimism/releases). The following guide is how to complie it from source. Assuming you have the Go toolchain installed, you can install `op-deployer` by following these steps: +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 +installed `op-deployer` using this method. + +To install from source, follow the steps below. You will need to install the Go toolchain and `just` as prerequisites. ### **Clone the monorepo**: @@ -32,9 +37,13 @@ You can find the latest releases in the monorepo's [release page](https://github cd op-deployer just build ``` + + The binary will be in the `bin` directory. -## Usage +## Deployment Usage + +The base use case for `op-deployer` is deploying new OP Chains. This process is broken down into three steps: @@ -48,7 +57,13 @@ To get started with `op-deployer`, you need to create an intent file that outlin 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. -Your intent file will need to be modified to your parameters, but it will initally look something like this: +Your intent file will need to be modified to your parameters, but it will initially look something like this: + + + Do not use the default addresses in the intent for a production chain! They are generated from the `test... junk` + mnemonic. **Any funds they hold will be stolen on a live chain.** + + ```toml deploymentStrategy = "live" # Deploying a chain to a live network i.e. Sepolia @@ -105,7 +120,7 @@ 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: ``` -./bin/op-deployer apply --workdir .deployer --l1-rpc-url --private-key +op-deployer apply --workdir .deployer --l1-rpc-url --private-key ``` This command will deploy the OP Stack to L1. It will deploy all L2s specified in the intent file. Superchain @@ -119,23 +134,35 @@ You'll be inspecting the `state.json` file, so you need to navigate into your wo ``` cd .deployer -../bin/op-deployer inspect genesis > genesis.json -../bin/op-deployer inspect rollup > rollup.json +op-deployer --workdir .deployer inspect genesis > genesis.json +op-deployer --workdir .deployer inspect rollup > 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: ``` -../bin/op-deployer inspect l1 # outputs all L1 contract addresses for an L2 chain -../bin/op-deployer inspect deploy-config # outputs the deploy config for an L2 chain -../bin/op-deployer inspect l2-semvers # outputs the semvers for all L2 chains +op-deployer --workdir .deployer inspect l1 # outputs all L1 contract addresses for an L2 chain +op-deployer --workdir .deployer inspect deploy-config # outputs the deploy config for an L2 chain +op-deployer --workdir .deployer inspect l2-semvers # outputs the semvers for all L2 chains ``` - -## `bootstrap` +## Bootstrap Usage + +`op-deployer` can also be used to deploy the contracts it needs to run the `init`... `apply` flow on new chains. +This process is called "bootstrapping," and is useful for when you want to use `op-deployer` with L3s, new testnets, +or other custom settlement chains. + +### OPCM Bootstrap -todo: how does this work? +To deploy OPCM to a new chain, run the following command: + +```bash +op-deployer bootstrap opcm \ + --l1-rpc-url \ + --private-key \ + --artifacts-locator tag://op-contracts/v1.6.0 +``` ## Next steps From 455433fb2c72431c215d62e031d2a49e6f0eaec9 Mon Sep 17 00:00:00 2001 From: soyboy <85043086+sbvegan@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:13:51 -0600 Subject: [PATCH 6/9] adding tess's suggestions --- next-env.d.ts | 2 +- pages/builders/chain-operators/tools/op-deployer.mdx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/next-env.d.ts b/next-env.d.ts index 4f11a03dc..a4a7b3f5c 100644 --- a/next-env.d.ts +++ b/next-env.d.ts @@ -2,4 +2,4 @@ /// // NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. +// see https://nextjs.org/docs/pages/building-your-application/configuring/typescript for more information. diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index 446d69a46..14df3f678 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -2,7 +2,7 @@ title: Deployer lang: en-US tags: ["op-deployer","eng-platforms"] -description: Learn how op-deployer can simplify deployment of the standard OP Stack. +description: Learn how op-deployer can simplify deployment a standard OP Stack chain. --- import {Callout, Steps} from 'nextra/components' @@ -130,6 +130,10 @@ address as other chains on the Superchain. ### `inspect`: generating genesis files and chain information + + You will need to write the output of these commands to files to make an addition to the [Superchain Registry](https://github.com/ethereum-optimism/superchain-registry). + + You'll be inspecting the `state.json` file, so you need to navigate into your working directory to inspect the file. With the contracts deployed, you can generate the genesis and rollup configuration files. Run the following commands to do so: ``` From 076632cf72152ee6318c371b05aa3c74ef25f414 Mon Sep 17 00:00:00 2001 From: soyboy <85043086+sbvegan@users.noreply.github.com> Date: Mon, 28 Oct 2024 16:58:42 -0600 Subject: [PATCH 7/9] Apply suggestions from code review Co-authored-by: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> --- .../chain-operators/tools/op-deployer.mdx | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index 14df3f678..cb71e4107 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -18,7 +18,7 @@ The recommended way to install `op-deployer` is to download the latest release f for your platform then extract it somewhere on your `PATH`. The rest of this tutorial will assume that you have installed `op-deployer` using this method. -To install from source, follow the steps below. You will need to install the Go toolchain and `just` as prerequisites. +To alternatively install from source, follow the steps below. You will need to install the Go toolchain and `just` as prerequisites. ### **Clone the monorepo**: @@ -47,9 +47,9 @@ The base use case for `op-deployer` is deploying new OP Chains. This process is -### `init`: configuring your chain +### `init`: configure your chain -To get started with `op-deployer`, you need to create an intent file that outlines your desired chain configuration. You can use the built-in `op-deployer` utility to generate this file. Just run the following command to create an example intent file for a development chain: +To get started with `op-deployer`, create an intent file that defines your desired chain configuration. Use the built-in `op-deployer` utility to generate this file: ``` ./bin/op-deployer init --l1-chain-id 11155111 --l2-chain-ids --workdir .deployer @@ -102,7 +102,7 @@ l2ContractsLocator = "tag://op-contracts/v1.7.0-beta.1+l2-contracts" # L2 smart ``` -By default, `op-deployer` will fill in all other configuration variables with those that match the [standard configuration](https://specs.optimism.io/protocol/configurability.html). You can override these defaults by adding them to your intent file by adding the following table: +By default, `op-deployer` will fill in all other configuration variables with those that match the [standard configuration](https://specs.optimism.io/protocol/configurability.html). You can override these default settings by adding them to your intent file using the table below: ```toml [globalDeployOverrides] @@ -128,7 +128,7 @@ configuration will be set to the Superchain-wide defaults - i.e., your chain wil and will use the same [protocol versions](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md) address as other chains on the Superchain. -### `inspect`: generating genesis files and chain information +### `inspect`: generate genesis files and chain information You will need to write the output of these commands to files to make an addition to the [Superchain Registry](https://github.com/ethereum-optimism/superchain-registry). @@ -153,11 +153,9 @@ op-deployer --workdir .deployer inspect l2-semvers # outputs the s ## Bootstrap Usage -`op-deployer` can also be used to deploy the contracts it needs to run the `init`... `apply` flow on new chains. -This process is called "bootstrapping," and is useful for when you want to use `op-deployer` with L3s, new testnets, -or other custom settlement chains. +You can also use `op-deployer` to deploy the contracts needed to run the `init`... `apply` flow on new chains. This process, called 'bootstrapping,' is useful when you want to use `op-deployer` with L3s, new testnets, or other custom settlement chains. -### OPCM Bootstrap +### OPCM bootstrap To deploy OPCM to a new chain, run the following command: From 877e8c4d921a089fc69dc2d89f409dbd94ed9f0a Mon Sep 17 00:00:00 2001 From: soyboy <85043086+sbvegan@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:03:23 -0600 Subject: [PATCH 8/9] addressing superchain-registry callout --- pages/builders/chain-operators/tools/op-deployer.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index cb71e4107..8a8e54399 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -41,7 +41,7 @@ To alternatively install from source, follow the steps below. You will need to i The binary will be in the `bin` directory. -## Deployment Usage +## Deployment usage The base use case for `op-deployer` is deploying new OP Chains. This process is broken down into three steps: @@ -131,7 +131,7 @@ address as other chains on the Superchain. ### `inspect`: generate genesis files and chain information - You will need to write the output of these commands to files to make an addition to the [Superchain Registry](https://github.com/ethereum-optimism/superchain-registry). + To add your chain to the [Superchain Registry](https://github.com/ethereum-optimism/superchain-registry) you will need to provide the chain artifacts. To get these chain artifacts, you will need to write the output of these commands to new files. You'll be inspecting the `state.json` file, so you need to navigate into your working directory to inspect the file. With the contracts deployed, you can generate the genesis and rollup configuration files. Run the following commands to do so: From 1bbc4b4230f27754baee40c3b1db3cb6c55a0e48 Mon Sep 17 00:00:00 2001 From: soyboy <85043086+sbvegan@users.noreply.github.com> Date: Mon, 28 Oct 2024 17:04:13 -0600 Subject: [PATCH 9/9] Apply suggestions from code review Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Bradley Camacho <42678939+bradleycamacho@users.noreply.github.com> --- pages/builders/chain-operators/tools/op-deployer.mdx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pages/builders/chain-operators/tools/op-deployer.mdx b/pages/builders/chain-operators/tools/op-deployer.mdx index 8a8e54399..274e782a6 100644 --- a/pages/builders/chain-operators/tools/op-deployer.mdx +++ b/pages/builders/chain-operators/tools/op-deployer.mdx @@ -2,7 +2,7 @@ title: Deployer lang: en-US tags: ["op-deployer","eng-platforms"] -description: Learn how op-deployer can simplify deployment a standard OP Stack chain. +description: Learn how op-deployer can simplify deploying a standard OP Stack Chain. --- import {Callout, Steps} from 'nextra/components' @@ -134,7 +134,7 @@ address as other chains on the Superchain. To add your chain to the [Superchain Registry](https://github.com/ethereum-optimism/superchain-registry) you will need to provide the chain artifacts. To get these chain artifacts, you will need to write the output of these commands to new files. -You'll be inspecting the `state.json` file, so you need to navigate into your working directory to inspect the file. With the contracts deployed, you can generate the genesis and rollup configuration files. Run the following commands to do so: +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:" ``` cd .deployer @@ -151,7 +151,7 @@ op-deployer --workdir .deployer inspect l2-semvers # outputs the s ``` -## Bootstrap Usage +## Bootstrap usage You can also use `op-deployer` to deploy the contracts needed to run the `init`... `apply` flow on new chains. This process, called 'bootstrapping,' is useful when you want to use `op-deployer` with L3s, new testnets, or other custom settlement chains.