Switch to solc 0.8.24, upgrade dependencies and enable via-ir #342
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Some changes were needed to make the code via-IR-compatible.
The behavior of the inline initialization (e.g.
uint256 internal immutable foo = 123;
) is different, it's no longer done before all the constructors are run, but only right before the constructor of the contract containing this variable, so it can't be used as a parameter of the parent contract, it's silently set to 0.Via-IR has some problems with very large functions, it probably tries to inline them and then optimize, which it fails to do. This is why some tests needed to be prevented from inlining by making the complicated function calls external.
Via-IR assumes that
block.timestamp
never changes, so it sometimes replaces accessing variables known to be holding the timestamp withblock.timestamp
retrieval, which derailed some tests.