A community pre-vote portal for the Gonka network.
Click the preview to watch the demo, or go to https://gonkavote.com to test it yourself.
People can draft proposals, discuss them, pledge support, rate them, and run a pre-vote before taking anything to chain governance. The consensus-relevant state lives in CosmWasm contracts: drafts, pledges, ratings, votes, and voting power. The backend is only an indexer and a home for off-chain UX features such as comments.
After a proposal finishes voting on the platform, the proposer can start a real cosmos.gov.v1 on-chain proposal with inferenced. The portal does not auto-submit to governance yet; it gives the community result, vote record, transaction history, and a stable page to link from the real proposal.
apps/portal (Nuxt 3)
- Keplr / GG Wallet
- Feed, draft editor, pledge UI, vote UI
- Reads fast data from the indexer
- Sends signed transactions to Gonka
apps/indexer (NestJS)
- Postgres projection
- Comments and reactions
- SIWE-style auth
- Periodic chain sync
Gonka chain (CosmWasm)
- dao-voting-gonka
- dao-pre-propose-gonka
- manual cosmos.gov.v1 handoff after pre-vote
packages/sdk
- typed contract clients
- Gonka RPC wrapper
- CosmWasm pre-vote layer - a separate community voting layer before
cosmos.gov.v1. dao-voting-gonka- voting power from locked GNK, with longer locks carrying more weight.dao-pre-propose-gonka- drafts, pledges, ratings, votes, and lifecycle state in one contract.- On-chain proposal content - title, summary, body, and links are stored in contract storage with byte caps. No IPFS.
- DAO config in the UI -
min_pledge_for_pre_vote,min_rating_voting_power,max_discussion_seconds, andadminare read from the contract and shown above the feed. - Nuxt portal - feed, create proposal flow, proposal detail page, comments, activity feed, staking page, profiles, and a "How it works" page.
- Wallet support - Keplr and GG Wallet.
- On-chain actions from the UI - submit draft, pledge, rate up/down, vote yes/no, advance, cancel, finalize, lock GNK, and unlock GNK.
- CLI commands for every important action - each action can show the matching
inferencedcommand, so users can verify or repeat the action outside the web app. - Off-chain discussion - Reddit-style threaded comments and comment reactions live in Postgres.
- Indexer API - NestJS + Prisma + Postgres projection for fast reads, profiles, comments, and activity history.
- RPC failover - frontend and indexer can try multiple Gonka nodes.
- Production deployment - Docker Compose stack with
postgres,indexer,portal, andcaddyongonkavote.com.
- Drafts - title, summary/body, links, author, and status.
- Pledges - per-address GNK pledges.
- Ratings - weighted up/down rating at draft level.
- Voting power - locked GNK with duration multipliers.
- Pre-votes - yes / no / abstain votes.
- Lifecycle -
Discussion -> PreVoting -> Finalizedor canceled.
- Comments - threaded discussion and replies.
- Comment reactions - like / dislike state.
- Profiles - display data derived from indexed activity.
- Search and fast reads - indexer projection of contract state.
contracts/ # Rust / CosmWasm workspace
packages/
gonka-shared/ # Shared types, errors
dao-voting-gonka/ # Custom voting module (locked GNK)
dao-pre-propose-gonka/ # Custom pre-propose module
apps/
indexer/ # NestJS + Prisma + Postgres
portal/ # Nuxt 3 + Tailwind + Keplr / GG Wallet
packages/
sdk/ # TypeScript SDK (contract types + RPC client)
docs/ # Spec, ADRs
schemas/ # Generated JSON schemas (committed for diff)
scripts/ # Deployment / dev helpers
docker-compose.yml # Local Postgres
# 0. activate Node + pnpm (one-time per shell)
source ~/.nvm/nvm.sh && nvm use --lts
# 1. install JS deps + build the SDK (other apps depend on it via workspace:*)
pnpm install
pnpm --filter @gonka/sdk build
# 2. start local Postgres
docker compose up -d postgres
# 3. apply DB schema and start indexer (port 4000, swagger at /docs)
cp apps/indexer/.env.example apps/indexer/.env
pnpm --filter @gonka/indexer db:push
pnpm --filter @gonka/indexer dev
# 4. start portal (port 3000)
pnpm --filter @gonka/portal dev
# 5. build & test contracts
cd contracts && cargo build && cargo testThe portal is a pre-vote system. Once the platform vote is completed, the proposer can use the result as the public signal and start a real Gonka governance proposal through cosmos.gov.v1.
Recommended flow:
- Open the finalized proposal page on
gonkavote.com. - Check the final tally, pledges, and activity feed.
- Copy the portal URL and relevant transaction hashes.
- Prepare a
proposal.jsonfor chain governance. Put the portal URL inmetadataor in the summary so validators can review the discussion and pre-vote result. - Submit the proposal with
inferenced tx gov submit-proposal.
Example proposal.json shape:
{
"messages": [
{
"@type": "/cosmos.params.v1beta1.MsgUpdateParams",
"authority": "<gov-module-authority>",
"subspace": "<module>",
"key": "<param>",
"value": "<value>"
}
],
"metadata": "https://gonkavote.com/proposals/<id>",
"deposit": "100000000000ngonka",
"title": "<proposal title>",
"summary": "This proposal passed community pre-vote on Gonka Governance Portal: https://gonkavote.com/proposals/<id>"
}Submit it:
inferenced tx gov submit-proposal proposal.json \
--from <your-key> \
--keyring-backend file \
--chain-id gonka-mainnet \
--gas auto \
--gas-adjustment 1.3 \
--node https://gonka.gg/chain-rpc/ \
-yNotes:
- The
messagesarray must contain the real governance message for the change you want. The example above is only a template. depositmust satisfy the current chain governance minimum deposit.- The portal does not submit this transaction automatically yet. The proposer keeps control of the final governance submission.
pnpm -r typecheck # SDK + indexer + portal all clean
pnpm -r build # full build of all JS workspaces
cd contracts && cargo check --workspace && cargo testMainnet RPC: https://rpc.gonka.gg (managed; provide X-Api-Key).
Chain ID: gonka-mainnet. SDK ~0.50, CometBFT 0.38, wasmd 0.5x - fully DAO DAO v2 compatible.
- Automatic governance handoff - after a successful platform pre-vote, build a guarded flow that prepares and submits the
cosmos.gov.v1proposal from the portal. - Pledge rules - add optional slashing or lock rules for abusive cancellations or spam.
- More voting models - quadratic voting, conviction voting, or separate rules for different proposal types.
- Delegation - let users lock GNK but delegate pre-vote power to another address.
- Contract migrations - add explicit
MigrateMsgversioning and migration smoke tests before every contract upgrade. - Better contract events - emit richer events for every state change so the indexer can sync with less polling.
- Notifications - Discord, Telegram, email, or web push for new proposals and vote deadlines.
- Search and filters - full-text search over proposals and comments, plus categories and tags.
- Analytics - charts for turnout, voting power, pledges over time, and voter activity.
- Audit and hardening - formal review of fund-holding contracts before adding automatic governance handoff.
Apache-2.0
