-
Notifications
You must be signed in to change notification settings - Fork 383
fix: remove StdStorage in CommonBase contract #241
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Holding off on merging this per discussion in foundry-rs/foundry#3055 — let's move discussion there, cc @ZeroEkkusu if you have any thoughts on this PR |
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.
Initializing a struct
before DSTest
is inherited causes the example to pass.
Since it's a false positive (dangerous), let's fix the issue immediately. @graykode, could you please move TestBase
to the of the inheritance chain instead:
abstract contract Test is DSTest, StdAssertions, StdCheats, StdUtils, TestBase {}
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.
agree, let's merge and I'll debug the root cause.
@mds1 probably need another patch release?
My comment was unclear: we are discarding all the changes and only doing this 👇 abstract contract Test is DSTest, StdAssertions, StdCheats, StdUtils, TestBase {} |
@ZeroEkkusu I pushed the required changes and verified the test now fails as expected. Feel free to review/merge |
Remove
StdStorage
in Common.solIf there is
StdStorage
in Common.sol, this testcase cant return ERROR when run with forge