Skip to content

Commit

Permalink
Add Sepolia (#123)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienbrg authored Jan 10, 2024
1 parent 1990457 commit f9ac5d4
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 62 deletions.
5 changes: 5 additions & 0 deletions .env.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ GOERLI_TESTNET_ENDPOINT_URL="https://goerli.infura.io/v3/88888888888888888888888
GOERLI_TESTNET_PRIVATE_KEY="8888888888888888888888888888888888888888888888888888888888888888"
GOERLI_ETHERSCAN_API_KEY="8888888888888888888888888888888888"

# Sepolia Testnet
SEPOLIA_RPC_ENDPOINT_URL="https://ethereum-sepolia.publicnode.com"
SEPOLIA_PRIVATE_KEY="8888888888888888888888888888888888888888888888888888888888888888"
SEPOLIA_ETHERSCAN_API_KEY="8888888888888888888888888888888888"

# Optimism Goerli Testnet
OPTIMISM_TESTNET_ENDPOINT_URL="https://optimism-goerli.infura.io/v3/88888888888888888888888888888888"
OPTIMISM_TESTNET_PRIVATE_KEY="8888888888888888888888888888888888888888888888888888888888888888"
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ Then deploy to Goerli:
pnpm deploy:goerli
```

or deploy to Sepolia

```bash
pnpm deploy:sepolia
```

or deploy to Arthera

```bash
Expand Down
28 changes: 14 additions & 14 deletions dao.config.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
export const firstMembers = [
"0xD8a394e7d7894bDF2C57139fF17e5CBAa29Dd977", // First members. Super important.
"0xe61A1a5278290B6520f0CEf3F2c71Ba70CF5cf4C"
"0xe61A1a5278290B6520f0CEf3F2c71Ba70CF5cf4C",
];

// DAO config
export const daoName = "Our DAO" // Give your DAO a name.
export const votingDelay = 1 // Just 1 block voting delay by default.
export const votingPeriod = 300 // Depends on the network you're deploying to.
export const quorum = 20 // Classic 20% quorum by default.
export const votingThreshold = 0 // 0 allows non-members to submit proposals.
export const daoName = "Our DAO"; // Give your DAO a name.
export const votingDelay = 1; // Just 1 block voting delay by default.
export const votingPeriod = 300; // Depends on the network you're deploying to.
export const quorum = 20; // Classic 20% quorum by default.
export const votingThreshold = 0; // 0 allows non-members to submit proposals.

// NFT config
export const nftSymbol = "MEMBER" // NFT symbol
export const nftDescription = "This is us." // Nft description
export const nftSymbol = "MEMBER"; // NFT symbol
export const nftDescription = "This is us."; // Nft description

// set to false if you don't want any specific attributes to the membership NFT
export const attributes = true
export const attributes = false;

// Attributes: relevant only when attributes is true
export const participationRate = "100%"
export const daoAddress = "unset"
export const nickname = "unset"
export const contribs = 0
export const role = "Hacker"
export const participationRate = "100%";
export const daoAddress = "unset";
export const nickname = "unset";
export const contribs = 0;
export const role = "Hacker";
134 changes: 86 additions & 48 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ import "hardhat-celo";

dotenv.config();

const {
const {
GOERLI_TESTNET_ENDPOINT_URL,
GOERLI_TESTNET_PRIVATE_KEY,
GOERLI_ETHERSCAN_API_KEY,

GOERLI_TESTNET_ENDPOINT_URL,
GOERLI_TESTNET_PRIVATE_KEY,
GOERLI_ETHERSCAN_API_KEY,
SEPOLIA_RPC_ENDPOINT_URL,
SEPOLIA_PRIVATE_KEY,
SEPOLIA_ETHERSCAN_API_KEY,

OPTIMISM_TESTNET_ENDPOINT_URL,
OPTIMISM_TESTNET_PRIVATE_KEY,
OPTIMISM_ETHERSCAN_API_KEY,
OPTIMISM_ETHERSCAN_API_KEY,

OPTIMISM_MAINNET_ENDPOINT_URL,
OPTIMISM_MAINNET_PRIVATE_KEY,
Expand All @@ -23,12 +26,12 @@ const {
ARBITRUM_TESTNET_PRIVATE_KEY,
ARBITRUM_ETHERSCAN_API_KEY,

CELO_TESTNET_ENDPOINT_URL,
CELO_TESTNET_PRIVATE_KEY,
CELO_ETHERSCAN_API_KEY,
CELO_TESTNET_ENDPOINT_URL,
CELO_TESTNET_PRIVATE_KEY,
CELO_ETHERSCAN_API_KEY,

CELO_MAINNET_ENDPOINT_URL,
CELO_MAINNET_PRIVATE_KEY,
CELO_MAINNET_ENDPOINT_URL,
CELO_MAINNET_PRIVATE_KEY,

GNOSIS_MAINNET_ENDPOINT_URL,
GNOSIS_MAINNET_PRIVATE_KEY,
Expand All @@ -38,11 +41,10 @@ const {
CHIADO_TESTNET_PRIVATE_KEY,

BASE_TESTNET_PRIVATE_KEY,

MANTLE_TESTNET_PRIVATE_KEY,

ARTHERA_TESTNET_PRIVATE_KEY,
MANTLE_TESTNET_PRIVATE_KEY,

ARTHERA_TESTNET_PRIVATE_KEY,
} = process.env;

const config: HardhatUserConfig = {
Expand All @@ -51,71 +53,107 @@ const config: HardhatUserConfig = {
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
runs: 200,
},
},
},
mocha: {
timeout: 100000
timeout: 100000,
},
networks: {
'hardhat': {
hardhat: {
chainId: 1337,
allowUnlimitedContractSize: true
allowUnlimitedContractSize: true,
},
'goerli': {

goerli: {
url: GOERLI_TESTNET_ENDPOINT_URL as string,
accounts: GOERLI_TESTNET_PRIVATE_KEY !== undefined ? [GOERLI_TESTNET_PRIVATE_KEY] : [],
accounts: SEPOLIA_PRIVATE_KEY !== undefined ? [SEPOLIA_PRIVATE_KEY] : [],
},
sepolia: {
url: SEPOLIA_RPC_ENDPOINT_URL as string,
accounts:
GOERLI_TESTNET_PRIVATE_KEY !== undefined
? [GOERLI_TESTNET_PRIVATE_KEY]
: [],
},
'optimism-goerli': {
"optimism-goerli": {
url: OPTIMISM_TESTNET_ENDPOINT_URL as string,
accounts: OPTIMISM_TESTNET_PRIVATE_KEY !== undefined ? [OPTIMISM_TESTNET_PRIVATE_KEY] : [],
accounts:
OPTIMISM_TESTNET_PRIVATE_KEY !== undefined
? [OPTIMISM_TESTNET_PRIVATE_KEY]
: [],
// gasPrice: 35000000000,
},
'optimism': {
optimism: {
url: OPTIMISM_MAINNET_ENDPOINT_URL as string,
accounts: OPTIMISM_MAINNET_PRIVATE_KEY !== undefined ? [OPTIMISM_MAINNET_PRIVATE_KEY] : [],
accounts:
OPTIMISM_MAINNET_PRIVATE_KEY !== undefined
? [OPTIMISM_MAINNET_PRIVATE_KEY]
: [],
},
'arbitrum-goerli': {
"arbitrum-goerli": {
url: ARBITRUM_TESTNET_ENDPOINT_URL as string,
accounts: ARBITRUM_TESTNET_PRIVATE_KEY !== undefined ? [ARBITRUM_TESTNET_PRIVATE_KEY] : [],
accounts:
ARBITRUM_TESTNET_PRIVATE_KEY !== undefined
? [ARBITRUM_TESTNET_PRIVATE_KEY]
: [],
},
'alfajores': {
alfajores: {
url: CELO_TESTNET_ENDPOINT_URL as string,
accounts: CELO_TESTNET_PRIVATE_KEY !== undefined ? [CELO_TESTNET_PRIVATE_KEY] : [],
chainId: 44787
accounts:
CELO_TESTNET_PRIVATE_KEY !== undefined
? [CELO_TESTNET_PRIVATE_KEY]
: [],
chainId: 44787,
},
'celo': {
celo: {
url: CELO_MAINNET_ENDPOINT_URL as string,
accounts: CELO_MAINNET_PRIVATE_KEY !== undefined ? [CELO_MAINNET_PRIVATE_KEY] : [],
accounts:
CELO_MAINNET_PRIVATE_KEY !== undefined
? [CELO_MAINNET_PRIVATE_KEY]
: [],
},
'gnosis': {
gnosis: {
url: GNOSIS_MAINNET_ENDPOINT_URL as string,
accounts: GNOSIS_MAINNET_PRIVATE_KEY !== undefined ? [GNOSIS_MAINNET_PRIVATE_KEY] : [],
accounts:
GNOSIS_MAINNET_PRIVATE_KEY !== undefined
? [GNOSIS_MAINNET_PRIVATE_KEY]
: [],
// gasPrice: 1000000000,
},
'chiado': {
chiado: {
url: CHIADO_TESTNET_ENDPOINT_URL as string,
accounts: CHIADO_TESTNET_PRIVATE_KEY !== undefined ? [CHIADO_TESTNET_PRIVATE_KEY] : [],
accounts:
CHIADO_TESTNET_PRIVATE_KEY !== undefined
? [CHIADO_TESTNET_PRIVATE_KEY]
: [],
gasPrice: 1000000000,
},
'base-goerli': {
url: 'https://goerli.base.org',
"base-goerli": {
url: "https://goerli.base.org",
accounts: [process.env.BASE_TESTNET_PRIVATE_KEY as string],
},
"mantle-testnet": {
url: "https://rpc.testnet.mantle.xyz/",
accounts: MANTLE_TESTNET_PRIVATE_KEY !== undefined ? [MANTLE_TESTNET_PRIVATE_KEY] : [],
accounts:
MANTLE_TESTNET_PRIVATE_KEY !== undefined
? [MANTLE_TESTNET_PRIVATE_KEY]
: [],
},
'arthera-testnet': {
url: 'https://rpc-test.arthera.net',
"arthera-testnet": {
url: "https://rpc-test.arthera.net",
chainId: 10243,
accounts: ARTHERA_TESTNET_PRIVATE_KEY !== undefined ? [ARTHERA_TESTNET_PRIVATE_KEY] : []
accounts:
ARTHERA_TESTNET_PRIVATE_KEY !== undefined
? [ARTHERA_TESTNET_PRIVATE_KEY]
: [],
},
},
},
etherscan: {
apiKey: {
goerli: GOERLI_ETHERSCAN_API_KEY || "",
sepolia: SEPOLIA_ETHERSCAN_API_KEY || "",
optimisticGoerli: OPTIMISM_ETHERSCAN_API_KEY || "",
optimisticEthereum: OPTIMISM_ETHERSCAN_API_KEY || "",
arbitrumGoerli: ARBITRUM_ETHERSCAN_API_KEY || "",
Expand All @@ -130,11 +168,11 @@ const config: HardhatUserConfig = {
network: "base-goerli",
chainId: 84531,
urls: {
apiURL: "https://api-goerli.basescan.org/api",
browserURL: "https://goerli.basescan.org"
}
}
]
apiURL: "https://api-goerli.basescan.org/api",
browserURL: "https://goerli.basescan.org",
},
},
],
},
};

Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"scripts": {
"test": "hardhat test",
"deploy:goerli": "npm run clear && hardhat run scripts/deploy-nft.ts --network goerli && hardhat run scripts/deploy-gov.ts --network goerli",
"deploy:sepolia": "npm run clear && hardhat run scripts/deploy-nft.ts --network sepolia && hardhat run scripts/deploy-gov.ts --network sepolia",
"deploy:arthera": "npm run clear && hardhat run scripts/deploy-nft.ts --network arthera-testnet && hardhat run scripts/deploy-gov.ts --network arthera-testnet",
"deploy:og": "npm run clear && hardhat run scripts/deploy-nft.ts --network optimism-goerli && hardhat run scripts/deploy-gov.ts --network optimism-goerli",
"clear": "npx hardhat run scripts/clear.ts"
Expand Down

0 comments on commit f9ac5d4

Please sign in to comment.