|
1 | | -Reset the state |
| 1 | +# Reset the state |
2 | 2 | rm state.json |
3 | | -vim {"version": 1} > state.json |
| 3 | +echo '{"version": 1}' > state.json |
4 | 4 |
|
| 5 | +# NOTE: op-deployer version must match the contract artifacts version in intent.toml |
5 | 6 | op-deployer apply --workdir . --deployment-target genesis |
6 | 7 |
|
7 | 8 | op-deployer inspect genesis --workdir . --outfile ./genesis.json 13 |
8 | 9 |
|
9 | 10 | 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