Implement dual-chain voting ledger, API, and gated dApp #18

Merged
PlasticDigits merged 1 commit from feat/voting-bundle into main 2026-08-25 06:47:00 +00:00
PlasticDigits commented 2026-08-25 06:41:51 +00:00 (Migrated from gitlab.com)

Summary

  • #1 + #4: voting-ledger registers Terra CW20 and BSC BEP-20 wallets from live balances (no archive node, no pre-registration backfill) and indexes transfers for the registered set only.
  • #2 + EIP-191: operator-voting verifies ADR-36 and EIP-191, freezes { terra_height, bsc_block }, enforces ≥1000 CL8Y / blacklist / one vote, and uses a restricted DB role.
  • #3 + #5 + #6: /vote dApp with Legal clickwrap (vote.cl8y.com, TerraClassic + EVM) and ported DEX Terra / Bridge EVM wallet stacks.

Closes #1 #2 #3 #4 #5 #6

Test plan

  • cargo test --workspace --lib (31 unit tests)
  • Postgres integration (LEDGER_TEST_DATABASE_URL): register → transfer → balance_at, no backfill, BSC isolation, reorg unwind
  • operator-voting API: propose / vote / replay 409 / blacklist / XSS strip
  • Restricted role: EXECUTE on balance functions, INSERT on ledger tables denied
  • Frontend vitest (35)
  • Playwright register → list → create → vote (Legal hatch on webServer only)
  • Coolify: apply migrations, restricted DATABASE_URL, unset VITE_PLAYWRIGHT_E2E
  • Legal ops: register vote.cl8y.com (confirm hostname), CORS + portal redirect allowlist
  • Manual: Keplr Terra register/vote and MetaMask BSC register/vote after Legal accept

Docs

Invariants L1–L11 in docs/LEDGER_INVARIANTS.md. API/signing in docs/OPERATOR_VOTING.md. dApp/Legal/wallets in docs/FRONTEND.md. Skills cross-linked.

## Summary - **#1 + #4:** `voting-ledger` registers Terra CW20 and BSC BEP-20 wallets from live balances (no archive node, no pre-registration backfill) and indexes transfers for the registered set only. - **#2 + EIP-191:** `operator-voting` verifies ADR-36 and EIP-191, freezes `{ terra_height, bsc_block }`, enforces ≥1000 CL8Y / blacklist / one vote, and uses a restricted DB role. - **#3 + #5 + #6:** `/vote` dApp with Legal clickwrap (`vote.cl8y.com`, TerraClassic + EVM) and ported DEX Terra / Bridge EVM wallet stacks. Closes #1 #2 #3 #4 #5 #6 ## Test plan - [x] `cargo test --workspace --lib` (31 unit tests) - [x] Postgres integration (`LEDGER_TEST_DATABASE_URL`): register → transfer → `balance_at`, no backfill, BSC isolation, reorg unwind - [x] `operator-voting` API: propose / vote / replay 409 / blacklist / XSS strip - [x] Restricted role: `EXECUTE` on balance functions, `INSERT` on ledger tables denied - [x] Frontend vitest (35) - [x] Playwright register → list → create → vote (Legal hatch on webServer only) - [ ] Coolify: apply migrations, restricted `DATABASE_URL`, unset `VITE_PLAYWRIGHT_E2E` - [ ] Legal ops: register `vote.cl8y.com` (confirm hostname), CORS + portal redirect allowlist - [ ] Manual: Keplr Terra register/vote and MetaMask BSC register/vote after Legal accept ## Docs Invariants L1–L11 in `docs/LEDGER_INVARIANTS.md`. API/signing in `docs/OPERATOR_VOTING.md`. dApp/Legal/wallets in `docs/FRONTEND.md`. Skills cross-linked.
PlasticDigits commented 2026-08-25 06:41:58 +00:00 (Migrated from gitlab.com)

mentioned in issue #1

mentioned in issue #1
PlasticDigits commented 2026-08-25 06:41:59 +00:00 (Migrated from gitlab.com)

mentioned in issue #2

mentioned in issue #2
PlasticDigits commented 2026-08-25 06:42:00 +00:00 (Migrated from gitlab.com)

mentioned in issue #3

mentioned in issue #3
PlasticDigits commented 2026-08-25 06:42:01 +00:00 (Migrated from gitlab.com)

mentioned in issue #4

mentioned in issue #4
PlasticDigits commented 2026-08-25 06:42:02 +00:00 (Migrated from gitlab.com)

mentioned in issue #5

mentioned in issue #5
PlasticDigits commented 2026-08-25 06:42:03 +00:00 (Migrated from gitlab.com)

mentioned in issue #6

mentioned in issue #6
PlasticDigits commented 2026-08-25 06:47:01 +00:00 (Migrated from gitlab.com)

mentioned in commit 8fe45a1974

mentioned in commit 8fe45a197400462abfc1724385113ea8276a028a
PlasticDigits (Migrated from gitlab.com) merged commit 8fe45a1974 into main 2026-08-25 06:47:01 +00:00
PlasticDigits commented 2026-08-25 06:47:48 +00:00 (Migrated from gitlab.com)

mentioned in issue #7

mentioned in issue #7
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
code/voting!18
No description provided.