Skip to content

Commit

Permalink
Adds support to Sepolia and Gnosis networks (#596)
Browse files Browse the repository at this point in the history
* sepolia network support
* lib updates + sepolia contract verification
* fix incompatible lib versions
* gnosis network support
* set node version
  • Loading branch information
fforbeck authored Mar 22, 2024
1 parent 8d55e57 commit 38a54e1
Show file tree
Hide file tree
Showing 14 changed files with 50,797 additions and 41,148 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "16.3.0"
node-version: "16.20.0"

- name: Setup SSH to install dependencies
uses: webfactory/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "16.3.0"
node-version: "16.20.0"

- name: Setup SSH to install dependencies
uses: webfactory/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/slither.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "16.3.0"
node-version: "16.20.0"

- name: Setup SSH to install dependencies
uses: webfactory/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: "16.3.0"
node-version: "16.20.0"

- name: Setup SSH to install dependencies
uses: webfactory/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16
16.20
64 changes: 11 additions & 53 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -179,60 +179,18 @@ npm run compile

### Deploy contracts

Deploy contracts to networks such as goerli, harmonytest, polygontest, ganache, mainnet, harmony, polygon or avalanche.
Deploy contracts to networks such as sepolia, harmonytest, polygontest, ganache, mainnet, harmony, polygon or avalanche.

```sh
npm run deploy goerli
```

OR

```sh
npm run deploy harmonytest
```

OR

```sh
npm run deploy polygontest
```

OR

```sh
npm run deploy avalanchetest
```

OR

```sh
npm run deploy mainnet
```

OR

```sh
npm run deploy harmony
```

OR

```sh
npm run deploy polygon
```

OR

```sh
npm run deploy avalanche
npm run deploy sepolia
```

For more information about the deployment, see the in logs [logs/contracts](logs/contracts)

### Verify contracts

```sh
npm run verify goerli
npm run verify sepolia
```

OR
Expand All @@ -248,21 +206,21 @@ In the same `.env` file created under the `tribute-contracts` folder, set the fo
```
######################## Tribute UI env vars ########################
# Configure the UI to use the Goerli network for local development
REACT_APP_DEFAULT_CHAIN_NAME_LOCAL=GOERLI
# Configure the UI to use the Sepolia network for local development
REACT_APP_DEFAULT_CHAIN_NAME_LOCAL=SEPOLIA
# It can be the same value you used for the Tribute DAO deployment.
REACT_APP_INFURA_PROJECT_ID_DEV=YOUR_INFURA_API_KEY
# The address of the Multicall smart contract deployed to the Goerli network.
# Copy that from the tribute-contracts/build/contracts-goerli-YYYY-MM-DD-HH:mm:ss.json
# The address of the Multicall smart contract deployed to the Sepolia network.
# Copy that from the tribute-contracts/build/contracts-sepolia-YYYY-MM-DD-HH:mm:ss.json
REACT_APP_MULTICALL_CONTRACT_ADDRESS=0x...
# The address of the DaoRegistry smart contract deployed to the Goerli network.
# Copy that from the tribute-contracts/build/contracts-goerli-YYYY-MM-DD-HH:mm:ss.json
# The address of the DaoRegistry smart contract deployed to the Sepolia network.
# Copy that from the tribute-contracts/build/contracts-sepolia-YYYY-MM-DD-HH:mm:ss.json
REACT_APP_DAO_REGISTRY_CONTRACT_ADDRESS=0x...
# Enable Goerli network for Tribute UI
# Enable Sepolia network for Tribute UI
REACT_APP_ENVIRONMENT=development
```

Expand Down Expand Up @@ -326,7 +284,7 @@ Snapshot-hub:
- `ENV`: To indicate in which environment it is being executed: local, dev, or prod
- `USE_IPFS`: To indicated the pinning service on IPFS should be enabled/disabled (if enabled cause delay in the responses)
- `RELAYER_PK`: The PK of the account that will be used to sign the messages.
- `NETWORK`: The network name that will be used by the relayer (use testnet for goerli and mainnet for the main ethereum network)
- `NETWORK`: The network name that will be used by the relayer (use testnet for sepolia and mainnet for the main ethereum network)
- `JAWSDB_URL`: The postgres url: postgres://user:pwd@host:5432/db-name
- `ALLOWED_DOMAINS`: The list of domains that should be allowed to send requests to the API
- `ALCHEMY_API_URL`: The relayer API (alternative to Infura)
Expand Down
42 changes: 42 additions & 0 deletions configs/networks/gnosis.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import {
contracts as defaultContracts,
ContractConfig,
} from "../contracts.config";

const disabled: Array<string> = [
// Utility & Test Contracts disabled by default
"OLToken",
"TestToken1",
"TestToken2",
"TestFairShareCalc",
"PixelNFT",
"ProxToken",
"ERC20Minter",
"MockDao",
"Multicall",
"WETH",
"ProxTokenContract",
"ERC20MinterContract",
// Adapters, Extensions and Factories disabled by default
"NFTCollectionFactory",
"ERC1271ExtensionFactory",
"ExecutorExtensionFactory",
"ERC1155TokenCollectionFactory",
"NFTExtension",
"ERC1271Extension",
"ExecutorExtension",
"ERC1155TokenExtension",
"ERC1155AdapterContract",
"FinancingContract",
"OnboardingContract",
"TributeContract",
"TributeNFTContract",
"LendNFTContract",
];

export const contracts: Array<ContractConfig> = defaultContracts.map((c) => {
if (disabled.find((e) => e === c.name)) {
return { ...c, enabled: false };
}
return c;
});
42 changes: 42 additions & 0 deletions configs/networks/sepolia.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
import {
contracts as defaultContracts,
ContractConfig,
} from "../contracts.config";

const disabled: Array<string> = [
// Utility & Test Contracts disabled by default
"OLToken",
"TestToken1",
"TestToken2",
"TestFairShareCalc",
"PixelNFT",
"ProxToken",
"ERC20Minter",
"MockDao",
"Multicall",
"WETH",
"ProxTokenContract",
"ERC20MinterContract",
// Adapters, Extensions and Factories disabled by default
"NFTCollectionFactory",
"ERC1271ExtensionFactory",
"ExecutorExtensionFactory",
"ERC1155TokenCollectionFactory",
"NFTExtension",
"ERC1271Extension",
"ExecutorExtension",
"ERC1155TokenExtension",
"ERC1155AdapterContract",
"FinancingContract",
"OnboardingContract",
"TributeContract",
"TributeNFTContract",
"LendNFTContract",
];

export const contracts: Array<ContractConfig> = defaultContracts.map((c) => {
if (disabled.find((e) => e === c.name)) {
return { ...c, enabled: false };
}
return c;
});
24 changes: 24 additions & 0 deletions hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@ module.exports = {
},
signerId: process.env.SIGNER || undefined,
},
sepolia: {
url: process.env.ETH_NODE_URL,
network_id: 11155111,
chainId: 11155111,
skipDryRun: true,
accounts: {
mnemonic: process.env.WALLET_MNEMONIC || "",
count: 10,
},
signerId: process.env.SIGNER || undefined,
},
harmonytest: {
url: process.env.ETH_NODE_URL,
network_id: 1666700000,
Expand Down Expand Up @@ -114,6 +125,17 @@ module.exports = {
},
signerId: process.env.SIGNER || undefined,
},
gnosis: {
url: process.env.ETH_NODE_URL,
network_id: 100,
chainId: 100,
skipDryRun: true,
accounts: {
mnemonic: process.env.WALLET_MNEMONIC || "",
count: 10,
},
signerId: process.env.SIGNER || undefined,
},
harmony: {
url: process.env.ETH_NODE_URL,
network_id: 1666600000,
Expand Down Expand Up @@ -192,6 +214,8 @@ module.exports = {
etherscan: {
apiKey: {
goerli: process.env.ETHERSCAN_API_KEY,
sepolia: process.env.ETHERSCAN_API_KEY,
gnosis: process.env.ETHERSCAN_API_KEY,
mainnet: process.env.ETHERSCAN_API_KEY,
},
},
Expand Down
Loading

0 comments on commit 38a54e1

Please sign in to comment.