A community pre-vote layer for the Gonka network: drafts / pledges / ratings / votes live in CosmWasm contracts, comments live in a Postgres-backed NestJS indexer, frontend is Nuxt 3 + Keplr / GG Wallet.
- No comments on-chain. Comments are an off-chain convenience. The chain stores drafts, pledges, ratings, votes, voting power.
- No IPFS. Anything verifiable lives in CosmWasm storage with hard byte caps (proposal summary <= 8 KB, otherwise external URL link).
- Manual
cosmos.gov.v1handoff is supported. After pre-vote completes, the proposer can submit the real chain governance proposal withinferenced tx gov submit-proposal. Do not add automatic submission without an explicit product/security decision. - Backend is never authoritative. Anything the UI shows that affects consensus must be re-derivable by reading contract state. Indexer = thin projection.
- Voting power = locked GNK with duration multiplier. Pure Proof-of-Skin for MVP. Miner-reputation bonus deferred to Phase 2.
- Audits required for
dao-pre-propose-gonka(it holds funds).
- Rust:
cargo fmt+cargo clippy --all-targets -- -D warningsmust be clean. - TypeScript: strict mode on,
pnpm lintmust pass. - Schemas: never hand-edit anything in
schemas/- regenerate viacargo run --example schema -p <crate>. - Indexer: never write a route that mutates chain state. The indexer reads, projects, caches, fans out notifications. That's it.
- Frontend: every page that shows chain-derived data must surface a "Verify against chain" affordance.
- Auth: SIWE-style nonce signed by wallet -> short-lived JWT. Never accept an unsigned mutation API call.
# Activate Node (nvm)
source ~/.nvm/nvm.sh && nvm use --lts
# Workspace install
pnpm install
# Run everything for local dev
docker compose up -d postgres
pnpm --filter @gonka/indexer dev # :4000
pnpm --filter @gonka/portal dev # :3000For contracts:
cd contracts
cargo build
cargo test
cargo run --example schema -p dao-pre-propose-gonka
cargo run --example schema -p dao-voting-gonka- Default to fewer features, smaller scope. The funding budget is finite.
- Default to simpler types in contracts - every byte costs gas.
- Default to on-chain truth, off-chain UX - never invert.