feat(voting): frontend registration, WYSIWYG proposals (≥1000 CL8Y), and signed voting UX #3
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Ship the dApp UX for offchain CL8Y snapshot voting: wallet registration (sign message), WYSIWYG proposal creation (requires ≥1000 CL8Y + signature), and voting — talking only to
operator-voting+ existing LCD/wallet stack. No smart contracts.Depends on:
operator-votingAPIs (signatures, proposals, votes, blacklist enforcement server-side)CL8Y: hpax3 /
VITE_CL8Y_TOKEN_ADDRESS(same asset as fee-discount tiers).Current codebase
frontend-dapp/src/services/terraclassic/wallet.ts— Keplr / Station / WC / Simulated WalletterraWalletSignTxRaw.ts,terraBroadcast.ts— Amino/Direct for txs onlyvite-env.d.tslackssignArbitrarygetTokenBalanceinqueries.ts; tiers UX on fee-discount pagesApp.tsx,components/common/navItems.ts— no voting routesdocs/design-system.md, skillsAGENTS_FRONTEND_DESIGN_SYSTEM.md,AGENTS_FRONTEND_COPY_COGNITIVE_LOAD.mdVITE_OPERATOR_VOTING_URL)Why this is needed
Operators and tokenholders need a browser flow to opt into the electorate, publish human-readable proposals, and cast signed votes weighted by registered CL8Y balances — without governance multisig or on-chain poll contracts. The UI must make registration before proposal creation obvious, show eligibility (≥1000 CL8Y to propose), and fail clearly when blacklisted or unregistered.
Constraints / guardrails
operator-voting; frontend never trusts client-side blacklist alone (server enforcesVOTING_BLACKLIST_ADDRESSES).signArbitrary(ADR-36) primary; Simulated Wallet must work on LocalTerra for QA; document Station/WC support matrix (degrade gracefully if arbitrary sign unsupported).VITE_OPERATOR_VOTING_URL, existingVITE_CL8Y_TOKEN_ADDRESS; never embed DB URLs./voteor/governance(product pick — avoid clashing with on-chain “governance” multisig docs; prefer/vote).Relevant files
frontend-dapp/src/App.tsx,components/common/Layout.tsx,navItems.ts,navItems.test.tsfrontend-dapp/src/services/terraclassic/wallet.ts,terraWalletSignTxRaw.ts,queries.ts,vite-env.d.tsfrontend-dapp/src/utils/constants.ts,tokenRegistry.tsservices/operatorVoting.ts(API client + sign payload helpers)frontend-dapp/.env*, Coolify frontend env examplesAGENTS_FRONTEND_DESIGN_SYSTEM.md,AGENTS_FRONTEND_COPY_COGNITIVE_LOAD.md,AGENTS_FRONTEND_THEME_TOGGLE.mdRecommended direction
Routes
/vote— list proposals + registration CTA/vote/new— WYSIWYG create (wallet connected, ≥1000 CL8Y gate, sign + submit)/vote/:id— render proposal, snapshot info, cast vote, show resultsRegistration
signArbitraryover canonical register payload →POST /v1/register.Proposal create
Vote
QA
operator-votingand/or full stack.Acceptance criteria
VITE_OPERATOR_VOTING_URLdocumented; Coolify frontend env updated in examples.Test plan (all paths)
operator-voting.<script>/onerror=does not execute.navItemstests; basic keyboard focus on editor/actions.Test plan — attack, hack & abuse vectors
Verification criteria
make test-frontend/ targeted vitest for new modules pass.operator-voting.Labels
frontendUXenhancementsecurityproductPriority
P1
mentioned in issue cl8y-dex-terraclassic#509
mentioned in issue cl8y-dex-terraclassic#510
Bundle links
operator-votingAPI (frontend talks only to this + LCD/wallet)Blocked by cl8y-dex-terraclassic#510 for real API; cl8y-dex-terraclassic#509 required for meaningful snapshot weights.
marked as related to cl8y-dex-terraclassic#509
marked as related to cl8y-dex-terraclassic#510
mentioned in issue cl8y-dex-terraclassic#588
marked as related to cl8y-dex-terraclassic#588
Scope add: EVM wallets on
/vote(core)A majority of CL8Y holders are on BSC, not Terra Classic. The dApp must let users connect an EVM wallet (injected EIP-1193 / WalletConnect
eip155:56) and complete register → propose (≥1000 BEP-20 CL8Y) → vote withpersonal_sign.Do not ship a Keplr-only
/voteas done. Do not break Cosmos WalletConnect mobile pairing (cl8y-dex-terraclassic#519 / cl8y-dex-terraclassic#554 / cl8y-dex-terraclassic#566). Balance reads stay on the indexer — noVITE_*BSC RPC (same hygiene as cl8y-dex-terraclassic#571).Tracking issue (BSC integration): https://gitlab.com/PlasticDigits/cl8y-dex-terraclassic/-/issues/588
/voteUXmoved from cl8y-dex-terraclassic#511
mentioned in issue #6
mentioned in issue #5
mentioned in issue #1
mentioned in issue #2
changed the description
mentioned in issue #4
Repo split + updated links (2026-08-25)
Moved from
cl8y-dex-terraclassic#511to https://gitlab.com/PlasticDigits/voting/-/issues/3Ship
/votein this repo. Two extra requirements that were not in the original write-up:operator-votingAPImentioned in issue cl8y-dex-terraclassic#511
mentioned in issue cl8y-dex-terraclassic#637
mentioned in commit
b32b56660dmentioned in merge request !18
Implemented on feat/voting-bundle. MR: https://gitlab.com/PlasticDigits/voting/-/merge_requests/1
In-tree: ledger/ (CW20 + BEP-20), operator-voting/, frontend/ (/vote + Legal + ported wallets).
Docs: docs/LEDGER_INVARIANTS.md, docs/OPERATOR_VOTING.md, docs/FRONTEND.md.
mentioned in commit
8fe45a1974mentioned in issue #7
Merge verify (!18 → main, no conflicts).
/voteroutes, WYSIWYG propose, signed vote, vitest + Playwright hatch are on main.Still open after merge (tracked in #7):
VITE_PLAYWRIGHT_E2Ein production.mentioned in issue #9
mentioned in issue #13
mentioned in issue #14