EXSC-301: add bulk contract verification helper for one network#1855
EXSC-301: add bulk contract verification helper for one network#18550xDEnYO wants to merge 2 commits into
Conversation
Add verifyAllUnverifiedContractsOnNetwork to iterate contracts from deployments/<network>.json, skip those already verified in MongoDB, and verify the rest via getContractVerified. Co-authored-by: Cursor <cursoragent@cursor.com>
Address CodeRabbit review: capture getContractNamesFromNetworkDeploymentFile exit status explicitly and fail when jq cannot parse the deployments file. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Warning Review limit reached
More reviews will be available in 1 minute and 23 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Which Linear task belongs to this PR?
EXSC-301
Why did I implement it this way?
Use case
When we deploy to a new network, contract verification often cannot run at deploy time. Typical reasons:
foundry.toml/networks.jsonDeployments still land in
deployments/<network>.jsonand MongoDB withverified: false. Once the explorer is ready, we need a single follow-up step to verify every contract on that chain and flip the MongoDB flags — without manually callinggetContractVerifieddozens of times.verifyAllUnverifiedContractsOnNetworkis that follow-up helper.What it does
deployments/<network>.json(or.staging.json) — the canonical set of addresses for that network, not the full MongoDB history (which may include old versions, staging rows, etc.).getContractVerifiedpath (forgeverify-contract+ MongoDB update vialogContractDeploymentInfo).Example (after Arc explorer went live):
Also fixes
isContractAlreadyVerifiedto read MongoDB's.verifiedfield (not only legacy.VERIFIED).Checklist before requesting a review
/pr-ready(local CodeRabbit) on this branch and resolved (or explicitly documented) all findings — see.agents/commands/pr-ready.mdChecklist for reviewer (DO NOT DEPLOY and contracts BEFORE CHECKING THIS!!!)