According to this blog using Solidity 0.8.13+ should eliminate the stack too deep error in most cases, however I'm still experiencing in both brownie and hardhat. I've added the following to my hardhat.config.js
compilers
:
{
version: "0.8.13",
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
This isn't the actual code I'm getting the error with, but the error persists nonetheless:
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.13;
contract TestStackError {
event LogValue(uint);
function logArg(
uint a1, uint a2, uint a3, uint a4,
uint a5, uint a6, uint a7, uint a8,
uint a9, uint a10, uint a11, uint a12,
uint a13, uint a14, uint a15, uint a16
) public {
emit LogValue(a16);
}
}