Open nventuro opened 2 years ago
We may want to wait until https://github.com/ethereum/solidity/issues/10698 is solved before migrating. See this comment on how the lack of that feature negatively affects gas usage.
After reading the docs more carefully, I realized that the actual change 0.8 introduced is to make enums always have at most 256 elements, not make the type wider. So we're unaffected by this.
Any update on this?
Not really. We still want to do it, and I was hoping the unchecked
expression would be resolved by now. Unfortunately it looks like it's not going to happen, so we may just have to bite the bullet and live with that.
Hello! Are there still plans to perform this migration? We (Olympus) have a codebase built on solc 0.8.x and were trying to use the StableMath library, but are concerned about changes in behaviour (particularly those not immediately visible, edge cases, etc) due to the overflow/underflow changes.
One of the original motivations for waiting was https://github.com/ethereum/solidity/issues/10698 being addressed, though it looks like that won't happen in the short term.
That said, you should definitely be able to use StableMath (and indeed pretty much any math-related code) in 0.8, since we don't ever rely on overflow behavior.
At some point we'll want to do this.
There's two big changes that I know of that will affect us:
Math.add
andMath.sub
, but meanwhile we can gradually replace their usage for the native operators.It'd be good if we kept the interface pragmas >0.7.0, to avoid breaking compatibiliy.