From 38ab523a51fecc2cce3c664e6dd55a4e9cf5a752 Mon Sep 17 00:00:00 2001 From: Neeraj Kashyap Date: Mon, 24 Jan 2022 22:45:15 -0800 Subject: [PATCH] Upgraded contract on mumbai and created checklist for mainnet upgrade --- .../terminus-update-mainnet-20220125-0637.md | 72 +++++++++++++++++++ .../terminus-update-mumbai-20220125-0637.md | 72 +++++++++++++++++++ 2 files changed, 144 insertions(+) create mode 100644 operations/terminus-update-mainnet-20220125-0637.md create mode 100644 operations/terminus-update-mumbai-20220125-0637.md diff --git a/operations/terminus-update-mainnet-20220125-0637.md b/operations/terminus-update-mainnet-20220125-0637.md new file mode 100644 index 0000000..200c74d --- /dev/null +++ b/operations/terminus-update-mainnet-20220125-0637.md @@ -0,0 +1,72 @@ +# Update the Terminus contract + +The Terminus contract is deployed as an EIP2535 Diamond proxy contract with a Terminus facet attached to it. + +This checklist describes how to update the `TerminusFacet` on the Terminus diamond contract. + +## Deployed addresses + +You will modify this section as you go through the checklist + + +### `TerminusFacet` address + +``` +export TERMINUS_FACET_ADDRESS="" +``` + +## Environment variables + +- [ ] `export DAO_NETWORK=polygon-test` +- [ ] `export DAO_OWNER=.secrets/dao-dev.json` +- [ ] `export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)` +- [ ] `export GAS_PRICE="35 gwei"` +- [ ] `export CONFIRMATIONS=2` +- [ ] `export TERMINUS_DIAMOND=0x040Cf7Ee9752936d8d280062a447eB53808EBc08` + +## Detach existing `TerminusFacet` + +- [ ] Remove `TerminusFacet` from diamond. (This may require checkout of earlier commit and `brownie compile`. Checked out: `v0.0.1`.) + +```bash +dao core facet-cut \ + --address $TERMINUS_DIAMOND \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --gas-price "$GAS_PRICE" \ + --confirmations $CONFIRMATIONS \ + --facet-name TerminusFacet \ + --action remove \ + --ignore-methods contractURI setContractURI +``` + + +## Deploy `TerminusFacet` + +- [ ] Deploy `TerminusFacet` contract + +```bash +dao terminus deploy \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --gas-price "$GAS_PRICE" \ + --confirmations $CONFIRMATIONS +``` + +- [ ] Export address of deployed contract as `export TERMINUS_FACET_ADDRESS=` + +- [ ] Store address of deployed contract under `Deployed addresses / TerminusFacet address` above + +- [ ] Attach `TerminusFacet` to diamond: + +```bash +dao core facet-cut \ + --address $TERMINUS_DIAMOND \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --gas-price "$GAS_PRICE" \ + --confirmations $CONFIRMATIONS \ + --facet-name TerminusFacet \ + --facet-address $TERMINUS_FACET_ADDRESS \ + --action add +``` diff --git a/operations/terminus-update-mumbai-20220125-0637.md b/operations/terminus-update-mumbai-20220125-0637.md new file mode 100644 index 0000000..a6d5644 --- /dev/null +++ b/operations/terminus-update-mumbai-20220125-0637.md @@ -0,0 +1,72 @@ +# Update the Terminus contract + +The Terminus contract is deployed as an EIP2535 Diamond proxy contract with a Terminus facet attached to it. + +This checklist describes how to update the `TerminusFacet` on the Terminus diamond contract. + +## Deployed addresses + +You will modify this section as you go through the checklist + + +### `TerminusFacet` address + +``` +export TERMINUS_FACET_ADDRESS="0x1Ea387841A8094018E995E112cad4B88e17862bA" +``` + +## Environment variables + +- [x] `export DAO_NETWORK=polygon-test` +- [x] `export DAO_OWNER=.secrets/dao-dev.json` +- [x] `export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)` +- [x] `export GAS_PRICE="35 gwei"` +- [x] `export CONFIRMATIONS=2` +- [x] `export TERMINUS_DIAMOND=0x040Cf7Ee9752936d8d280062a447eB53808EBc08` + +## Detach existing `TerminusFacet` + +- [x] Remove `TerminusFacet` from diamond. (This may require checkout of earlier commit and `brownie compile`. Checked out: `v0.0.1`.) + +```bash +dao core facet-cut \ + --address $TERMINUS_DIAMOND \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --gas-price "$GAS_PRICE" \ + --confirmations $CONFIRMATIONS \ + --facet-name TerminusFacet \ + --action remove \ + --ignore-methods contractURI setContractURI +``` + + +## Deploy `TerminusFacet` + +- [x] Deploy `TerminusFacet` contract + +```bash +dao terminus deploy \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --gas-price "$GAS_PRICE" \ + --confirmations $CONFIRMATIONS +``` + +- [x] Export address of deployed contract as `export TERMINUS_FACET_ADDRESS=0x1Ea387841A8094018E995E112cad4B88e17862bA` + +- [x] Store address of deployed contract under `Deployed addresses / TerminusFacet address` above + +- [x] Attach `TerminusFacet` to diamond: + +```bash +dao core facet-cut \ + --address $TERMINUS_DIAMOND \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --gas-price "$GAS_PRICE" \ + --confirmations $CONFIRMATIONS \ + --facet-name TerminusFacet \ + --facet-address $TERMINUS_FACET_ADDRESS \ + --action add +```