Skip to content

Commit

Permalink
Update deps (#144)
Browse files Browse the repository at this point in the history
update deps
  • Loading branch information
julienbrg authored Nov 24, 2024
1 parent 853f49a commit c1bcc69
Show file tree
Hide file tree
Showing 22 changed files with 10,308 additions and 1,248 deletions.
15 changes: 14 additions & 1 deletion .env.template
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Optimism Mainnet
OPTIMISM_MAINNET_RPC_ENDPOINT_URL="https://mainnet.optimism.io"
OPTIMISM_MAINNET_PRIVATE_KEY="88888"
OP_ETHERSCAN_API_KEY="88888"

# Base Mainnet
BASE_MAINNET_RPC_ENDPOINT_URL="https://mainnet.base.org"
BASE_MAINNET_PRIVATE_KEY="88888"
BASE_ETHERSCAN_API_KEY="88888"

# Sepolia
SEPOLIA_RPC_ENDPOINT_URL="https://ethereum-sepolia.publicnode.com"
SEPOLIA_PRIVATE_KEY="88888"
Expand All @@ -6,4 +16,7 @@ ETHERSCAN_API_KEY="88888"
# OP Sepolia
OP_SEPOLIA_RPC_ENDPOINT_URL="https://sepolia.optimism.io"
OP_SEPOLIA_PRIVATE_KEY="88888"
OP_ETHERSCAN_API_KEY="88888"

# Base Sepolia
BASE_SEPOLIA_RPC_ENDPOINT_URL="https://sepolia.base.org"
BASE_SEPOLIA_PRIVATE_KEY="88888"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Tests
name: Node.js CI

on:
push:
Expand Down Expand Up @@ -48,6 +48,3 @@ jobs:

- name: Check code formatting with Prettier
run: pnpm run prettier-check

- name: Run tests
run: pnpm test
27 changes: 21 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,13 @@ Since `v0.10.0`, Gov is using non-tranferable membership NFTs ("SBTs"), it is al

## Motivation

Provide a coordination tool that fits the needs of everyday people. Orgs, federations of orgs, activists, neighborhoods, stewards of the commons, collectives, and other communities are invited to [deploy their own DAO](https://w3hc.github.io/gov-docs/deployment.html).
Provide a coordination tool that fits the needs of regular users.

- [Documentation](https://w3hc.github.io/gov-docs/)
- [Gov UI](https://gov-ui.netlify.app/)
- [Gov UI repo](https://github.com/w3hc/gov-ui)
- [Gov Deployer](https://gov-deployer.netlify.app/)
- [Gov Deployer repo](https://github.com/w3hc/gov-deployer)
- [Example DAO on Tally](https://www.tally.xyz/gov/web3-hackers-collective)

## Install
Expand Down Expand Up @@ -63,12 +66,24 @@ The following functions are `onlyOwner`, and since the NFT contract ownership is
- `govBurn()` bans a member.
- `setMetadata()` changes the tokenURI of a given NFT ID.

## Versions
## Supported Networks

- Node [v20.9.0](https://nodejs.org/uk/blog/release/v20.9.0/)
- pnpm [v9.12.2](https://pnpm.io/)
- OpenZeppelin Contracts [v5.0.1](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.0.1)
| Network | Chain ID | Documentation |
|---------|----------|---------------|
| Optimism Mainnet | 10 | [Documentation](https://docs.optimism.io/chain/networks#op-mainnet) |
| Base Mainnet | 8453 | [Documentation](https://docs.base.org/docs/network-information#base-mainnet) |
| Sepolia Testnet | 11155111 | [Documentation](https://ethereum.org/nb/developers/docs/networks/#sepolia) |
| OP Sepolia Testnet | 11155420 | [Documentation](https://docs.optimism.io/chain/networks#op-sepolia) |
| Base Sepolia Testnet | 84532 | [Documentation](https://docs.base.org/docs/network-information/#base-testnet-sepolia) |

## Core Dependencies

- Node [v20.9.0](https://nodejs.org/uk/blog/release/v20.9.0/)
- PNPM [v9.10.0](https://pnpm.io/pnpm-vs-npm)
- Hardhat [v2.22.16](https://github.com/NomicFoundation/hardhat/releases/)
- OpenZeppelin Contracts [v5.1.0](https://github.com/OpenZeppelin/openzeppelin-contracts/releases/tag/v5.1.0)
- Ethers [v6.13.4](https://docs.ethers.org/v6/)

## Support

You can contact me via [Element](https://matrix.to/#/@julienbrg:matrix.org), [Telegram](https://t.me/julienbrg), [Twitter](https://twitter.com/julienbrg), [Discord](https://discord.com/invite/uSxzJp3J76), or [LinkedIn](https://www.linkedin.com/in/julienberanger/).
Feel free to reach out to [Julien](https://github.com/julienbrg): [Farcaster](https://warpcast.com/julien-), [Element](https://matrix.to/#/@julienbrg:matrix.org), [Status](https://status.app/u/iwSACggKBkp1bGllbgM=#zQ3shmh1sbvE6qrGotuyNQB22XU5jTrZ2HFC8bA56d5kTS2fy), [Telegram](https://t.me/julienbrg), [Twitter](https://twitter.com/julienbrg), [Discord](https://discordapp.com/users/julienbrg), or [LinkedIn](https://www.linkedin.com/in/julienberanger/).
4 changes: 2 additions & 2 deletions dao.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const symbol = "MEMBER"
export const manifesto =
"https://bafkreifnnreoxxgkhty7v2w3qwiie6cfxpv3vcco2xldekfvbiem3nm6dm.ipfs.w3s.link/"
export const daoName = "Test DAO"
export const votingDelay = 1
export const votingPeriod = 300
export const votingDelay = 0
export const votingPeriod = 400
export const votingThreshold = 1
export const quorum = 20
170 changes: 169 additions & 1 deletion deploy/deploy-gov.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,118 @@ export default async ({ getNamedAccounts, deployments }: any) => {
})

switch (hre.network.name) {
case "optimism":
try {
console.log(
"NFT contract deployed:",
msg(nft.receipt.contractAddress)
)
console.log("\nEtherscan verification in progress...")
console.log(
"\nWaiting for 6 block confirmations (you can skip this part)"
)
await wait(30 * 1000)
await hre.run("verify:verify", {
network: network.name,
address: nft.receipt.contractAddress,
constructorArguments: [
deployer,
firstMembers,
uri,
name,
symbol
]
})
console.log("NFT contract verification done. ✅")
} catch (error) {
console.error(error)
}

try {
console.log(
"DAO contract deployed:",
msg(gov.receipt.contractAddress)
)
console.log("\nEtherscan verification in progress...")
console.log(
"\nWaiting for 6 block confirmations (you can skip this part)"
)
await hre.run("verify:verify", {
network: network.name,
address: gov.receipt.contractAddress,
constructorArguments: [
nft.address,
manifesto,
daoName,
votingDelay,
votingPeriod,
votingThreshold,
quorum
]
})
console.log("DAO contract verification done. ✅")
} catch (error) {
console.error(error)
}

break

case "base":
try {
console.log(
"NFT contract deployed:",
msg(nft.receipt.contractAddress)
)
console.log("\nEtherscan verification in progress...")
console.log(
"\nWaiting for 6 block confirmations (you can skip this part)"
)
await wait(30 * 1000)
await hre.run("verify:verify", {
network: network.name,
address: nft.receipt.contractAddress,
constructorArguments: [
deployer,
firstMembers,
uri,
name,
symbol
]
})
console.log("NFT contract verification done. ✅")
} catch (error) {
console.error(error)
}

try {
console.log(
"DAO contract deployed:",
msg(gov.receipt.contractAddress)
)
console.log("\nEtherscan verification in progress...")
console.log(
"\nWaiting for 6 block confirmations (you can skip this part)"
)
await hre.run("verify:verify", {
network: network.name,
address: gov.receipt.contractAddress,
constructorArguments: [
nft.address,
manifesto,
daoName,
votingDelay,
votingPeriod,
votingThreshold,
quorum
]
})
console.log("DAO contract verification done. ✅")
} catch (error) {
console.error(error)
}

break

case "sepolia":
try {
console.log(
Expand Down Expand Up @@ -116,7 +228,63 @@ export default async ({ getNamedAccounts, deployments }: any) => {
console.log(
"\nWaiting for 6 block confirmations (you can skip this part)"
)
await wait(90 * 1000)
await wait(30 * 1000)
await hre.run("verify:verify", {
network: network.name,
address: nft.receipt.contractAddress,
constructorArguments: [
deployer,
firstMembers,
uri,
name,
symbol
]
})
console.log("NFT contract verification done. ✅")
} catch (error) {
console.error(error)
}

try {
console.log(
"DAO contract deployed:",
msg(gov.receipt.contractAddress)
)
console.log("\nEtherscan verification in progress...")
console.log(
"\nWaiting for 6 block confirmations (you can skip this part)"
)
await hre.run("verify:verify", {
network: network.name,
address: gov.receipt.contractAddress,
constructorArguments: [
nft.address,
manifesto,
daoName,
votingDelay,
votingPeriod,
votingThreshold,
quorum
]
})
console.log("DAO contract verification done. ✅")
} catch (error) {
console.error(error)
}

break

case "base-sepolia":
try {
console.log(
"NFT contract deployed:",
msg(nft.receipt.contractAddress)
)
console.log("\nEtherscan verification in progress...")
console.log(
"\nWaiting for 6 block confirmations (you can skip this part)"
)
await wait(30 * 1000)
await hre.run("verify:verify", {
network: network.name,
address: nft.receipt.contractAddress,
Expand Down
1 change: 1 addition & 0 deletions deployments/base-sepolia/.chainId
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
84532
Loading

0 comments on commit c1bcc69

Please sign in to comment.