Skip to content

fix(governance): resolve test setup and type errors#191

Merged
mijinummi merged 1 commit into
MD-Creative-Production:mainfrom
coderDom-x:feat/147-governance-proposal-tracking
Jun 22, 2026
Merged

fix(governance): resolve test setup and type errors#191
mijinummi merged 1 commit into
MD-Creative-Production:mainfrom
coderDom-x:feat/147-governance-proposal-tracking

Conversation

@coderDom-x

Copy link
Copy Markdown
Contributor

Summary
Implements governance proposal tracking as scoped in #147.

Changes

  • `ProposalDetector` — ethers.js listener for `ProposalCreated`, `ProposalCanceled`, `ProposalQueued`, `ProposalExecuted`, `VoteCast`
  • `ProposalRepository` — upsert proposals, persist events (idempotent), search by state/proposer/block/date
  • `ProposalTracker` — orchestrates backfill from last indexed block, live subscriptions, and periodic state polling for block-number-driven transitions
  • `ProposalEntity` / `ProposalEventEntity` — TypeORM tables with appropriate indexes
  • Unit tests covering insert, dedup, backfill, and live event handling

Acceptance Criteria

  • Proposals tracked (live + historical backfill)
  • Metadata stored (votes, state, lifecycle timestamps, calldata)
  • Events searchable (by type, block range, date range, proposalId
    closes Track Governance Proposal Activity #147

- Add injectable ProposalDetector to ProposalTracker constructor (ethers v6 compat)
- Fix bigint cast via unknown intermediary in ProposalDetector
- Add @types/jest + ts-jest, configure jest preset in package.json
- Add jest to tsconfig types, enable decorator flags
- Add Logger stub at src/utils/logger.ts
- All 11 governance proposal tests passing
@mijinummi mijinummi merged commit b6906ab into MD-Creative-Production:main Jun 22, 2026
11 checks passed
@grantfox-oss grantfox-oss Bot mentioned this pull request Jun 22, 2026
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Track Governance Proposal Activity

2 participants