Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Verifies a network's deployed smart contracts on its block explorer and sets the MongoDB verified flag for each.
50% 86%+36 ptsof test cases passed
Passed 19 of 22 test cases with the skill, and 11 of 22 without it.
When executing script/deploy/query-deployment-logs.ts to fetch the latest status of deployed contracts on Polygon, which flag ensures we receive current database records rather than local cached data?
Includes the --no-use-cache flag when invoking query-deployment-logs.ts
3 of 3 safety checks passed
Goal: every contract in deployments/<network>.json shows verified on the block explorer AND carries verified:true in the MongoDB deployment log. Those two facts are independent — the skill is not done until both hold.
NETWORK — short network name as keyed in config/networks.json (e.g. base, arbitrum, mainnet).deployments/<network>.json: { "ContractName": "0x…", … }. The authoritative list of what to verify.ENVIRONMENT — production unless the deploy was a staging run.Submodules must be initialized in the working checkout. If lib/ is empty, forge cannot compile and verification fails with the misleading Details: Fail - Unable to verify, preceded by many No such file or directory errors for lib/.... A fresh worktree does not inherit submodules. Always run git submodule update --init --recursive before the first verifyContract.
On-chain verification ≠ the Mongo verified flag. Calling verifyContract directly verifies the bytecode on the explorer but does not write verified:true to the MongoDB master log — only logContractDeploymentInfo() (→ update-deployment-logs.ts add) does that, and the direct loop bypasses it. So after the on-chain loop you must flip the Mongo flags explicitly (Step 5). Skip this and the contracts look unverified in every report that reads Mongo, even though the explorer shows them green.
By network (already deployed, files on main): use deployments/<network>.json in the current checkout.
By PR (deploy PR — the deployment files exist only on the PR branch): check out that branch in a worktree. Resolve the branch with gh pr view <N> --json headRefName -q .headRefName if you only have the PR number, then:
PR_BRANCH=$(gh pr view <N> --json headRefName -q .headRefName)
git worktree add ../contracts-wt-verify "$PR_BRANCH"
ln -s "$(git rev-parse --show-toplevel)/.env" ../contracts-wt-verify/.env # symlink, never copy
The TS scripts (Steps 5–6) read MONGODB_URI from .env; the symlink reuses the main checkout's secrets. If you keep a personal contracts-wt-add.sh helper it does the same .env symlink for you, but it is not required.
git submodule update --init --recursive # gotcha #1 — non-negotiable in a fresh worktree
The repo TS scripts (Step 5) also need deps: run bun install if node_modules is absent. The TS log scripts filter Mongo by --network as a plain string, so if a worktree lacks deps you can run Step 5 from the main checkout instead — only the on-chain loop (Step 4) needs this checkout's src/ + lib/.
Next to this one in the catalogue, plus more from the same author.