Skip to content

Remove the need to run with --via-ir #53

Description

@0xmichalis

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++) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions