-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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(script): add --dry-run broadcast argument #9655
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
@jsvisa thank you! would you mind adding a test case for such? |
crates/script/src/broadcast.rs
Outdated
// Print all transactions if --dry-run is set | ||
if self.args.dry_run { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think dry run
and broadcast
should still be mutually exclusive as that is what their meaning is. To run a dry run means to not broadcast.
In favor of the proposed feature though I think it should be exposed either with the global verbosity flag or just by default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think --dry-run
should only be available when --broadcast
or --resume
is given, instead of the broadcasting, just print the tx body.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To give some more context, basically what we currently refer to as dry run
is when a user does not pass a --broadcast
flag. I would like to stick to that as we use that for other cases as well (such as forge create
, see #9420)
Instead the proposed feature should use the global verbosity flag (e.g. -vvvvv
)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zerosnacks PTAL, now I set the dryrun as the default behavior.
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Signed-off-by: jsvisa <[email protected]>
Motivation
implement #9648
Solution
It looks like below: