-
Notifications
You must be signed in to change notification settings - Fork 73
Allow Medusa to run init function (ex: setUp) once per fuzz run #618
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
base: master
Are you sure you want to change the base?
Conversation
…edusa into add-init-fn-per-fuzz-run
|
@0xZRA appreciate the quick turnaround! I need a few days before I can get to reviewing it just FYI :) |
Absolutely! And thanks for the opportunity ;) |
|
My bad, I never noticed the progression on this PR. This is great thanks @0xZRA. I tested it on a larger codebase and it works In term of usability, I am wondering it would make sense to add a flag to enable |
|
@montyly Thanks for your feedback! I can work on adding the flag, it may take me few days though |
|
@montyly Let me know if the latest commit delivers the intended improvement to devx. My assumption is that the default configuration values will still be processed downstream to address all contracts that implement it. |
|
thanks for the quick work! To be honest I would even go further, and have the flag The reasoning is that all the foundry-based projects uses a |
|
@montyly let me know if the latest approach works.
These are possible scenarios that I can think of: // Same can be achieved by passing // Result: initFunctions = ["setUp", "setUp", "setUp"] // ================================================================ // Result: initFunctions = ["initialize", "initialize"] // ================================================================ // Result: initFunctions = ["setUp", "initialize"] // ================================================================ // Result: initFunctions = ["setUp", "setUp"] // ================================================================ // Result: initFunctions = ["", ""] // ================================================================ // Result: initFunctions = ["", ""] |
@anishnaik are you still planning to look into this at some point? |
Closes #611
I decided to follow existing pattern of
TargetContractsandTargetContractsBalancessequential deployments. I think the core functionality is in place (and I hope it meets the requirements?), but the PR could be improved with more edge case testing.@anishnaik @montyly please let me know your thoughts whenever you get a chance