|
| 1 | +# Update the Terminus contract |
| 2 | + |
| 3 | +The Terminus contract is deployed as an EIP2535 Diamond proxy contract with a Terminus facet attached to it. |
| 4 | + |
| 5 | +This checklist describes how to update the `TerminusFacet` on the Terminus diamond contract. |
| 6 | + |
| 7 | +## Deployed addresses |
| 8 | + |
| 9 | +You will modify this section as you go through the checklist |
| 10 | + |
| 11 | +### `TerminusFacet` address |
| 12 | + |
| 13 | +``` |
| 14 | +export TERMINUS_FACET_ADDRESS="0x6396813307826Fb315e65CA7138A41CFa09a8AB3" |
| 15 | +``` |
| 16 | + |
| 17 | +## Environment variables |
| 18 | + |
| 19 | +- [x] `export DAO_NETWORK=<desired brownie network>` |
| 20 | +- [x] `export DAO_OWNER=<path to keystore file for owner account>` |
| 21 | +- [x] `export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)` |
| 22 | +- [x] `export MAX_FEE_PER_GAS="200 gwei"` |
| 23 | +- [x] `export MAX_PRIORITY_FEE_PER_GAS="80 gwei"` |
| 24 | +- [x] `export CONFIRMATIONS=1` |
| 25 | +- [x] `export TERMINUS_DIAMOND=0x99A558BDBdE247C2B2716f0D4cFb0E246DFB697D` |
| 26 | + |
| 27 | +## Detach existing `TerminusFacet` |
| 28 | + |
| 29 | +- [x] Remove `TerminusFacet` from diamond. (This may require checkout of earlier commit and `brownie compile`.) |
| 30 | + |
| 31 | +```bash |
| 32 | +dao core facet-cut \ |
| 33 | + --address $TERMINUS_DIAMOND \ |
| 34 | + --network $DAO_NETWORK \ |
| 35 | + --sender $DAO_OWNER \ |
| 36 | + --max-fee-per-gas "$MAX_FEE_PER_GAS" \ |
| 37 | + --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \ |
| 38 | + --confirmations $CONFIRMATIONS \ |
| 39 | + --facet-name TerminusFacet \ |
| 40 | + --action remove |
| 41 | +``` |
| 42 | + |
| 43 | + |
| 44 | +## Deploy `TerminusFacet` |
| 45 | + |
| 46 | +- [x] Check out relevant commit and `brownie compile`. |
| 47 | + |
| 48 | +- [x] Deploy `TerminusFacet` contract |
| 49 | + |
| 50 | +```bash |
| 51 | +dao terminus deploy \ |
| 52 | + --network $DAO_NETWORK \ |
| 53 | + --sender $DAO_OWNER \ |
| 54 | + --max-fee-per-gas "$MAX_FEE_PER_GAS" \ |
| 55 | + --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \ |
| 56 | + --confirmations $CONFIRMATIONS |
| 57 | +``` |
| 58 | + |
| 59 | +- [x] Export address of deployed contract as `export TERMINUS_FACET_ADDRESS=0x6396813307826Fb315e65CA7138A41CFa09a8AB3` |
| 60 | + |
| 61 | +- [x] Store address of deployed contract under `Deployed addresses / TerminusFacet address` above |
| 62 | + |
| 63 | +- [x] Attach `TerminusFacet` to diamond: |
| 64 | + |
| 65 | +```bash |
| 66 | +dao core facet-cut \ |
| 67 | + --address $TERMINUS_DIAMOND \ |
| 68 | + --network $DAO_NETWORK \ |
| 69 | + --sender $DAO_OWNER \ |
| 70 | + --max-fee-per-gas "$MAX_FEE_PER_GAS" \ |
| 71 | + --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \ |
| 72 | + --confirmations $CONFIRMATIONS \ |
| 73 | + --facet-name TerminusFacet \ |
| 74 | + --facet-address $TERMINUS_FACET_ADDRESS \ |
| 75 | + --action add |
| 76 | +``` |
0 commit comments