Deployed Terminus to Polygon mainnet

pull/26/head
Neeraj Kashyap 2022-01-20 23:40:37 -08:00
rodzic 3edaa9de6e
commit ce9d083a81
3 zmienionych plików z 177 dodań i 1 usunięć

Wyświetl plik

@ -59,7 +59,7 @@ dao core gogogo \
- [ ] Deploy `TerminusInitializer` contract
```bash
dao moonstream-initializer deploy \
dao terminus-initializer deploy \
--network $DAO_NETWORK \
--sender $DAO_OWNER \
--gas-price "$GAS_PRICE" \

Wyświetl plik

@ -0,0 +1,127 @@
# 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
{
"DiamondCutFacet": "0x539d0E4A68F720b35c1670B6421673a852de52DB",
"Diamond": "0x062BEc5e84289Da2CD6147E0e4DA402B33B8f796",
"DiamondLoupeFacet": "0x024e974B4524f245fE3da60CbD70EC62875f8194",
"OwnershipFacet": "0x35f2d4877C7a468eA76f2D6666d3D8a487D73A9B",
"attached": [
"DiamondLoupeFacet",
"OwnershipFacet"
]
}
```
### `TerminusInitializer` address
```
export TERMINUS_INITIALIZER_ADDRESS="0x7BcBEE435544bD6F2B2c892040d5B7cD1B00fec7"
```
### `TerminusFacet` address
```
export TERMINUS_FACET_ADDRESS="0x63Cf75b3ffE339Ec30524F204a5FfB97813bF9fB"
```
## Environment variables
- [x] `export DAO_NETWORK=matic`
- [x] `export DAO_OWNER=<path to keystore file for owner account>`
- [x] `export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)`
- [x] `export GAS_PRICE="300 gwei"`
- [x] `export CONFIRMATIONS=5`
- [x] `export TERMINUS_ADDRESSES=.secrets/terminus-mainnet-diamond.json`
## Deploy diamond proxy
- [x] Deploy diamond with all core facets
```bash
dao core gogogo \
--network $DAO_NETWORK \
--sender $DAO_OWNER \
--gas-price "$GAS_PRICE" \
--confirmations $CONFIRMATIONS \
--owner $DAO_OWNER_ADDRESS \
--outfile $TERMINUS_ADDRESSES
```
- [x] Store JSON output under `Deployed addresses / Diamond addresses` above.
- [x] Export diamond proxy address: `export TERMINUS_DIAMOND="$(jq -r .Diamond $TERMINUS_ADDRESSES)"`
## Deploy `TerminusInitializer`
- [x] Deploy `TerminusInitializer` contract
```bash
dao terminus-initializer deploy \
--network $DAO_NETWORK \
--sender $DAO_OWNER \
--gas-price "$GAS_PRICE" \
--confirmations $CONFIRMATIONS
```
- [x] Export address of deployed contract as `export TERMINUS_INITIALIZER_ADDRESS=0x7BcBEE435544bD6F2B2c892040d5B7cD1B00fec7`
- [x] Store address of deployed contract under `Deployed addresses / TerminusInitializer address` above
### Notes
Accidentally deployed `ERC20Initializer` to this address: `0x838a510A2A93E1878149760Ed1540A8e7B77D596`.
Fixed the typo in the `terminus-deploy` template.
## 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=0x63Cf75b3ffE339Ec30524F204a5FfB97813bF9fB`
- [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 \
--initializer-address $TERMINUS_INITIALIZER_ADDRESS
```
- [x] Check the number of pools on the Terminus contract: `dao terminus total-pools --network $DAO_NETWORK --address $TERMINUS_DIAMOND`
- [x] Number of pools is `0`
- [x] Check the Terminus controller: `dao terminus terminus-controller --network $DAO_NETWORK --address $TERMINUS_DIAMOND`
- [x] Controller should be the same as `$DAO_OWNER_ADDRESS`

Wyświetl plik

@ -0,0 +1,49 @@
# Set up the Terminus contract
This checklist describes how to activate the Terminus contract so that projects can start using it for
decentralized authorization.
## Environment variables
- [x] `export DAO_NETWORK=matic`
- [x] `export DAO_OWNER=<path to keystore file for owner account>`
- [x] `export DAO_OWNER_ADDRESS=$(jq -r .address $DAO_OWNER)`
- [x] `export GAS_PRICE="300 gwei"`
- [x] `export CONFIRMATIONS=5`
- [x] `export WETH=0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619`
- [x] `export TERMINUS_DIAMOND=0x062BEc5e84289Da2CD6147E0e4DA402B33B8f796`
- [x] `export TERMINUS_POOL_BASE_PRICE=10000000000000000`
## Set up Terminus so that people can create pools
- [x] Set pool base price:
```bash
dao terminus set-pool-base-price \
--network $DAO_NETWORK \
--address $TERMINUS_DIAMOND \
--sender $DAO_OWNER \
--gas-price "$GAS_PRICE" \
--confirmations $CONFIRMATIONS \
--new-base-price $TERMINUS_POOL_BASE_PRICE
```
- [x] Check pool base price: `dao terminus pool-base-price --network $DAO_NETWORK --address $TERMINUS_DIAMOND`
- [x] Pool base price should be same as `$TERMINUS_POOL_BASE_PRICE`
- [x] Set up payment token:
```bash
dao terminus set-payment-token \
--network $DAO_NETWORK \
--address $TERMINUS_DIAMOND \
--sender $DAO_OWNER \
--gas-price "$GAS_PRICE" \
--confirmations $CONFIRMATIONS \
--new-payment-token $WETH
```
- [x] Check payment token: `dao terminus payment-token --network $DAO_NETWORK --address $TERMINUS_DIAMOND`
- [x] Payment token should be same as `$WETH`