-
Notifications
You must be signed in to change notification settings - Fork 332
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
Add --from
option to vm.py, to generate Vm.sol from json file
#619
Conversation
Can you describe your use case for this? Also cc @DaniPopes who wrote the script originally |
It would be much easier to have just one argument that's the path of |
@mds1 yes, my use case is that I like to open the Foundry Book and Forge-Std PRs before the main PR on Foundry gets merged. The reason I do it like this is because I have very little time to actually write code so when I have the opportunity, I try to get everything done all at once. This means that in order to update the Vm interface using Adding these params lets me run e.g. |
You mean provide the entire URL on the command line? |
No, a path to a file, defaulting to fetching from the default source and keeping it in memory |
Oh, so for example |
Thanks @DaniPopes @Tudmotu I can review + merge once that change is made! |
e427848
to
aa92587
Compare
--from
option to vm.py, to generate Vm.sol from json file
aa92587
to
ae19ced
Compare
ae19ced
to
7c11c84
Compare
@mds1, @DaniPopes , updated the PR with the |
Defaults to "foundry-rs" and "master" respectively to maintain backwards-compatibility.Added the
--from
option which lets you specify a local json file to generateVm.sol
from.This PR uses
argparse
to implement the argument handling.When running
vm.py -h
will display help information:Running the script with no args should behave same as before.