I tried to add another parameter to my constructor and I get the following error when compiling with hardtest to test. If I remove one parameter it compiles again, so clearly it's related to the number of parameters.
What is the workaround for this? I can't find this limit documented anywhere.
CompilerError: Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack.
Simple reproduction that errors on compile:
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
import "remix_tests.sol"; // this import is automatically injected by Remix.
import "../contracts/3_Ballot.sol";
contract ParamTest {
constructor(uint a,uint b,uint c,uint d,uint e,uint f,uint g,uint h,uint i,uint j,uint k, uint l) {}
}
pragma abicoder v2
. You can avoid the problem with optimization turned on, but I'm still getting this while runningsolidiy-coverage
compilation.