kopia lustrzana https://github.com/bugout-dev/dao
Merge pull request #26 from bugout-dev/terminus-deploy-mainnet
Deployed Terminus to Polygon mainnetpull/27/head
commit
244e1e4dda
|
@ -5,6 +5,24 @@ blockchains.
|
|||
|
||||
Unless otherwise specified, all operations are executed from the `main` branch of this repository.
|
||||
|
||||
## Polygon mainnet
|
||||
|
||||
### Current addresses
|
||||
|
||||
Terminus: `0x062BEc5e84289Da2CD6147E0e4DA402B33B8f796`
|
||||
|
||||
### Operations
|
||||
|
||||
- [Deployment of Terminus contract](./terminus-deploy-mainnet-20220121-0704.md)
|
||||
- [Terminus contract setup](./terminus-setup-mainnet-20220121-0704.md)
|
||||
|
||||
### Parameters
|
||||
|
||||
Terminus payment token: Wrapped Ether at `0x7ceB23fD6bC0adD59E62ac25578270cFf1b9f619`
|
||||
|
||||
Terminus pool base price: `0.01 WETH`
|
||||
|
||||
|
||||
## Polygon Mumbai testnet
|
||||
|
||||
### Current addresses
|
||||
|
@ -18,7 +36,7 @@ Terminus: `0x040Cf7Ee9752936d8d280062a447eB53808EBc08`
|
|||
- [Deployment of Moonstream platform token](./moonstream-deploy-mumbai-20211218-1633.md) - December 18, 2021
|
||||
- [Update to Moonstream platform token](./moonstream-update-mumbai-20211221-1912.md) - December 21, 2021
|
||||
- [Deployment of Terminus contract](./terminus-deploy-mumbai-20211222-2028.md) - December 22, 2021
|
||||
- [Terminus contract setup](terminus-setup-20211222-2049.md) - December 22, 2021
|
||||
- [Terminus contract setup](./terminus-setup-20211222-2049.md) - December 22, 2021
|
||||
|
||||
## Templates
|
||||
|
||||
|
|
|
@ -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" \
|
||||
|
|
|
@ -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`
|
|
@ -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`
|
|
@ -44,7 +44,7 @@ dao core facet-cut \
|
|||
|
||||
- [x] Check out relevant commit and `brownie compile`.
|
||||
|
||||
- [ ] Deploy `TerminusFacet` contract
|
||||
- [x] Deploy `TerminusFacet` contract
|
||||
|
||||
```bash
|
||||
dao terminus deploy \
|
||||
|
|
Ładowanie…
Reference in New Issue