Skip to content

Commit c907c51

Browse files
jdville03fforbeckadridadou
authored
Enable goerli deploy and remove deprecated testnets (#569)
* WIP goerli deploy setup and remove deprecated testnets * fix: get factory events * lint fix * fix deployment code * require node version * add identities as part of the logs to help with verification. TODO: add DaoRegistry identity contract * fix verification script Co-authored-by: Felipe Forbeck <[email protected]> Co-authored-by: david roon <[email protected]>
1 parent a718a13 commit c907c51

19 files changed

+153
-138
lines changed

.nvmrc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
16

.sample.env

+15-14
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,10 @@
33
# Set the name of your DAO. Make sure the DAO name is unique.
44
DAO_NAME=My Tribute DAO xyz...
55

6-
# The public ethereum address that belongs to the Owner of the DAO,
7-
# in this case, it is your public ethereum address on Rinkeby network.
8-
# Make sure you have some ETH, otherwise the deployment will fail.
9-
# It needs to be the address of the first account you have in metamask accounts,
10-
# otherwise it won't work.
6+
# The public ethereum address that belongs to the Owner of the DAO, in this
7+
# case, it is your public ethereum address on the Goerli network. Make sure you
8+
# have some ETH, otherwise the deployment will fail. It needs to be the address
9+
# of the first account you have in metamask accounts, otherwise it won't work.
1110
DAO_OWNER_ADDR=0x...
1211

1312
# The name of the ERC20 token of your DAO.
@@ -26,31 +25,33 @@ ERC20_TOKEN_DECIMALS=0
2625
# these steps to get your ProjectId/API Key from Infura:
2726
# https://blog.infura.io/getting-started-with-infura-28e41844cc89/
2827
# Set your own Infura API or Alchemy API key
29-
ETH_NODE_URL=https://rinkeby.infura.io/v3/your-infura-api-key
30-
#ETH_NODE_URL=https://eth-rinkeby.alchemyapi.io/v2/your-alchemy-api-key
28+
ETH_NODE_URL=https://goerli.infura.io/v3/<set-your-api-key-here>
29+
#ETH_NODE_URL=https://eth-goerli.alchemyapi.io/v2/<set-your-api-key-here>
3130
#ETH_NODE_URL=https://api.avax-test.network/ext/bc/C/rpc
3231

3332
# The 12 word "secret recovery phrase" for the ethereum address
3433
# referenced in DAO_OWNER_ADDR above. This can be found in your wallet.
3534
# It will be used to create the HD wallet and sign transactions on your behalf.
3635
WALLET_MNEMONIC=...
3736

37+
######################## Snapshot Hub env vars ########################
38+
ALCHEMY_API_URL=https://eth-goerli.alchemyapi.io/v2/<set-your-api-key-here>
3839

3940
######################## Tribute UI env vars ########################
4041

41-
# Configure the UI to use the Rinkeby network for local development
42-
REACT_APP_DEFAULT_CHAIN_NAME_LOCAL=RINKEBY
42+
# Configure the UI to use the Goerli network for local development
43+
REACT_APP_DEFAULT_CHAIN_NAME_LOCAL=GOERLI
4344

4445
# It can be the same value you used for the Tribute DAO deployment.
4546
REACT_APP_INFURA_PROJECT_ID_DEV=INFURA_API_KEY
4647

47-
# The address of the Multicall smart contract deployed to the Rinkeby network.
48-
# Copy that from the tribute-contracts/build/deployed/contracts-rinkeby-YYYY-MM-DD-HH:mm:ss.json
48+
# The address of the Multicall smart contract deployed to the Goerli network.
49+
# Copy that from the tribute-contracts/build/deployed/contracts-goerli-YYYY-MM-DD-HH:mm:ss.json
4950
REACT_APP_MULTICALL_CONTRACT_ADDRESS=0x...
5051

51-
# The address of the DaoRegistry smart contract deployed to the Rinkeby network.
52-
# Copy that from the tribute-contracts/build/deployed/contracts-rinkeby-YYYY-MM-DD-HH:mm:ss.json
52+
# The address of the DaoRegistry smart contract deployed to the Goerli network.
53+
# Copy that from the tribute-contracts/build/deployed/contracts-goerli-YYYY-MM-DD-HH:mm:ss.json
5354
REACT_APP_DAO_REGISTRY_CONTRACT_ADDRESS=0x...
5455

55-
# Enable Rinkeby network for Tribute UI
56+
# Enable Goerli network for Tribute UI
5657
REACT_APP_ENVIRONMENT=development

README.md

+10-16
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,7 @@ npm run compile
179179

180180
### Deploy contracts
181181

182-
Deploy contracts to networks such as rinkeby, goerli, harmonytest, polygontest, ganache, mainnet, harmony, polygon or avalanche.
183-
184-
```sh
185-
npm run deploy rinkeby
186-
```
187-
188-
OR
182+
Deploy contracts to networks such as goerli, harmonytest, polygontest, ganache, mainnet, harmony, polygon or avalanche.
189183

190184
```sh
191185
npm run deploy goerli
@@ -238,7 +232,7 @@ For more information about the deployment, see the in logs [logs/contracts](logs
238232
### Verify contracts
239233

240234
```sh
241-
npm run verify rinkeby
235+
npm run verify goerli
242236
```
243237

244238
OR
@@ -254,21 +248,21 @@ In the same `.env` file created under the `tribute-contracts` folder, set the fo
254248
```
255249
######################## Tribute UI env vars ########################
256250
257-
# Configure the UI to use the Rinkeby network for local development
258-
REACT_APP_DEFAULT_CHAIN_NAME_LOCAL=RINKEBY
251+
# Configure the UI to use the Goerli network for local development
252+
REACT_APP_DEFAULT_CHAIN_NAME_LOCAL=GOERLI
259253
260254
# It can be the same value you used for the Tribute DAO deployment.
261255
REACT_APP_INFURA_PROJECT_ID_DEV=YOUR_INFURA_API_KEY
262256
263-
# The address of the Multicall smart contract deployed to the Rinkeby network.
264-
# Copy that from the tribute-contracts/build/contracts-rinkeby-YYYY-MM-DD-HH:mm:ss.json
257+
# The address of the Multicall smart contract deployed to the Goerli network.
258+
# Copy that from the tribute-contracts/build/contracts-goerli-YYYY-MM-DD-HH:mm:ss.json
265259
REACT_APP_MULTICALL_CONTRACT_ADDRESS=0x...
266260
267-
# The address of the DaoRegistry smart contract deployed to the Rinkeby network.
268-
# Copy that from the tribute-contracts/build/contracts-rinkeby-YYYY-MM-DD-HH:mm:ss.json
261+
# The address of the DaoRegistry smart contract deployed to the Goerli network.
262+
# Copy that from the tribute-contracts/build/contracts-goerli-YYYY-MM-DD-HH:mm:ss.json
269263
REACT_APP_DAO_REGISTRY_CONTRACT_ADDRESS=0x...
270264
271-
# Enable Rinkeby network for Tribute UI
265+
# Enable Goerli network for Tribute UI
272266
REACT_APP_ENVIRONMENT=development
273267
```
274268

@@ -332,7 +326,7 @@ Snapshot-hub:
332326
- `ENV`: To indicate in which environment it is being executed: local, dev, or prod
333327
- `USE_IPFS`: To indicated the pinning service on IPFS should be enabled/disabled (if enabled cause delay in the responses)
334328
- `RELAYER_PK`: The PK of the account that will be used to sign the messages.
335-
- `NETWORK`: The network name that will be used by the relayer (use testnet for: rinkeby or ropsten), and mainnet for the main eth network
329+
- `NETWORK`: The network name that will be used by the relayer (use testnet for goerli and mainnet for the main ethereum network)
336330
- `JAWSDB_URL`: The postgres url: postgres://user:pwd@host:5432/db-name
337331
- `ALLOWED_DOMAINS`: The list of domains that should be allowed to send requests to the API
338332
- `ALCHEMY_API_URL`: The relayer API (alternative to Infura)

configs/networks/rinkeby.config.ts

-23
This file was deleted.

contracts/helpers/WETH.sol

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//WETH-03.24.2020.sol
2-
//deployed March 24,2020 Rinkeby - 0x8DD25714CCEce48767BaF266EC4F220B60f84D52
1+
// WETH-03.24.2020.sol
32
// SPDX-License-Identifier: MIT
43
pragma solidity ^0.8.0;
54

docker/README-ganache.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ In the root of `tribute-contracts` folder create a .env file. This file will con
1919
DAO_NAME=My Tribute DAO xyz...
2020
2121
# The public ethereum address that belongs to the Owner of the DAO,
22-
# in this case, it is your public ethereum address on Rinkeby network.
22+
# in this case, it is your public ethereum address on the Ganache network.
2323
# Make sure you have some ETH, otherwise the deployment will fail.
2424
# It needs to be the address of the first account you have in metamask accounts,
2525
# otherwise it won't work.
@@ -40,7 +40,7 @@ ERC20_TOKEN_DECIMALS=0
4040
# The Ethereum Node URL to connect the Ethereum network. You can follow
4141
# these steps to get your ProjectId/API Key from Infura:
4242
# https://blog.infura.io/getting-started-with-infura-28e41844cc89/
43-
# Or can use the default one from OpenLaw team, or set your own Infura/Alchemy API keys
43+
# Set your own Infura/Alchemy API keys
4444
ETH_NODE_URL=http://localhost:7545
4545
4646
# The 12 word "secret recovery phrase" for the ethereum address
@@ -88,11 +88,11 @@ REACT_APP_DEFAULT_CHAIN_NAME_LOCAL=GANACHE
8888
# It can be the same value you used for the Tribute DAO deployment.
8989
REACT_APP_INFURA_PROJECT_ID_DEV=set-your-infura-api-key-here
9090
91-
# The address of the Multicall smart contract deployed to the Rinkeby network.
91+
# The address of the Multicall smart contract deployed to the Ganache network.
9292
# Copy that from the tribute-contracts/build/deployed/contracts-ganache-YYYY-MM-DD-HH:mm:ss.json
9393
REACT_APP_MULTICALL_CONTRACT_ADDRESS=0x...
9494
95-
# The address of the DaoRegistry smart contract deployed to the Rinkeby network.
95+
# The address of the DaoRegistry smart contract deployed to the Ganache network.
9696
# Copy that from the tribute-contracts/build/deployed/contracts-ganache-YYYY-MM-DD-HH:mm:ss.json
9797
REACT_APP_DAO_REGISTRY_CONTRACT_ADDRESS=0x...
9898
```

docker/README.md

+13-14
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Launching a Tribute DAO on Rinkeby
1+
## Launching a Tribute DAO on Goerli
22

33
### 1. Clone tribute-contracts repository
44

@@ -19,7 +19,7 @@ In the root of `tribute-contracts` folder create a `.env` file. This file will c
1919
DAO_NAME=My Tribute DAO xyz...
2020
2121
# The public ethereum address that belongs to the Owner of the DAO,
22-
# in this case, it is your public ethereum address on Rinkeby network.
22+
# in this case, it is your public ethereum address on the Goerli network.
2323
# Make sure you have some ETH, otherwise the deployment will fail.
2424
# It needs to be the address of the first account you have in metamask accounts,
2525
# otherwise it won't work.
@@ -40,10 +40,9 @@ ERC20_TOKEN_DECIMALS=0
4040
# The Ethereum Node URL to connect the Ethereum network. You can follow
4141
# these steps to get your ProjectId/API Key from Infura:
4242
# https://blog.infura.io/getting-started-with-infura-28e41844cc89/
43-
# Or can use the default one from OpenLaw team, or set your own Infura/Alchemy API keys
44-
ETH_NODE_URL=http://rinkeby.openlaw.io:8546
45-
#ETH_NODE_URL=https://rinkeby.infura.io/v3/<set-your-api-key-here>
46-
#ETH_NODE_URL=https://eth-rinkeby.alchemyapi.io/v2/<set-your-api-key-here>
43+
# Set your own Infura/Alchemy API keys
44+
ETH_NODE_URL=https://goerli.infura.io/v3/<set-your-api-key-here>
45+
#ETH_NODE_URL=https://eth-goerli.alchemyapi.io/v2/<set-your-api-key-here>
4746
4847
# The 12 word "secret recovery phrase" for the ethereum address
4948
# referenced in DAO_OWNER_ADDR above. This can be found in your wallet.
@@ -61,7 +60,7 @@ With the environment variables ready, we can install the project dependencies an
6160

6261
Using NodeJS v16.x, run:
6362

64-
- > npm run build && npm run deploy rinkeby
63+
- > npm run build && npm run deploy goerli
6564
6665
### 4. Set the tribute-ui environment variables
6766

@@ -72,21 +71,21 @@ In the same `.env` file created under the `tribute-contracts` folder, add the fo
7271
```
7372
######################## Tribute UI env vars ########################
7473
75-
# Configure the UI to use the Rinkeby network for local development
76-
REACT_APP_DEFAULT_CHAIN_NAME_LOCAL=RINKEBY
74+
# Configure the UI to use the Goerli network for local development
75+
REACT_APP_DEFAULT_CHAIN_NAME_LOCAL=GOERLI
7776
7877
# It can be the same value you used for the Tribute DAO deployment.
7978
REACT_APP_INFURA_PROJECT_ID_DEV=set-your-infura-api-key-here
8079
81-
# The address of the Multicall smart contract deployed to the Rinkeby network.
82-
# Copy that from the tribute-contracts/build/deployed/contracts-rinkeby-YYYY-MM-DD-HH:mm:ss.json
80+
# The address of the Multicall smart contract deployed to the Goerli network.
81+
# Copy that from the tribute-contracts/build/deployed/contracts-goerli-YYYY-MM-DD-HH:mm:ss.json
8382
REACT_APP_MULTICALL_CONTRACT_ADDRESS=0x...
8483
85-
# The address of the DaoRegistry smart contract deployed to the Rinkeby network.
86-
# Copy that from the tribute-contracts/build/deployed/contracts-rinkeby-YYYY-MM-DD-HH:mm:ss.json
84+
# The address of the DaoRegistry smart contract deployed to the Goerli network.
85+
# Copy that from the tribute-contracts/build/deployed/contracts-goerli-YYYY-MM-DD-HH:mm:ss.json
8786
REACT_APP_DAO_REGISTRY_CONTRACT_ADDRESS=0x...
8887
89-
# Enable Rinkeby network for Tribute UI
88+
# Enable Goerli network for Tribute UI
9089
REACT_APP_ENVIRONMENT=development
9190
```
9291

docker/docker-compose.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ services:
66
trib-snapshot-hub:
77
image: openlaw/snapshot-hub:v5.0.1-erc712
88
container_name: trib-snapshot-hub
9+
env_file:
10+
- ../.env
911
environment:
1012
ENV: "local"
1113
PORT: 8080
1214
RELAYER_PK: "0xb80a5165a59af8ce566266fcd0e919e13ed4ecbd57ae952e73ae2cddc08b84c6"
13-
ALCHEMY_API_URL: "http://rinkeby.openlaw.io:8545"
1415
JAWSDB_URL: "postgres://snap:pwd123@trib-snapshot-db:5432/snapshot-db"
1516
IGNORE_VOTE_END_CONSTRAINT: "true"
1617
ALLOWED_DOMAINS: "http://localhost:3000"

hardhat.config.js

+1-26
Original file line numberDiff line numberDiff line change
@@ -56,31 +56,6 @@ module.exports = {
5656
},
5757
signerId: process.env.SIGNER || undefined,
5858
},
59-
rinkeby: {
60-
url: process.env.ETH_NODE_URL,
61-
network_id: 4,
62-
chainId: 4,
63-
skipDryRun: true,
64-
gas: 2100000,
65-
gasPrice: 4000000000,
66-
accounts: {
67-
mnemonic: process.env.WALLET_MNEMONIC || "",
68-
count: 10,
69-
},
70-
signerId: process.env.SIGNER || undefined,
71-
},
72-
ropsten: {
73-
url: process.env.ETH_NODE_URL,
74-
network_id: 3,
75-
chainId: 3,
76-
gas: 2100000,
77-
gasPrice: 4000000000,
78-
accounts: {
79-
mnemonic: process.env.WALLET_MNEMONIC || "",
80-
count: 10,
81-
},
82-
signerId: process.env.SIGNER || undefined,
83-
},
8459
harmonytest: {
8560
url: process.env.ETH_NODE_URL,
8661
network_id: 1666700000,
@@ -223,7 +198,7 @@ module.exports = {
223198

224199
etherscan: {
225200
apiKey: {
226-
rinkeby: process.env.ETHERSCAN_API_KEY,
201+
goerli: process.env.ETHERSCAN_API_KEY,
227202
mainnet: process.env.ETHERSCAN_API_KEY,
228203
},
229204
},

package.json

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
"main": "hardhat-config.js",
2525
"directories": {
2626
"test": "test"
27+
},
28+
"engines" : {
29+
"npm" : ">=7.0.0 <9.0.0",
30+
"node" : ">=16.0.0 <17.0.0"
2731
},
2832
"scripts": {
2933
"build": "npm ci && npm run compile",

signers/DefenderSignerProvider.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export class DefenderSignerProvider extends ProviderWrapper {
2626
) {
2727
super(provider);
2828
this.chainId = chainId;
29-
const p = ethers.getDefaultProvider("rinkeby");
29+
const p = ethers.getDefaultProvider("goerli");
3030
this.signer = new DefenderRelaySigner(
3131
{
3232
apiKey: config.apiKey,

signers/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Signers
22

3-
A Signer Provider can be used to sign transactions using a private key managed by an external service, so that transaction can be send to the network using any sort of Network Provider.
3+
A Signer Provider can be used to sign transactions using a private key managed by an external service, so that transaction can be sent to the network using any sort of Network Provider.
44

55
In this hardhat plugin we currently support two types of Signers: OZ Defender Signer and Google KMS Signer.
66

@@ -9,10 +9,10 @@ Both signers are acting as external signers only. We don't use them to forward t
99
In order to enable a signer for a particular network set the `signerId` to the network config in the `hardhat.config.ts` file:
1010

1111
```
12-
rinkeby: {
12+
goerli: {
1313
url: process.env.ETH_NODE_URL,
14-
network_id: 4,
15-
chainId: 4,
14+
network_id: 5,
15+
chainId: 5,
1616
skipDryRun: true,
1717
gas: 2100000,
1818
gasPrice: 4000000000,

0 commit comments

Comments
 (0)