Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add --broadcast flag to forge create, default to dry run mode #9420

Merged
merged 5 commits into from
Nov 27, 2024

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Nov 27, 2024

Motivation

Closes: #3356

In order to prevent accidental deployments this PR proposes to add a --broadcast flag to forge create as a requirement for actually deploying. If not passed the user is warned this is a dry run and asks them to explicitly pass it. This is in line with forge script.

If --broadcast not passed we configure the transaction and simulate right up to the point of actually deploying.

Solution

Note this is a breaking change but in my eyes a sensible one

@zerosnacks zerosnacks marked this pull request as ready for review November 27, 2024 11:19
Copy link
Collaborator

@grandizzy grandizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@zerosnacks zerosnacks merged commit 2c3114c into master Nov 27, 2024
21 checks passed
@zerosnacks zerosnacks deleted the zerosnacks/add-dry-run-to-forge-create branch November 27, 2024 12:06
rplusq pushed a commit to rplusq/foundry that referenced this pull request Nov 29, 2024
…foundry-rs#9420)

* add --broadcast flag to forge create, default to dry run

* nits

* fix tests

* add dry run tests incl --json

* minor fixes, failing test due to minor bytecode difference
@grandizzy grandizzy added T-feature Type: feature C-forge Command: forge labels Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-forge Command: forge T-feature Type: feature
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Add dry run mode to forge create, dumping broadcast to stdout
3 participants