From e2a2646a436c3c8ea0c71aa1754bf95b522e2534 Mon Sep 17 00:00:00 2001 From: Neeraj Kashyap Date: Wed, 26 Jan 2022 06:31:10 -0800 Subject: [PATCH 1/3] Added Terminus deployment checklist for customer --- .../terminus-deploy-mainnet-20220126-1418.md | 146 ++++++++++++++++++ 1 file changed, 146 insertions(+) create mode 100644 operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md diff --git a/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md b/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md new file mode 100644 index 0000000..57eff6c --- /dev/null +++ b/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md @@ -0,0 +1,146 @@ +# Deploy 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 deploy the contract. + +## Deployed addresses + +You will modify this section as you go through the checklist + +### Diamond addresses + +```json +export TERMINUS_DIAMOND="" +``` + +### `TerminusInitializer` address + +``` +export TERMINUS_INITIALIZER_ADDRESS="0x7BcBEE435544bD6F2B2c892040d5B7cD1B00fec7" +``` + + +### `TerminusFacet` address + +``` +export TERMINUS_FACET_ADDRESS="0x63Cf75b3ffE339Ec30524F204a5FfB97813bF9fB" +``` + +## Environment variables + +- [ ] `export DAO_NETWORK=matic` +- [ ] `export DAO_OWNER=` +- [ ] `export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)` +- [ ] `export MAX_FEE_PER_GAS="10000 gwei"` +- [ ] `export CONFIRMATIONS=5` +- [ ] `export TERMINUS_ADDRESSES=.secrets/terminus-mainnet-diamond.json` +- [ ] `export DIAMOND_CUT_FACET_ADDRESS=$(jq -r .DiamondCutFacet $TERMINUS_ADDRESSES)` +- [ ] `export DIAMOND_LOUPE_FACET_ADDRESS=$(jq -r .DiamondLoupeFacet $TERMINUS_ADDRESSES)` +- [ ] `export OWNERSHIP_FACET_ADDRESS=$(jq -r .OwnershipFacet $TERMINUS_ADDRESSES)` +- [ ] `export TERMINUS_FACET_ADDRESS=0x9718FA06867D2939981151D193cF7ee2B924aec0` +- [ ] `export TERMINUS_INITIALIZER_ADDRESS=0x7BcBEE435544bD6F2B2c892040d5B7cD1B00fec7` +- [ ] `export WETH=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619` +- [ ] `export TERMINUS_POOL_BASE_PRICE=10000000000000000` + +## Deployment + +- [ ] Deploy diamond with all core facets + +```bash +dao core diamond deploy \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --confirmations $CONFIRMATIONS \ + --owner $DAO_OWNER_ADDRESS \ + --contract-owner-arg $DAO_OWNER_ADDRESS \ + --diamond-cut-facet-arg $DIAMOND_CUT_FACET +``` + +- [ ] Store JSON output under `Deployed addresses / Diamond addresses` above. + +- [ ] Export diamond proxy address: `export TERMINUS_DIAMOND=""` + +- [ ] Attach `DiamondLoupeFacet` to diamond: + +```bash +dao core facet-cut \ + --address $TERMINUS_DIAMOND \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --confirmations $CONFIRMATIONS \ + --facet-name DiamondLoupeFacet \ + --facet-address $DIAMOND_LOUPE_FACET_ADDRESS \ + --action add +``` + +- [ ] Attach `OwnershipFacet` to diamond: + +```bash +dao core facet-cut \ + --address $TERMINUS_DIAMOND \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --confirmations $CONFIRMATIONS \ + --facet-name DiamondLoupeFacet \ + --facet-address $DIAMOND_LOUPE_FACET_ADDRESS \ + --action add +``` + +- [ ] Attach `TerminusFacet` to diamond: + +```bash +dao core facet-cut \ + --address $TERMINUS_DIAMOND \ + --network $DAO_NETWORK \ + --sender $DAO_OWNER \ + --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --confirmations $CONFIRMATIONS \ + --facet-name TerminusFacet \ + --facet-address $TERMINUS_FACET_ADDRESS \ + --action add \ + --initializer-address $TERMINUS_INITIALIZER_ADDRESS +``` + +- [ ] Check the number of pools on the Terminus contract: `dao terminus total-pools --network $DAO_NETWORK --address $TERMINUS_DIAMOND` + +- [ ] Number of pools is `0` + +- [ ] Check the Terminus controller: `dao terminus terminus-controller --network $DAO_NETWORK --address $TERMINUS_DIAMOND` + +- [ ] Controller should be the same as `$DAO_OWNER_ADDRESS` + +- [ ] Set pool base price: + +```bash +dao terminus set-pool-base-price \ + --network $DAO_NETWORK \ + --address $TERMINUS_DIAMOND \ + --sender $DAO_OWNER \ + --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --confirmations $CONFIRMATIONS \ + --new-base-price $TERMINUS_POOL_BASE_PRICE +``` + +- [ ] Check pool base price: `dao terminus pool-base-price --network $DAO_NETWORK --address $TERMINUS_DIAMOND` + +- [ ] Pool base price should be same as `$TERMINUS_POOL_BASE_PRICE` + +- [ ] Set up payment token: + +```bash +dao terminus set-payment-token \ + --network $DAO_NETWORK \ + --address $TERMINUS_DIAMOND \ + --sender $DAO_OWNER \ + --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --confirmations $CONFIRMATIONS \ + --new-payment-token $WETH +``` + +- [ ] Check payment token: `dao terminus payment-token --network $DAO_NETWORK --address $TERMINUS_DIAMOND` + +- [ ] Payment token should be same as `$WETH` From 3e27f2448b2e5320a3ffb2961a64dd04d92cf78f Mon Sep 17 00:00:00 2001 From: Neeraj Kashyap Date: Wed, 26 Jan 2022 06:57:03 -0800 Subject: [PATCH 2/3] Customer Terminus deployment complete --- .../terminus-deploy-mainnet-20220126-1418.md | 74 ++++++++++--------- 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md b/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md index 57eff6c..a52d872 100644 --- a/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md +++ b/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md @@ -11,7 +11,7 @@ You will modify this section as you go through the checklist ### Diamond addresses ```json -export TERMINUS_DIAMOND="" +export TERMINUS_DIAMOND="0x99A558BDBdE247C2B2716f0D4cFb0E246DFB697D" ``` ### `TerminusInitializer` address @@ -29,40 +29,41 @@ export TERMINUS_FACET_ADDRESS="0x63Cf75b3ffE339Ec30524F204a5FfB97813bF9fB" ## Environment variables -- [ ] `export DAO_NETWORK=matic` -- [ ] `export DAO_OWNER=` -- [ ] `export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)` -- [ ] `export MAX_FEE_PER_GAS="10000 gwei"` -- [ ] `export CONFIRMATIONS=5` -- [ ] `export TERMINUS_ADDRESSES=.secrets/terminus-mainnet-diamond.json` -- [ ] `export DIAMOND_CUT_FACET_ADDRESS=$(jq -r .DiamondCutFacet $TERMINUS_ADDRESSES)` -- [ ] `export DIAMOND_LOUPE_FACET_ADDRESS=$(jq -r .DiamondLoupeFacet $TERMINUS_ADDRESSES)` -- [ ] `export OWNERSHIP_FACET_ADDRESS=$(jq -r .OwnershipFacet $TERMINUS_ADDRESSES)` -- [ ] `export TERMINUS_FACET_ADDRESS=0x9718FA06867D2939981151D193cF7ee2B924aec0` -- [ ] `export TERMINUS_INITIALIZER_ADDRESS=0x7BcBEE435544bD6F2B2c892040d5B7cD1B00fec7` -- [ ] `export WETH=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619` -- [ ] `export TERMINUS_POOL_BASE_PRICE=10000000000000000` +- [x] `export DAO_NETWORK=matic` +- [x] `export DAO_OWNER=` +- [x] `export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)` +- [x] `export MAX_FEE_PER_GAS="1000 gwei"` +- [x] `export MAX_PRIORITY_FEE_PER_GAS="35 gwei"` +- [x] `export CONFIRMATIONS=5` +- [x] `export TERMINUS_ADDRESSES=.secrets/terminus-mainnet-diamond.json` +- [x] `export DIAMOND_CUT_FACET_ADDRESS=$(jq -r .DiamondCutFacet $TERMINUS_ADDRESSES)` +- [x] `export DIAMOND_LOUPE_FACET_ADDRESS=$(jq -r .DiamondLoupeFacet $TERMINUS_ADDRESSES)` +- [x] `export OWNERSHIP_FACET_ADDRESS=$(jq -r .OwnershipFacet $TERMINUS_ADDRESSES)` +- [x] `export TERMINUS_FACET_ADDRESS=0x9718FA06867D2939981151D193cF7ee2B924aec0` +- [x] `export TERMINUS_INITIALIZER_ADDRESS=0x7BcBEE435544bD6F2B2c892040d5B7cD1B00fec7` +- [x] `export WETH=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619` +- [x] `export TERMINUS_POOL_BASE_PRICE=10000000000000000` ## Deployment -- [ ] Deploy diamond with all core facets +- [x] Deploy diamond ```bash dao core diamond deploy \ --network $DAO_NETWORK \ --sender $DAO_OWNER \ --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \ --confirmations $CONFIRMATIONS \ - --owner $DAO_OWNER_ADDRESS \ --contract-owner-arg $DAO_OWNER_ADDRESS \ - --diamond-cut-facet-arg $DIAMOND_CUT_FACET + --diamond-cut-facet-arg $DIAMOND_CUT_FACET_ADDRESS ``` -- [ ] Store JSON output under `Deployed addresses / Diamond addresses` above. +- [x] Store JSON output under `Deployed addresses / Diamond addresses` above. -- [ ] Export diamond proxy address: `export TERMINUS_DIAMOND=""` +- [x] Export diamond proxy address: `export TERMINUS_DIAMOND="0x99A558BDBdE247C2B2716f0D4cFb0E246DFB697D"` -- [ ] Attach `DiamondLoupeFacet` to diamond: +- [x] Attach `DiamondLoupeFacet` to diamond: ```bash dao core facet-cut \ @@ -70,13 +71,14 @@ dao core facet-cut \ --network $DAO_NETWORK \ --sender $DAO_OWNER \ --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \ --confirmations $CONFIRMATIONS \ --facet-name DiamondLoupeFacet \ --facet-address $DIAMOND_LOUPE_FACET_ADDRESS \ --action add ``` -- [ ] Attach `OwnershipFacet` to diamond: +- [x] Attach `OwnershipFacet` to diamond: ```bash dao core facet-cut \ @@ -84,13 +86,14 @@ dao core facet-cut \ --network $DAO_NETWORK \ --sender $DAO_OWNER \ --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \ --confirmations $CONFIRMATIONS \ - --facet-name DiamondLoupeFacet \ - --facet-address $DIAMOND_LOUPE_FACET_ADDRESS \ + --facet-name OwnershipFacet \ + --facet-address $OWNERSHIP_FACET_ADDRESS \ --action add ``` -- [ ] Attach `TerminusFacet` to diamond: +- [x] Attach `TerminusFacet` to diamond: ```bash dao core facet-cut \ @@ -98,6 +101,7 @@ dao core facet-cut \ --network $DAO_NETWORK \ --sender $DAO_OWNER \ --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \ --confirmations $CONFIRMATIONS \ --facet-name TerminusFacet \ --facet-address $TERMINUS_FACET_ADDRESS \ @@ -105,15 +109,15 @@ dao core facet-cut \ --initializer-address $TERMINUS_INITIALIZER_ADDRESS ``` -- [ ] Check the number of pools on the Terminus contract: `dao terminus total-pools --network $DAO_NETWORK --address $TERMINUS_DIAMOND` +- [x] Check the number of pools on the Terminus contract: `dao terminus total-pools --network $DAO_NETWORK --address $TERMINUS_DIAMOND` -- [ ] Number of pools is `0` +- [x] Number of pools is `0` -- [ ] Check the Terminus controller: `dao terminus terminus-controller --network $DAO_NETWORK --address $TERMINUS_DIAMOND` +- [x] Check the Terminus controller: `dao terminus terminus-controller --network $DAO_NETWORK --address $TERMINUS_DIAMOND` -- [ ] Controller should be the same as `$DAO_OWNER_ADDRESS` +- [x] Controller should be the same as `$DAO_OWNER_ADDRESS` -- [ ] Set pool base price: +- [x] Set pool base price: ```bash dao terminus set-pool-base-price \ @@ -121,15 +125,16 @@ dao terminus set-pool-base-price \ --address $TERMINUS_DIAMOND \ --sender $DAO_OWNER \ --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \ --confirmations $CONFIRMATIONS \ --new-base-price $TERMINUS_POOL_BASE_PRICE ``` -- [ ] Check pool base price: `dao terminus pool-base-price --network $DAO_NETWORK --address $TERMINUS_DIAMOND` +- [x] Check pool base price: `dao terminus pool-base-price --network $DAO_NETWORK --address $TERMINUS_DIAMOND` -- [ ] Pool base price should be same as `$TERMINUS_POOL_BASE_PRICE` +- [x] Pool base price should be same as `$TERMINUS_POOL_BASE_PRICE` -- [ ] Set up payment token: +- [x] Set up payment token: ```bash dao terminus set-payment-token \ @@ -137,10 +142,11 @@ dao terminus set-payment-token \ --address $TERMINUS_DIAMOND \ --sender $DAO_OWNER \ --max-fee-per-gas "$MAX_FEE_PER_GAS" \ + --max-priority-fee-per-gas "$MAX_PRIORITY_FEE_PER_GAS" \ --confirmations $CONFIRMATIONS \ --new-payment-token $WETH ``` -- [ ] Check payment token: `dao terminus payment-token --network $DAO_NETWORK --address $TERMINUS_DIAMOND` +- [x] Check payment token: `dao terminus payment-token --network $DAO_NETWORK --address $TERMINUS_DIAMOND` -- [ ] Payment token should be same as `$WETH` +- [x] Payment token should be same as `$WETH` From e2f6ddca06488f082b596f7186a2f5035a728f65 Mon Sep 17 00:00:00 2001 From: Neeraj Kashyap Date: Wed, 26 Jan 2022 06:59:05 -0800 Subject: [PATCH 3/3] not JSON is not JSON --- .../terminus-deploy-mainnet-20220126-1418.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md b/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md index a52d872..b5836a7 100644 --- a/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md +++ b/operations/customer-f3bc8a15-3b10-4be5-817e-0f16b4a31b6a/terminus-deploy-mainnet-20220126-1418.md @@ -10,7 +10,7 @@ You will modify this section as you go through the checklist ### Diamond addresses -```json +``` export TERMINUS_DIAMOND="0x99A558BDBdE247C2B2716f0D4cFb0E246DFB697D" ```