Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds: enum sync step, custom ProposalCreated handler (timestamp-based), getProposalStatus() override requirement, delegation tokenId clarification, NonCirculatingAddresses classification, reason field handling, wiring steps Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Some Tornado Cash proposals use JSON format {"title":"...","description":"..."}
instead of markdown. Try JSON.parse first before falling back to markdown parsing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 21447d37c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| this.cache.votingPeriod = (await this.readContract({ | ||
| abi: this.abi, | ||
| address: this.address, | ||
| functionName: "VOTING_PERIOD", | ||
| })) as bigint; |
There was a problem hiding this comment.
Return Torn voting windows in block units
TORNClient.getVotingPeriod()/getVotingDelay() currently return second-based governor constants directly, but ProposalsActivityService treats these values as blocks and multiplies them by blockTime (apps/api/src/services/proposals-activity/index.ts, lines 123-127). For TORN this inflates the activity window by ~12x on mainnet, so the proposals-activity endpoint includes stale proposals and computes incorrect vote-timing analytics. Convert these values to block units (or add a seconds-aware path) before exposing them through the DAO client contract.
Useful? React with 👍 / 👎.
| description, | ||
| timestamp: event.block.timestamp, | ||
| logIndex: event.log.logIndex, | ||
| status: ProposalStatus.ACTIVE, |
There was a problem hiding this comment.
Persist Torn proposals as PENDING at creation
New Torn proposals are inserted with status: ACTIVE immediately, even though this governor has a non-zero voting delay and TORNClient.getProposalStatus() can return PENDING before start time. Because proposal listing first filters by stored DB status, requests for pending proposals will miss Torn proposals during their pre-vote window. Store the initial status as PENDING (or persist start-time metadata and adjust DB status mapping) so status-filtered queries remain correct.
Useful? React with 👍 / 👎.
|
🚅 Deployed to the anticapture-pr-1783 environment in anticapture-infra
30 services not affected by this PR
|
…te key crashes Replace shared voteCast() with custom handler that uses onConflictDoUpdate on votes_onchain insert. Ponder's batch flushing can cause duplicate key violations with the plain insert approach. Also removes dead abstain vote comparison (Tornado Cash has binary voting only). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…sults - Custom vote handler with onConflictDoNothing prevents Ponder's DelayedInsertError during batch flushing (duplicate key on votes_onchain) - Shared voteCast() plain insert crashes the indexer; this is specific to TORN - Updated INTEGRATION.md with full backfill verification results: 65/65 proposals, 49/49 executed, delegatedSupply exact match, 1089 votes with zero duplicates, 458K transfers, 42K accounts Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6de07687a9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ZK: "zksync", | ||
| SHU: "shutter", | ||
| FLUID: "fluid", | ||
| TORN: "tornado-cash", |
There was a problem hiding this comment.
Map TORN token ID to a CoinGecko asset platform
Adding TORN to CoingeckoTokenIdEnum without adding a corresponding entry in CoingeckoIdToAssetPlatformId makes CoingeckoService.getTokenPrice() resolve assetPlatform as undefined for TORN, so it requests /simple/token_price/undefined?... and fails token price lookups for TORN-backed endpoints.
Useful? React with 👍 / 👎.
| .onConflictDoNothing(); | ||
|
|
||
| await context.db | ||
| .update(proposalsOnchain, { id: proposalIdStr }) | ||
| .set((current) => ({ |
There was a problem hiding this comment.
Skip proposal tally updates when vote insert conflicts
This handler suppresses duplicate-vote insert errors with onConflictDoNothing(), but it still unconditionally increments forVotes/againstVotes right after. In replay/backfill duplicate scenarios (the exact scenario this conflict handler addresses), the vote row is ignored while the aggregate tally is still incremented, which corrupts proposal totals and downstream status/quorum analytics.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
this file should not be here
There was a problem hiding this comment.
this file should not be here
Summary
Full integration of Tornado Cash DAO (TORN) into the Anticapture platform — indexer, API, gateway, and dashboard.
Tornado Cash uses a custom stake-to-vote governance (not OZ Governor or Compound GovernorBravo):
lockedBalance= voting power)Delegated/Undelegatedevents)Changes
delegatedSupplytracking, custom governor handler with timestamp-to-block conversion, ABIs, Ponder configTORNClientwith fullgetProposalStatus()override using timestamp-based state machine (Pending -> Active -> Defeated/Queued -> PendingExecution -> Executed/Expired)TORNadded toDaoIdEnumacross indexer, API, and dashboardVerified locally
delegatedSupplytracked via lock/unlock detection (Transfer to/from governance contract)Pending / Limitations (documented in INTEGRATION.md)
votingPowerHistory(TORN lacksDelegateVotesChangedevents)TornadoStakingRewardscontract)Test plan
DAO_ID=TORNagainst a non-censoring RPC - verify proposals, votes, and supply datastate(proposalId)for all 65 proposalsdelegatedSupplyagainst TORN balance of governance contractGenerated with Claude Code