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

Running without --broadcast? #1

Open
KholdStare opened this issue Sep 20, 2022 · 1 comment
Open

Running without --broadcast? #1

KholdStare opened this issue Sep 20, 2022 · 1 comment

Comments

@KholdStare
Copy link

KholdStare commented Sep 20, 2022

Hey @0xPhaze ! Good stuff!

I ran a deploy script without the US_DRY_RUN=true option, but also without the --broadcast, which gave a simulation of the transactions. However it did create a deployment json file, even though no contracts were actually deployed. If I wanted to go ahead and make a deployment, I'd need to delete some json files before going ahead.

This seems like an in-between step between dry-run and actual execution. Some questions:

  • Should this "simulation" be the actual dry run? I.e. Remove the US_DRY_RUN flag and just rely on whether the broadcast flag is present?
  • Regardless whether we keep the US_DRY_RUN flag, is it possible to detect the absence of the --broadcast flag and not output the deployments .json file?

If you're busy but have an opinion, I/we could make the change.

@0xPhaze
Copy link
Owner

0xPhaze commented Sep 21, 2022

That's something that had been bothering me from the start, but sadly is currently not possible. The scripts are unable to detect whether --broadcast is enabled or whether it's just a "dry-run" from foundry's scripting perspective. I would also rather get rid of the US_DRY_RUN parameter. I had opened an issue foundry-rs/foundry#2900, but I think my point didn't come across very well. It seems like someone else just commented that they are in need of the same feature though.

To revert to the previous 'deploy-latest.json', you can delete the most recent 'deploy-{timestamp}.json' and restore the second most recent version.

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

No branches or pull requests

2 participants