|
1 | 1 | # PoCo Smart Contracts Upgrade Guide |
2 | 2 |
|
3 | | -This document explains the recommended steps for creating and applying |
4 | | -a safe, traceable, and reproducible upgrade to the PoCo Diamond proxy. |
| 3 | +This document explains the recommended steps for creating and applying a safe, traceable, |
| 4 | +and reproducible upgrade to the PoCo Diamond proxy. |
5 | 5 |
|
6 | 6 | ## Upgrade Steps |
7 | 7 |
|
8 | 8 | 0. **Ensure all tests pass**:<br> |
9 | 9 | Run the full test suite to make sure everything is working before starting an upgrade. |
10 | 10 |
|
11 | 11 | 1. **Create a new upgrade script**:<br> |
12 | | - Name the script using the version and upgrade name format: `vX.Y.Z-upgrade-name.ts`. |
| 12 | + Name the script using the version and upgrade name in the form `vX.Y.Z-upgrade-name.ts` |
| 13 | + and implement the upgrade logic. |
13 | 14 |
|
14 | 15 | 2. **Create a corresponding Markdown report**:<br> |
15 | | - Copy the template file `v0.0.0-template.md` and rename it to match the script: `vX.Y.Z-upgrade-name.md`. |
| 16 | + Copy the template file `v0.0.0-template.md` and rename it to match the script's name |
| 17 | + (`vX.Y.Z-upgrade-name.md`). |
16 | 18 |
|
17 | | -3. **Update GitHub Actions**:<br> |
| 19 | +3. **Test dry-runs locally**:<br> |
| 20 | + Use the script [./dry-run.sh](./dry-run.sh) and check the logs. |
| 21 | + |
| 22 | +4. **Update GitHub Actions**:<br> |
18 | 23 | Modify `upgrade-facets.yml` workflow to call the new upgrade script. |
19 | 24 |
|
20 | | -4. **Upgrade on Testnet**: |
| 25 | +5. **Upgrade on Testnet**: |
21 | 26 | - ⚠️ Always upgrade on the testnet first. |
22 | 27 | - Trigger the upgrade workflow on GitHub and choose the testnet network. |
23 | 28 | - Start with a **dry run** to simulate the upgrade. |
24 | 29 | - Once verified, apply the upgrade on the live testnet. |
25 | 30 |
|
26 | | -5. **Upgrade on Mainnet**: |
| 31 | +6. **Upgrade on Mainnet**: |
27 | 32 | - Trigger the upgrade workflow on GitHub and choose the mainnet network. |
28 | 33 | - Perform a dry run first. |
29 | 34 | - Apply the upgrade on the mainnet. |
30 | 35 | - Merge the artifacts PR after successful execution. |
31 | 36 |
|
32 | | -6. **Update upgrade report**:<br> |
| 37 | +7. **Update upgrade report**:<br> |
33 | 38 | Fill in all required information in `vX.Y.Z-upgrade-name.ts` (tx hashes, logs, ...). |
34 | 39 |
|
35 | | -7. **Create a release** |
| 40 | +8. **Create a release** |
36 | 41 | - Use **Release Please** to tag the upgrade version and create the release on GitHub. |
37 | | - |
38 | | - |
39 | | -Following these steps ensures upgrades are **safe, traceable, and reproducible**. |
|
0 commit comments