Skip to content

Commit 4ed6e92

Browse files
committed
make tinty updates
1 parent 9c569f8 commit 4ed6e92

File tree

4 files changed

+261
-5
lines changed

4 files changed

+261
-5
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,127 @@
1+
---
2+
title: Deployer
3+
lang: en-US
4+
tags: ["op-deployer","eng-platforms"]
5+
description: Learn how op-deployer can simplify deployment of the OP Stack.
6+
---
7+
8+
import {Callout, Steps} from 'nextra/components'
9+
10+
# Deployer
11+
12+
`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
13+
command to apply the intent to your chain. `op-deployer` will compare the state of your chain against the intent,
14+
and make whatever changes are necessary for them to match.
15+
16+
## Installation
17+
18+
`op-deployer` is currently under active development, and must be compiled from source. Assuming you have the Go
19+
toolchain installed, you can install `op-deployer` by following these steps:
20+
21+
<Steps>
22+
### **Clone the Monorepo**:
23+
24+
Run the following command to clone the monorepo:
25+
26+
```bash
27+
git clone https://github.com/ethereum-optimism/optimism.git
28+
```
29+
30+
### **Build the Binary**:
31+
32+
Run the following commands to build the binary:
33+
34+
```bash
35+
cd op-chain-ops
36+
make op-deployer
37+
```
38+
39+
### (Optional) Move `op-deployer` Into `$PATH`
40+
41+
Run the following command to move the `op-deployer` binary into your `$PATH`. Note that the path for your system
42+
may be different:
43+
44+
```bash
45+
sudo mv ./bin/op-deployer /usr/local/bin/op-deployer
46+
```
47+
</Steps>
48+
49+
## Usage
50+
51+
### Configuring your Chain
52+
53+
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:
54+
55+
```
56+
op-deployer init --l1-chain-id 11155111 --l2-chain-ids 12345 --workdir .deployer
57+
```
58+
59+
This command will create a directory called `.deployer` in your current working directory containing the intent file
60+
and an empty `state.json` file. `state.json` is populated with the results of your deployment, and never needs to
61+
be edited directly.
62+
63+
Your intent file will look something like this:
64+
65+
```toml
66+
l1ChainID = 11155111 # The chain ID of the L1 chain you'll be deploying to
67+
fundDevAccounts = true # Whether or not to fund dev accounts using the test... junk mnemonic on L2.
68+
contractsRelease = "op-contracts/v1.6.0" # The version of the smart contracts to deploy.
69+
70+
# List of L2s to deploy. op-deployer can deploy multiple L2s at once
71+
[[chains]]
72+
# Your chain's ID, encoded as a 32-byte hex string
73+
id = "0x0000000000000000000000000000000000000000000000000000000000003039"
74+
# Various ownership roles for your chain. When you use op-deployer init, these roles are generated using the
75+
# test... junk mnemonic. You should replace these with your own addresses for production chains.
76+
[chains.roles]
77+
proxyAdminOwner = "0x7759a8a43aa6a7ee9434ddb597beed64180c40fd"
78+
systemConfigOwner = "0x8e35d9523a0c4c9ac537d254079c2398c6f3b35f"
79+
governanceTokenOwner = "0x7759a8a43aa6a7ee9434ddb597beed64180c40fd"
80+
unsafeBlockSigner = "0xbb19dce4ce51f353a98dbab31b5fa3bc80dc7769"
81+
batcher = "0x0e9c62712ab826e06b16b2236ce542f711eaffaf"
82+
proposer = "0x86dfafe0689e20685f7872e0cb264868454627bc"
83+
challenger = "0xf1658da627dd0738c555f9572f658617511c49d5"
84+
```
85+
86+
See the code comments above for explanations of each field. By default, `op-deployer` will fill in all other configuration variables
87+
with those that match our standard config. You can override these defaults by adding them to your intent file, but
88+
that won't be covered here.
89+
90+
### Applying your Intent
91+
92+
Now that you've created your intent file, you can apply it to your chain:
93+
94+
```
95+
op-deployer apply --workdir .deployer --l1-rpc-url <rpc-url> --private-key <private key hex>
96+
```
97+
98+
Hardware wallets are not supported, but you can use ephemeral hot wallets since this deployer key has no privileges.
99+
100+
This command will deploy the OP Stack to L1. It will deploy all L2s specified in the intent file. Superchain
101+
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)
102+
and will use the same [protocol versions](https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/superchain-upgrades.md)
103+
address as other chains on the Superchain.
104+
105+
### Generating Genesis Files
106+
107+
With the contracts deployed, you can generate a genesis file for any of your L2s. Run the following command to do so:
108+
109+
```
110+
./bin/op-deployer inspect genesis <l2-chain-id> --outfile genesis.json
111+
```
112+
113+
This will write the genesis file to `genesis.json`. You can change the `--outfile` parameter to write it somewhere
114+
else. You can run another member of the `inspect` family, `rollup`, to get the `rollup.json` file:
115+
116+
```
117+
./bin/op-deployer inspect rollup <l2-chain-id> --outfile rollup.json
118+
```
119+
120+
## More Information
121+
122+
`op-deployer` uses the OP Contracts Manager (OPCM) under the hood to deploy contracts.
123+
124+
## Next Steps
125+
126+
* For more details, check out the tool and documentation in the [op-deployer repository](https://github.com/ethereum-optimism/optimism/tree/develop/op-chain-ops/cmd/op-deployer).
127+
* For more information on OP Contracts Manager, refer to the [OPCM documentation](/stack/opcm).
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
title: Deprecation of the Optimism SDK
3+
lang: en-US
4+
description: This page outlines the details of the Optimism SDK deprecation and guides developers to migrate to using `viem` library.
5+
---
6+
7+
## Preparing for Optimism SDK deprecation
8+
9+
The Optimism SDK will officially be deprecated in Q1 2025. The project is shifting to the `viem` library for a more modern, efficient, and flexible development experience. This change affects all tutorials and resources that previously relied on the Optimism SDK, and relevant documentation has been updated accordingly.
10+
11+
### Breaking changes to expect
12+
13+
The migration from the Optimism SDK to `viem` library brings several breaking changes:
14+
15+
* **Transaction estimation**: Methods for estimating gas fees will now leverage `viem` APIs.
16+
* **Bridging**: All token bridging actions must be updated to use the `viem` library bridging methods.
17+
* **Cross-chain communication**: `viem` library simplifies the cross-domain messaging functionality.
18+
* **SDK method removal**: All deprecated SDK methods will be unavailable after Q1 2025.
19+
20+
Developers and users are strongly encouraged to transition to `viem` before the deprecation date to avoid disruptions.
21+
22+
### Updated tutorials
23+
24+
We are updating our tutorials to use the `viem` library.
25+
26+
{/* Below, you'll find links to the updated versions of popular tutorials:
27+
28+
* [Estimating Transaction Costs on OP Mainnet](../tutorials/transaction-cost-estimation)\
29+
Estimation of transaction costs now uses the `viem` gas estimation utilities.
30+
31+
* [Triggering OP Mainnet Transactions from Ethereum](../tutorials/trigger-op-transactions)\
32+
Learn how to trigger transactions using `viem` to interact with the OP Mainnet.
33+
34+
* [Tracing Deposits and Withdrawals](../tutorials/tracing-deposits-withdrawals)\
35+
The tracing functionalities have been adapted to use `opstack` for efficient results.
36+
37+
* [Viewing Deposits and Withdrawals by Address](../tutorials/view-deposits-withdrawals)\
38+
This tutorial outlines updated methods in `viem` for querying deposits and withdrawals by address.
39+
40+
* [Bridging Your Standard ERC-20 Token Using the Standard Bridge](../tutorials/bridge-standard-erc20)\
41+
The standard bridge tutorial now uses `opstack` for token transfers between Ethereum and OP Mainnet.
42+
43+
* [Bridging Your Custom ERC-20 Token Using the Standard Bridge](../tutorials/bridge-custom-erc20)\
44+
Custom ERC-20 tokens can now be bridged via `opstack`, making the process more streamlined.
45+
46+
* [Bridging ERC-20 Tokens to OP Mainnet With the Optimism SDK](../tutorials/bridge-sdk-erc20)\
47+
**Deprecated** – please use [Bridging Your Custom ERC-20 Token Using the Standard Bridge](../tutorials/bridge-custom-erc20).
48+
49+
* [Bridging ETH to OP Mainnet With the Optimism SDK](../tutorials/bridge-sdk-eth)\
50+
**Deprecated** – please use [Estimating Transaction Costs on OP Mainnet](../tutorials/transaction-cost-estimation).
51+
52+
* [Communicating Between OP Mainnet and Ethereum in Solidity](../tutorials/cross-chain-solidity)\
53+
Cross-chain communication now leverages `opstack` for all messaging. */}
54+
55+
### For app developers
56+
57+
If your application currently depends on the Optimism SDK, you will need to migrate to using the `viem` library.
58+
The tutorials have been updated to reflect these changes, and it is critical to update your applications before the deprecation date to maintain compatibility.
59+
60+
Here are some key points to consider:
61+
62+
Install new dependencies: Replace the Optimism SDK with `viem` in your project.
63+
64+
```bash
65+
pnpm remove @eth-optimism/sdk
66+
pnpm add viem
67+
```
68+
69+
* Update imports: Replace Optimism SDK imports with `viem` imports.
70+
* Migrate SDK methods: Refactor your code to use equivalent `viem` methods. Refer to the viem documentation and opstack documentation for guidance.
71+
* Test thoroughly: After migration, extensively test your application to ensure all functionality works as expected.
72+
73+
### For chain operators
74+
75+
Chain operators utilizing the SDK for cross-chain operations, bridging, or other functions should switch to the `viem` library.
76+
The `viem` library offers more efficient methods to handle these operations.
77+
78+
Chain operators should be aware of the following:
79+
80+
* SDK removal: Remove any dependencies on the Optimism SDK in your infrastructure.
81+
* Update tooling: Ensure all tools and scripts are updated to use `viem`.
82+
* Monitor performance: After migration, closely monitor your chain's performance to ensure smooth operation.
83+
84+
### For node operators
85+
86+
Node operators will need to ensure that any scripts or services relying on the Optimism SDK are updated to use `viem` library.
87+
These updates will help align with future improvements and scalability efforts across the OP Stack.
88+
89+
Node operators should take the following steps:
90+
91+
* Update node software: Ensure your node software is compatible with the latest `viem` libraries.
92+
* Review configuration: Check and update any configuration files that may reference the Optimism SDK.
93+
* Test thoroughly: Perform comprehensive testing in a staging environment before updating production nodes.
94+
95+
### Need Help?
96+
97+
For further assistance or questions about this migration, feel free to reach through the following channels:
98+
99+
* Join our [community forum](https://community.optimism.io/) for discussions and support
100+
* Connect with us on [Discord](https://discord.gg/optimism) for community support
101+
* Open an [issue on our GitHub repository](https://github.com/ethereum-optimism/docs/issues) for documentation-related concerns

pages/builders/tools/fee-calculator.mdx

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
---
22
title: Fjord Fee Parameter Calculator
33
lang: en-US
4-
description: Use the Fjord Fee Parameter Calculator to estimate and calculate fees for transactions on the Fjord network.
4+
description: Use the Fjord Fee Parameter Calculator to estimate and calculate fees for transactions.
55
---
66

77
import { ChainParametersForm } from '@/components/calculator/ChainParametersForm'
88

99
# Fjord Fee Parameter Calculator
1010

11-
The Fjord Fee Parameter Calculator helps you estimate transaction fees on the Fjord network. Use this tool to:
11+
The Fjord Fee Parameter Calculator helps you estimate transaction fees. Use this tool to:
1212

13-
Calculate potential fees for different transaction types
14-
Understand how network parameters affect fee calculations
15-
Plan your transactions more effectively
13+
* Calculate potential fees for different transaction types.
14+
* Understand how network parameters affect fee calculations.
1615

1716
## How to use the calculator
1817

pages/stack/opcm 2.mdx

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: OP Contracts Manager
3+
lang: en-US
4+
tags: ["opcm","eng-security"]
5+
description: Learn how OP Contracts Manager deploys of the OP Stack with one transaction.
6+
---
7+
8+
import { Callout, Tabs, Steps } from 'nextra/components'
9+
10+
# OP Contracts Manager
11+
12+
The OP Contracts Manager is a contract that deploys the L1 contracts for an OP Stack chain in a single transaction. It provides a minimal set of user-configurable parameters to ensure that the resulting chain meets the standard configuration requirements.
13+
14+
The version deployed is always a governance-approved contract release. The set of governance approved contract releases can be found on the Optimism Monorepo releases page, and is the set of releases named `op-contracts/vX.Y.Z`.
15+
16+
## Purpose
17+
18+
OPCM simplifies the L1 contract deployments for new OP Stack chains. It addresses three aspects of deploying the OP Stack's L1 contracts:
19+
20+
1. **Deploy Superchain Contracts.** Superchain contracts are shared between many OP chains, so this occurs only occasionally in production.
21+
2. **Deploy Shared Implementation Contracts.** This occurs once per contracts release in production.
22+
3. **Deploy OP Chain Contracts.** This occurs for every OP chain deployment in production.
23+
24+
In a future iteration, it also is meant to handle upgrading the smart contracts.
25+
26+
## Learn more
27+
28+
* Checkout the [OPCM specs](https://specs.optimism.io/experimental/op-contracts-manager.html)
29+
* Checkout the [OPCM design document](https://github.com/ethereum-optimism/design-docs/blob/main/protocol/op-contracts-manager-arch.md)

0 commit comments

Comments
 (0)