Skip to content

Commit bf253fd

Browse files
committed
Generate a new chain configuration with op-deployer v0.4.2 and op-contracts v4.0.0
1 parent 6ee58ae commit bf253fd

File tree

5 files changed

+174
-109
lines changed

5 files changed

+174
-109
lines changed

playground/utils/README.md

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,47 @@
1-
Reset the state
1+
# Reset the state
22
rm state.json
3-
vim {"version": 1} > state.json
3+
echo '{"version": 1}' > state.json
44

5+
# NOTE: op-deployer version must match the contract artifacts version in intent.toml
56
op-deployer apply --workdir . --deployment-target genesis
67

78
op-deployer inspect genesis --workdir . --outfile ./genesis.json 13
89

910
op-deployer inspect rollup --workdir . --outfile ./rollup.json 13
11+
12+
## Updating for New op-deployer Releases
13+
14+
When a new op-deployer version is released, follow these steps:
15+
16+
1. **Download the latest op-deployer:**
17+
```bash
18+
# Check releases at: https://github.com/ethereum-optimism/optimism/releases
19+
# Download for your platform, e.g.:
20+
curl -L https://github.com/ethereum-optimism/optimism/releases/download/op-deployer/vX.Y.Z/op-deployer-X.Y.Z-darwin-arm64.tar.gz -o op-deployer.tar.gz
21+
tar -xzf op-deployer.tar.gz
22+
chmod +x op-deployer
23+
```
24+
25+
2. **Find the latest stable contract artifacts hash:**
26+
```bash
27+
# Browse the standard.go file from the release tag:
28+
curl -s https://raw.githubusercontent.com/ethereum-optimism/optimism/op-deployer/vX.Y.Z/op-deployer/pkg/deployer/standard/standard.go | grep -A 20 "taggedReleases"
29+
# Look for the latest stable version (avoid beta/rc tags) and get its ContentHash
30+
```
31+
32+
3. **Update intent.toml with the new artifacts:**
33+
- Set `l1ContractsLocator` and `l2ContractsLocator` to:
34+
`https://storage.googleapis.com/oplabs-contract-artifacts/artifacts-v1-<ContentHash>.tar.gz`
35+
- Ensure `configType = "custom"` for HTTP URLs
36+
- Use `configType = "standard-overrides"` for tag:// URLs
37+
38+
4. **Deploy with the new version:**
39+
```bash
40+
rm state.json
41+
echo '{"version": 1}' > state.json
42+
./op-deployer apply --workdir . --deployment-target genesis
43+
./op-deployer inspect genesis --workdir . --outfile ./genesis.json 13
44+
./op-deployer inspect rollup --workdir . --outfile ./rollup.json 13
45+
```
46+
47+
**Note:** The ContentHash (not ArtifactsHash) is used in the HTTP URL. ArtifactsHash is for validation only.

0 commit comments

Comments
 (0)