1

I have been facing the Stack too deep error, and it is being displayed without any line number / contract info. It is compiling all my contracts together (over 10) and I have no clue where this error is happening and how I am supposed to fix this. Any clues to make the compiler more verbose? I have already read through many of the posts talking about this, and I have worked on reducing local variables / moving to structs wherever possible, though it has not changed anything. I don't have a single function with over 7 parameters (and that one was compiling fine for a long time before this error appeared).

Any help will be much appreciated!!

I am using Solidity v0.8.4.

2
  • This is a good (relatively advanced) read, that may help -> medium.com/coinmonks/… May 17, 2021 at 21:57
  • I did go through this, although in my case I do not get a detailed error message so I don't know which line/contract the error is taking place. I don't think it is feasible or practical to debug 11 contracts to find the issue without any info on the error.
    – tinker
    May 17, 2021 at 23:02

1 Answer 1

3

Turns out the issue was a struct to which I had added a few fields, and there were 16 fields in the struct, and that too is not permissible. Re-organizing, moving some fields to another struct, and having a struct within a struct seems to have solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.