Repository navigation
docs(cheatcodes): document getBroadcast, getBroadcasts, getDeployment, getDeployments and getDeploymentByLabel - #2276
Open
yash251 wants to merge 1 commit into
Conversation
…, getDeployments and getDeploymentByLabel
yash251
requested review from
figtracer,
mablr,
mattsse and
stevencartavia
as code owners
November 30, 2026 01:25
|
@yash251 is attempting to deploy a commit to the Tempo Team on Vercel. A member of the Team first needs to authorize it. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds reference pages for the broadcast lookup cheatcodes:
getDeployment,getDeployments,getBroadcast,getBroadcastsandgetDeploymentByLabel. They sit in the External sidebar group afterdeployCode, andbroadcast-files.mdxnow links to them.The first four were in
knownMissinginscripts/cheatcode-coverage.json, so this removes 4 entries.getDeploymentByLabelis not in v1.10.1. It was added in foundry-rs/foundry#18790 (merged Nov 28), so its page has a nightly note like the transient storage pages from #2220 had. It is not in the manifest yet, but the next weekly refresh would list it as new undocumented. With--refreshagainst Foundry masterd5b3494, it counts as documented.Signatures come from
crates/cheatcodes/spec/src/vm.rson master. Behaviour comes fromcrates/cheatcodes/src/fs.rsandcrates/script-sequence/src/reader.rs. The examples come from a newsrc/snippets/projects/broadcast_lookupproject. Its script deploys twoCountercontracts with labels and calls one. The committedbroadcast/Deploy.s.sol/31337/run-*.jsonis the file that script wrote against a local Anvil node, so the tests run without a node.-latestanddry-runfiles are gitignored.Two gotchas on the pages were checked by running them:
dry-runfile for the same contract makesgetDeploymentandgetBroadcastrevert withno deployment found for Counter on chain 31337.getDeploymentsandgetDeploymentByLabelstill return the confirmed deployments.getDeploymentandgetBroadcastrevert withNo broadcasts found, and the plurals return an empty array.Checks:
forge test --root src/snippets/projects/broadcast_lookup: 4 passed and the label suite skipped on forge 1.10.1 (7c15a1d). 6 passed on nightlye57b04c. The label suite skips itself below 1.10.2 withfoundryVersionAtLeast.forge fmt --checkon the project: cleanvp run check:cheatcodes: passes, 268/333 mentioned, 65 known gaps, 178 pages and 178 sidebar routesvp run check:commandsandvp check sidebar: passvp exec vocs build: passesgit diff --check: cleanThis edits nearby lines of
knownMissingas #2272, #2273 and #2274, so whichever merges later needs a one-line rebase.