-
Notifications
You must be signed in to change notification settings - Fork 350
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
Meta: Potential benefits of switching the pragma to ">=0.8.0 <0.9.0" #125
Comments
In #138 we thought we may need to only support 0.8 for that new feature. To see if this was feasible without breaking things for users I did a bit of research:
So changing to If we have new features and need to implement them as only
It's possible 3 is a compelling reason, but otherwise it seems the benefit to switching is small compared to the risk of breaking things for some users and all the work/changes involved |
It seems the number of <0.8 users is actually increasing. That same search now returns four 0.7.x projects instead of two—teams that were using hardhat now have hybrid foundry-hardhat repos. Going to close this to avoid breaking support for these projects |
My guess about those some of those users is that they don't know about Solidity v0.8, and my rationale with upgrading the pragma used by Forge Std was motivated, in part, by the possibility that the said users might make the upgrade if Forge Std required them to. Anyway, I agree with your decision for now, but I still think that the benefits of switching to Solidity v0.8 are still worth discussing. It would be nice to enable discussions in this repo, so can convert this issue into a discussion. |
I don't have access to repo settings, enabling discussions seems good since we have it in the main foundry repo, pinging @gakonst to enable it here.
There are a few large protocols that use foundry with 0.7 and certainly know about v0.8. Their rationale for not migrating is likely having upgradeable contracts/architectures on 0.7 that have very large TVLs, so they probably won't migrate anytime soon. This isn't to say forge-std will never be >= 0.8, just that I don't think it makes sense to make that change in the near future given the reliance of many protocols on v0.7 still |
Thanks! And yep, agree with the decision for now, I know that there are sophisticated users who are purposefully sticking with v0.7 for business reasons. |
I know that there's a keen interest in keeping Forge Std compatible with Solidity v0.6 and Solidity v0.7, but I also think that there would be quite a few benefits in upgrading to Solidity v0.8, so I made this post to shed some light on them.
Even if we don't upgrade the pragma now, it might be worth it keep these advantages in the back of our minds (maybe we could implement them on a "solidity-v8" branch).
unchecked
arithmetic<address>.code
.assertApproxEqRel
.type(uint256).max
to get the min and max values permitted in a given type.And potentially several other enhancements could be made to the syntax in
StdStorage
.The text was updated successfully, but these errors were encountered: