docs: add required --broadcast flag to forge create in deploy quickstart#1695
Open
Lrifton92 wants to merge 1 commit into
Open
docs: add required --broadcast flag to forge create in deploy quickstart#1695Lrifton92 wants to merge 1 commit into
Lrifton92 wants to merge 1 commit into
Conversation
Since Foundry v1.0, `forge create` performs a dry run by default and does not broadcast the deployment transaction unless `--broadcast` is passed. Following this guide as written therefore does not deploy the contract, while the next step states the transaction hash will be printed. Align this page with the already-corrected sibling guide (apps/quickstart/deploy-on-base.mdx): keep the dry run as an optional step, then deploy with `--broadcast`, and note that the flag is required. Ref: https://www.getfoundry.sh/reference/forge/create
Collaborator
🟡 Heimdall Review Status
|
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.
Summary
The Deploy Smart Contracts quickstart (
docs/get-started/deploy-smart-contracts.mdx) runsforge createwithout the--broadcastflag:forge create ./src/Counter.sol:Counter --rpc-url $BASE_SEPOLIA_RPC_URL --account deployerSince Foundry v1.0,
forge createperforms a dry run by default and does not broadcast the deployment transaction unless--broadcastis passed. Following the guide as written therefore does not deploy the contract — yet the next step states "the transaction hash will be printed to the console output", so a reader believes they deployed when they did not.Fix
Align this page with the already-corrected sibling guide
docs/apps/quickstart/deploy-on-base.mdx, which already documents this exact pattern:--broadcast.<Tip>noting the flag is required..env,source .env).No other content changed.
Reference
Foundry
forge createreference: "If you do not pass the--broadcastflag your transaction is a dry-run."Test plan
mint devrenders the updated Deploy Your Contracts section with the dry-run + broadcast steps and the tip.docs/apps/quickstart/deploy-on-base.mdx.