feat(dashboard): anvil fork test for the full governance lifecycle - #2133
feat(dashboard): anvil fork test for the full governance lifecycle#2133brunod-e wants to merge 5 commits into
Conversation
…ycle Adds scripts/governance-fork-test, run with pnpm --filter @anticapture/dashboard test:governance <dao...|all>. It spawns an anvil fork of mainnet, fetches each DAO's top delegates from the Anticapture API, impersonates them, and drives propose, vote, queue and execute through the dashboard's own transaction code (submitProposalRequest, voteOnProposal, queueProposal, executeProposal), asserting proposal state and exact vote tallies at every step. Because real voting windows span days of blocks, the harness shrinks them on the throwaway fork (governor timing slots for Bravo-style governors, the proposal's vote window in _proposals storage for OZ governors, with ERC-7201 namespaces discovered automatically), always verified against the governor's own getters. GOV_REAL_TIMING=1 keeps real timing. Supported DAOs: uni, comp, gtc, torn, ens. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 94fafd9a5b
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
🚅 Deployed to the anticapture-pr-2133 environment in anticapture-infra
|
…ard in the fork test Once the Tornado whitelabel PR lands, TORN proposals go through submitProposalRequest (propose(target, description)) and execution goes through executeProposal after the built-in execution delay, so the harness now exercises those paths instead of proposing directly. The synthetic proposal contract gets a single STOP opcode via setCode so the governance delegatecall on execute succeeds. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1d4e08cb34
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…Tornado propose The Tornado propose path now only accepts a single action calling executeProposal() on the proposal contract, so the harness sends that selector instead of empty calldata. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f24f65335c
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
…sh gateway URLs Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
What
An automated end-to-end test of the full governance lifecycle (create proposal, vote, queue, execute) against an anvil fork of mainnet, exercising the exact code the dashboard uses to send transactions:
submitProposalRequest,voteOnProposal,queueProposalandexecuteProposal.Proposers and voters are the DAO's real top delegates, fetched live from the Anticapture API and impersonated on the fork, so thresholds and quorums are met with genuine delegated voting power. Every step asserts the on-chain proposal state and that tallies match the cast power exactly.
Real voting windows span days of blocks, so the harness shrinks them on the throwaway fork (governor timing slots for Bravo-style governors, the proposal's vote window in
_proposalsstorage for OZ governors, ERC-7201 namespaces discovered automatically), always verified against the governor's own getters.GOV_REAL_TIMING=1keeps real timing.Validation on this branch
castDelegatedVoterequires a non-empty list); the fix ships with the Tornado whitelabel PRA failing DAO is the harness doing its job: it means that branch's dashboard cannot run that DAO's governance on-chain.
🤖 Generated with Claude Code