Skip to content

docs: add required --broadcast flag to forge create in deploy quickstart#1695

Open
Lrifton92 wants to merge 1 commit into
base:masterfrom
Lrifton92:fix/forge-create-broadcast-flag
Open

docs: add required --broadcast flag to forge create in deploy quickstart#1695
Lrifton92 wants to merge 1 commit into
base:masterfrom
Lrifton92:fix/forge-create-broadcast-flag

Conversation

@Lrifton92

Copy link
Copy Markdown

Summary

The Deploy Smart Contracts quickstart (docs/get-started/deploy-smart-contracts.mdx) runs forge create without the --broadcast flag:

forge create ./src/Counter.sol:Counter --rpc-url $BASE_SEPOLIA_RPC_URL --account deployer

Since Foundry v1.0, forge create performs a dry run by default and does not broadcast the deployment transaction unless --broadcast is 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:

  • Keep the flagless command as an optional dry run step.
  • Add the real deploy step with --broadcast.
  • Add a <Tip> noting the flag is required.
  • Renumber the following steps (add address to .env, source .env).

No other content changed.

Reference

Foundry forge create reference: "If you do not pass the --broadcast flag your transaction is a dry-run."

Test plan

  • mint dev renders the updated Deploy Your Contracts section with the dry-run + broadcast steps and the tip.
  • Commands are consistent with docs/apps/quickstart/deploy-on-base.mdx.

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
@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants