Skip to content

Commit 5278539

Browse files
committed
chore(general): main components used for maciVoting
1 parent d6ec7c8 commit 5278539

File tree

103 files changed

+5133
-2614
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+5133
-2614
lines changed

β€Ž.env.example

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,39 @@
11
# PUBLIC ENV VARS
22

33
# General
4-
NEXT_PUBLIC_DAO_ADDRESS=0xd9A924bF3FaE756417b9B9DCC94C24681534b8F7
4+
NEXT_PUBLIC_DAO_ADDRESS="0x9B92805eE0ABF2DdFC8E0d684c6524D1Bf6ea81C"
55
NEXT_PUBLIC_TOKEN_ADDRESS=0x9A3218197C77F54BB2510FBBcc7Da3A4D2bE0DeE
66

7-
# Plugin addresses
7+
# MACI voting
8+
NEXT_PUBLIC_MACI_VOTING_PLUGIN_ADDRESS="0x316516EdA7eacff4EA91fec99742d5D4360414e9"
9+
NEXT_PUBLIC_MACI_ADDRESS="0x0523879d6697BDe8AEe5b3abAc9C4193bDdd6882"
10+
NEXT_PUBLIC_MACI_DEPLOYMENT_BLOCK="0"
11+
NEXT_PUBLIC_SECONDS_PER_BLOCK="1"
812

9-
# Network and services
10-
NEXT_PUBLIC_CHAIN_NAME=sepolia
11-
NEXT_PUBLIC_WEB3_URL_PREFIX=https://eth-sepolia.g.alchemy.com/v2/
1213

13-
NEXT_PUBLIC_ALCHEMY_API_KEY="ALCHEMY KEY"
14-
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID="YOUR WALLET CONNECT PROJECT ID"
14+
# Network and services
15+
NEXT_PUBLIC_CHAIN_NAME="arbitrumSepolia"
16+
NEXT_PUBLIC_WEB3_URL_PREFIX="https://arb-sepolia.g.alchemy.com/v2/"
17+
NEXT_PUBLIC_WEB3_URL_PREFIX_L2="https://arb-sepolia.g.alchemy.com/v2/"
18+
# This is used for Arbitrum block.number
19+
# https://docs.arbitrum.io/build-decentralized-apps/arbitrum-vs-ethereum/block-numbers-and-time
20+
NEXT_PUBLIC_WEB3_URL_PREFIX_MAINNET="https://eth-sepolia.g.alchemy.com/v2/"
21+
22+
NEXT_PUBLIC_ALCHEMY_API_KEY="<YOUR_API_KEY>"
23+
NEXT_PUBLIC_WALLET_CONNECT_PROJECT_ID="<YOUR_API_KEY>"
24+
NEXT_PUBLIC_IPFS_ENDPOINT="<YOUR_API_URL>"
25+
NEXT_PUBLIC_IPFS_API_KEY="<YOUR_API_KEY>"
1526

1627
NEXT_PUBLIC_IPFS_ENDPOINTS="https://domain1/api,https://domain2/api/v0"
17-
NEXT_PUBLIC_PINATA_JWT="..."
28+
NEXT_PUBLIC_PINATA_JWT="<YOUR_API_KEY>"
1829

19-
NEXT_PUBLIC_ETHERSCAN_API_KEY="OPTIONAL: ETHERSCAN API"
30+
NEXT_PUBLIC_ETHERSCAN_API_KEY="<YOUR_API_KEY>"
2031

2132
# PRIVATE (deployment scripts)
22-
DEPLOYMENT_TARGET_CHAIN_ID=sepolia
23-
DEPLOYMENT_WALLET_PRIVATE_KEY="0x..."
24-
DEPLOYMENT_ALCHEMY_API_KEY="..."
25-
DEPLOYMENT_WEB3_ENDPOINT="https://..."
33+
# DEPLOYMENT_TARGET_CHAIN_ID="arbitrumSepolia"
34+
# DEPLOYMENT_WALLET_PRIVATE_KEY="<YOUR_PRIVATE_KEY>"
35+
# DEPLOYMENT_ALCHEMY_API_KEY="<YOUR_API_KEY>"
36+
# DEPLOYMENT_WEB3_ENDPOINT="https://arb-sepolia.g.alchemy.com/v2/"
2637

2738
DEPLOYMENT_IPFS_ENDPOINT="https://..."
28-
DEPLOYMENT_IPFS_API_KEY="..."
39+
DEPLOYMENT_IPFS_API_KEY="..."

β€Ž.eslintrc.cjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@ module.exports = {
1818
"@typescript-eslint/no-explicit-any": "off",
1919
"@typescript-eslint/no-unused-vars": ["warn", { ignoreRestSiblings: true }],
2020
"@typescript-eslint/prefer-nullish-coalescing": "warn",
21-
"@typescript-eslint/no-duplicate-enum-values": "off",
22-
"@typescript-eslint/no-require-imports": "warn",
2321
},
2422
root: true,
2523
};

β€Ž.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ yarn-error.log*
3737
next-env.d.ts
3838

3939
# editor
40-
.vscode
40+
.vscode

β€ŽREADME.md

Lines changed: 19 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,16 @@
1-
# Governance App Template
1+
# Aragonette πŸš€
22

3-
## Overview
3+
Welcome to **Aragonette**, the sleek and snappy UI template designed for lightning-fast prototyping with Aragon DAOs and plugins! Built with the power of Next.js and the speed of Bun.js, Aragonette is your go-to toolkit for bringing your Aragon DAO visions to life with style and efficiency. 🎨✨
44

5-
This project is a versatile host UI including common tools, services and a set of example modules to build custom DAO apps. The following example plugin UI's are available:
5+
## Getting Started 🏁
66

7-
### Proposal section
8-
9-
This section displays all the proposals which need to be ratified by the community of token holders. Proposals follow an optimistic governance flow. They created by the Council and token holders have the chance to veto them for a certain amount of time.
10-
11-
This flow attempts to find a good balance between efficiency, agility, prevent spam or attacks and decentralization.
12-
13-
### Multisig Council
14-
15-
This section features a multisig plugin which is only visible to the Council members. It allows to create, approve and eventually relay proposals to the community section described above.
16-
17-
### Security Council
18-
19-
This section is also a multisig plugin, with the difference that a super majority of the Security Council can approve and execute proposals that are time critical. This plugin may be disabled in future iterations of the DAO but for the time being, it allows respond to potential security threats in a much quicker way.
20-
21-
The metadata and the actions of the proposal are encrypted until the proposal has been executed. See [Encryption and decryption flows](#encryption-and-decryption-flows) below.
22-
23-
### Members section
24-
25-
This section shows a recap of the delegates who publish an announcement, as well as the Security Council members. Delegates can use this section to create their own profile while token holders can browse delegates and can eventually delegate to a candidate of their trust.
26-
27-
## Encryption and decryption flows
28-
29-
In proposals where metadata needs to be kept private until the end, we implement a two-layer encryption model which combines symmetric and asymmetric keys.
30-
31-
The data that we need to encrypt includes:
32-
- **Human readable data**, explaining why the proposal should be approved
33-
- The **actions to execute** if the proposal passes
34-
35-
### Encryption steps
36-
37-
1. A user signs a static payload using his/her wallet. The resulting hash is used as a 256-bit private key to generate an ephemeral, in-memory key pair
38-
2. One of the multisig members generates a random symmetric key and uses it to encrypt the metadata and the actions
39-
3. The member fetches the public keys corresponding to the current Security Council members
40-
4. For each member's public key, he uses it to encrypt the key from step (1)
41-
5. This generates a payload with:
42-
- The (symmetrically) encrypted metadata and proposals
43-
- The (asymmetrically) encrypted keys that only each member can recover
44-
6. The payload is pinned on IPFS
45-
- The IPFS URI is published as the proposal metadata
46-
- The hash of the unencrypted metadata is also published as part of the proposal
47-
48-
![](./readme-encryption-flow.png)
49-
50-
### Encryption steps
51-
52-
1. One of the multisig members fetches the proposal, along with the pinned IPFS metadata
53-
2. The member signs the same predefined payload to generate the in-memory key pair
54-
3. The user locates the key that was encrypted for his/her wallet
55-
4. He then uses it as the symmetric key to decrypt the metadata and the proposal actions
56-
57-
![](./readme-decryption-flow.png)
58-
59-
## Getting Started with the UI
60-
61-
Before you start, make sure you have Bun installed on your machine. If not, hop over to [Bun's official documentation](https://bun.sh/) for installation instructions.
7+
Before you dive into the world of DAOs and decentralized governance, make sure you have Bun installed on your machine. If not, hop over to [Bun's official documentation](https://bun.sh/) for installation instructions.
628

639
Once you're set with Bun, clone this repository to your local machine:
6410

6511
```bash
66-
git clone https://github.com/aragon/gov-app-template.git
67-
cd gov-app-template
12+
git clone https://github.com/your-repo/aragonette.git
13+
cd aragonette
6814
```
6915

7016
To get the development server running, simply execute:
@@ -74,35 +20,41 @@ bun install
7420
bun dev
7521
```
7622

23+
And voilà! You're now in the fast lane to DAO prototyping. 🌟
24+
7725
## Adding Your Plugin 🧩
7826

79-
Got a plugin idea that's going to revolutionize the Aragon ecosystem? Adding it to the Governance App Template is easy:
27+
Got a plugin idea that's going to revolutionize the Aragon ecosystem? Adding it to Aragonette is as easy as pie:
8028

8129
1. **Duplicate a Plugin Directory**: Navigate to the `/plugins` directory, pick a plugin that closely resembles your idea, and duplicate its directory.
8230
2. **Rename Your Plugin**: Give your plugin a unique and catchy name that captures its essence.
8331
3. **Register Your Plugin**: Open the `index.tsx` file inside the `/plugins` directory and add an entry for your new plugin.
8432

85-
And that's it!
33+
And that's it! Your plugin is now part of the Aragonette universe. 🌌
8634

8735
## Leveraging Aragon OSx Primitives πŸ› 
8836

89-
Governance App Template is built to work seamlessly with Aragon OSx primitives, such as `IProposal` or `MajorityVoting`. This means you can focus on the fun part of creating and experimenting, without sweating the small stuff. Your plugin should integrate smoothly into the UI, making your development journey as breezy as a blockchain. πŸ˜‰
37+
Aragonette is built to work seamlessly with Aragon OSx primitives, such as `IProposal` or `MajorityVoting`. This means you can focus on the fun part of creating and experimenting, without sweating the small stuff. Your plugin should integrate smoothly into the UI, making your development journey as breezy as a blockchain. πŸ˜‰
9038

9139
## Contributing 🀝
9240

93-
Got ideas on how to make this template even better? We're all ears! Whether it's a bug fix, a new feature, or a plugin that could benefit everyone, we welcome your contributions. Check out our [contributing guidelines](CONTRIBUTING.md) for more information on how to get involved.
41+
Got ideas on how to make Aragonette even better? We're all ears! Whether it's a bug fix, a new feature, or a plugin that could benefit everyone, we welcome your contributions. Check out our [contributing guidelines](CONTRIBUTING.md) for more information on how to get involved.
9442

9543
### You can configure your repository to pull changes from this repository with:
9644

9745
```bash
98-
git remote add upstream git@github.com:aragon/gov-app-template.git
46+
git remote add upstream git@github.com:aragon/aragonette.git
9947
git remote set-url --push upstream DISABLE
10048
```
10149

10250
## Need Help? πŸ†˜
10351

104-
Stuck on something? Our community is here to help! Join our [Discord channel](https://discord.gg/aragonorg) for support, advice, or just to share your awesome plugin creations with fellow Aragon enthusiasts.
52+
Stuck on something? Our community is here to help! Join our [Discord channel](https://discord.com/invite/eqQJkdp) for support, advice, or just to share your awesome plugin creations with fellow Aragon enthusiasts.
10553

10654
## License πŸ“œ
10755

108-
The Governance App Template is released under the AGPL v3 License.
56+
Aragonette is released under the AGPL v3 License.
57+
58+
---
59+
60+
Happy prototyping! With Aragonette, the future of decentralized organizations is in your hands. Let's build something amazing together! πŸš€πŸŒˆ

0 commit comments

Comments
Β (0)