Fix deployment tutorial: add --broadcast flag and clarify env setup #522
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.
What changed? Why?
This PR fixes two critical issues in the Deploy on base tutorial that were discovered while following the tutorial step-by-step.
Issue 1: Missing
--broadcastflag in deployment commandThe current documentation provides a deployment command that only performs a dry run simulation without actually deploying the contract to the network. Delopers see transaction details but receive a warning
"Dry run enabled, not broadcasting transaction", and no contract address is generated. This causes confusion because users expect successful deployment but no transaction hash is printed to the console.Changes:
--broadcastflag--broadcastis required for actual deploymentIssue 2: Unclear environment variable setup for verification
The verification section instructs users to run a cast call using
$COUNTER_CONTRACT_ADDRESS, but the documentation never clearly explains when to copy the contract address, what the deployment output looks like, or thatsource .envmust be run after adding the variable. This results in an undefined environment variable and a confusing error:error: invalid value 'number()(uint256)' for '[TO]': odd number of digits.Changes:
.envsource .envafter modifying the fileThese changes prevent silent failures, make environment variable setup explicit, and provide helpful guidance at points where developers are likely to get stuck.
Notes to reviewers
The changes maintain the tutorial's flow while adding critical missing information. The new tips use the existing
<Tip>component for consistency with the rest of the documentation. All instructions are actionable and specific, reducing ambiguity for first-time users.How has it been tested?
I followed the updated tutorial from start to finish on Base Sepolia and verified that:
--broadcastsuccessfully deploys the contract.envand runningsource .envworks correctlyI also spun up the documentation site locally and reviewed the updated pages to ensure the formatting displays correctly, the tips render properly, and the content flows naturally within the existing tutorial structure.