Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Atom staking portal DO NOT MERGE #143

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions .env.dev

This file was deleted.

7 changes: 0 additions & 7 deletions .env.prod

This file was deleted.

1 change: 1 addition & 0 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ module.exports = {
"prettier/prettier": "error",
"vue/multi-word-component-names": 0,
"no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-unused-vars": [
"error", // or "error"
{
Expand Down
76 changes: 0 additions & 76 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,76 +0,0 @@
# GovGen Governance dApp

GovGen governance dApp is a platform facilitating web-based access to GovGen governance where users can seamlessly engage with proposals, view proposal statistics, participate in discussions as well as perform transactions to vote or deposit on proposals. Prioritizing security, GovGen encourages the use of CLI commands for interactions with the dApp, using your wallet of choice or a public address you can gain immediate access to GovGen's governance functionalities.

Our goal with the GovGen governance dApp is to empower the community to effortlessly participate in these types of processes by gauging community sentiment in regards to the potential outcome of AtomOne while making it more accessible to engage, regardless of their technical expertise or background.

## Usage

You can visit the deployed dApp at [https://app.govgen.io/](https://app.govgen.io/) for mainnet or [https://staging.govgen.dev/](https://staging.govgen.dev/) for devnet.

The following is a showcase of the existing functionality.

### Homepage

The home page provides a paged view of all existing governance proposals. It shows 16 proposals per page and you can navigate across pages using the navigation arrows at the bottom right.

The default ordering is to show active proposals first (i.e. those in `VOTING` or `DEPOSIT` state) but you can use the dropdown control to switch to `PASSED` first, `REJECTED` first or `FAILED` first.

There is also a dropdown control to filter by proposal status altogether as well as a search box to search proposals based on `Title` and `Description` content.

In all the pages, there is a button at the top that allows you to connect your address in order to display balances or voting history as well as enable governance-related transactions. There are 2 possible options:
- You can either simply supply your public govgen address with which the dApp can generate the appropriate CLI commands for voting and depositing txs signable by an offline computer as described [here](https://github.com/atomone-hub/govgen-proposals/blob/main/submit-tx-securely.md). **RECOMMENDED**
- Or you can simply connect your Keplr/Leap/Cosmostation wallets and authorize and submit TXs through their familiar interface.

### Proposal page

The page for a specific proposal (URL format: `https://app.govgen.io/proposals/XXX` or `https://staging.govgen.dev/proposals/XXX` for mainnet and devnet respectively, where XXX is the id of the proposal) provides a view of all the proposal's details in a tabbed interface.

There is a hero component that includes the title, status, turnout, necessary quorum, expected result, and current vote tallies. It also consists of a call-to-action to Vote or Deposit (depending on the proposal status).

Under the hero component, you will find the following tabs:

- **Description** (default): Contains the proposal description (also renders markdown)
- **Info**: Contains the general proposal information such as proposer address, submission time, initial and total deposit, voting start time/end time and deposit end time (if appropriate) along with the messages contained in the proposal.
- **Voters**: Contains an in-depth analysis of how all accounts have voted and how validators have voted including a complete breakdown of unique votes.
- **Discussions**: Links to the discussion forums at [Commonwealth](https://commonwealth.im/govgen).
- WIP - Conversations will be integrated directly into the application as soon as Commonwealth API is available.
- **Links**: Contains useful/helpful links provided by the community that add information and context relevant to the proposal. Links to the discussion forums at [Commonwealth](https://commonwealth.im/govgen). Soon, you will be able to add helpful links to the conversation directly from the Govgen dApp through integration with the Commonwealth API.

### Deposit popup

It allows you to add to a proposal's deposit to help push it into the voting period. Once you choose the amount you want to deposit you can either generate the CLI command required to create and then sign the TX using the CLI or use your connected wallet to authorize and broadcast.

### Voting popup

Gives you the ability to vote on a proposal either with a single vote (YES/NO/NO WITH VETO/ABSTAIN) or a weighted vote with the weights you require for those 4 options. Like the deposit popup, you can then either generate the CLI command required to create and then sign the TX using the CLI or use your connected wallet to authorize and broadcast.

## Local deployment

If you don't want to use the deployed version, you can deploy it locally. The only requirements are `node` v18+ and `pnpm`.

First, clone the repo using your favorite git tool.

Then install all packages in the repository:

```
pnpm i
```

Then copy the `.env.prod` or `.env.dev` file to `.env` depending on whether you want to deploy for mainnet or devnet respectively.

```
cp .env.dev .env
```

Finally, spin up a local instance using:

```
pnpm dev
```

## Bugs & Feedback

Please use [Github Issues](https://github.com/allinbits/govgen-governance-dapp/issues) to inform us of any bugs or issues you encounter and to request features and improvements.

Thank you.
27 changes: 1 addition & 26 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,9 @@
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>GovGen Governance</title>

<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png" />
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png" />
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png" />
<link rel="manifest" href="/site.webmanifest" />
<link rel="mask-icon" href="/safari-pinned-tab.svg" color="#1c1c1c" />
<title>AtomOne Staking</title>
<meta name="msapplication-TileColor" content="#000000" />
<meta name="theme-color" content="#000000" />

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@_govgen" />
<meta name="twitter:title" content="GovGen Governance" />
<meta property="og:site_name" content="govgen" />
<meta
property="og:title"
content="GovGen Governance - a simple interface, that seamlessly integrates with your existing wallets to allow you to interact with GovGen in a secure and efficient manner."
/>
<meta
property="og:description"
content="GovGen Governance - a simple interface, that seamlessly integrates with your existing wallets to allow you to interact with GovGen in a secure and efficient manner."
/>
<meta property="og:type" content="website" />
<meta property="og:url" content="https://app.govgen.io/" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

<meta property="og:image" content="https://app.govgen.io/OG.png" />
</head>
<body>
<div id="app"></div>
Expand Down
55 changes: 0 additions & 55 deletions netlify.toml

This file was deleted.

42 changes: 9 additions & 33 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "govgen-governance",
"name": "atomone-staking",
"private": true,
"version": "0.0.0",
"type": "module",
Expand All @@ -19,46 +19,25 @@
"test:coverage": "vitest run --coverage"
},
"dependencies": {
"@agoose77/markdown-it-mermaid": "^1.1.0",
"@apollo/client": "^3.9.5",
"@cosmjs/proto-signing": "^0.32.2",
"@cosmjs/stargate": "^0.32.2",
"@cosmostation/cosmos-client": "^0.0.5",
"@giscus/vue": "^2.4.0",
"@graphql-typed-document-node/core": "^3.2.0",
"@keplr-wallet/types": "^0.12.69",
"@tailwindcss/typography": "^0.5.12",
"@tanstack/vue-query": "^5.59.13",
"@vitest/coverage-istanbul": "^1.2.2",
"@vue/apollo-composable": "^4.0.1",
"@vueuse/core": "^10.8.0",
"@wdns/vue-code-block": "^2.3.2",
"chart.js": "^4.4.2",
"chartjs-chart-treemap": "^2.3.0",
"cosmjs-types": "^0.9.0",
"dayjs": "^1.11.10",
"dompurify": "^3.1.4",
"graphql": "^16.8.1",
"graphql-tag": "^2.12.6",
"markdown-it": "^14.1.0",
"markdown-it-github-alert": "^1.0.6",
"mitt": "^3.0.1",
"vite-plugin-node-polyfills": "^0.22.0",
"vue": "^3.4.15",
"vue-chartjs": "^5.3.0",
"vue-i18n": "9",
"vue-i18n": "^10.0.4",
"vue-router": "^4.2.5"
},
"devDependencies": {
"@atomone/govgen-types-amino": "^0.2.5",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/typescript": "^4.0.6",
"@graphql-codegen/typescript-operations": "^4.2.0",
"@graphql-codegen/typescript-vue-apollo": "^4.1.1",
"@atomone/atomone-types": "^1.0.0",
"@cosmjs/stargate": "^0.32.4",
"@cosmjs/tendermint-rpc": "^0.32.4",
"@keplr-wallet/types": "^0.12.139",
"@playwright/experimental-ct-vue": "1.44.0-alpha-2024-04-05",
"@playwright/test": "1.44.0-alpha-2024-04-05",
"@rollup/plugin-graphql": "^2.0.4",
"@types/dompurify": "^3.0.5",
"@types/markdown-it": "^13.0.7",
"@types/node": "^20.11.16",
"@typescript-eslint/eslint-plugin": "^6.20.0",
"@typescript-eslint/parser": "^6.20.0",
Expand All @@ -76,6 +55,7 @@
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-vue": "^9.21.1",
"happy-dom": "^14.4.0",
"mitt": "^3.0.1",
"mobx": "^6.12.0",
"mobx-vue-lite": "^0.4.2",
"postcss": "^8.4.33",
Expand All @@ -86,11 +66,7 @@
"typescript": "^5.3.3",
"vite": "^5.2.8",
"vitest": "^1.2.2",
"vue": "^3.5.12",
"vue-tsc": "^2.0.22"
},
"pnpm": {
"overrides": {
"dompurify": "^3.1.4"
}
}
}
12 changes: 0 additions & 12 deletions playwright/index.html

This file was deleted.

20 changes: 0 additions & 20 deletions playwright/index.ts

This file was deleted.

Loading
Loading