I've been working on a refactor for a while now. On a relatively large project. I'm getting an error:
CompilerError: Stack too deep when compiling inline assembly: Variable headStart is 3 slot(s) too deep inside the stack.
I've refactoring and split a bunch of the files into smaller ones but after a few days of work still no luck.
Is there any simple way to identify where the stack becomes too deep so I can look into fixing it?
EDIT:
Okay I found the culprit, still not sure how to fix this heres a reproducible example:
struct MyInnerStruct {
uint256 amount;
bytes options;
}
struct MyOuterStruct {
MyInnerStruct[][] groupedOptions;
}
Error Occurs when attempting to decode:
MyOuterStruct memory outer = abi.decode(params, (MyOuterStruct));
solc
withoutoptimize
flag set, right?