Currently one of the fuzz tests will fail to compile due to a stack too deep error which forces us to always compile and test with --via-ir which is much slower than the normal mode. We should fix the stack too deep issue in the fuzz test if possible and remove the need to run everything with --via-ir.
$ forge build
[⠆] Compiling...
[⠊] Compiling 66 files with 0.8.19
[⠢] Solc 0.8.19 finished in 3.60s
Error:
Compiler run failed:
Error: Compiler error (/solidity/libsolidity/codegen/LValue.cpp:52):Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.
CompilerError: Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.
--> test/FeeCalculatorFuzzy/FeeCalculatorERC1155.fuzzy.t.sol:114:33:
|
114 | for (uint256 i = 0; i < numberOfRedemptions; i++) {
Currently one of the fuzz tests will fail to compile due to a stack too deep error which forces us to always compile and test with
--via-ir
which is much slower than the normal mode. We should fix the stack too deep issue in the fuzz test if possible and remove the need to run everything with--via-ir
.