Linked Questions

29 votes
1 answer
31k views

Stack too deep, try removing local variables [duplicate]

When I set more than eight values as function’s return , the following error occurred. ( When the num of values is less than seven, the error didn’t occur) Could you tell me how can I get more than ...
Toshi's user avatar
  • 2,357
0 votes
2 answers
3k views

Stack too deep, try using fewer variables [duplicate]

Seems like I'm passing a lot of arguments in a struct creation, this message error showed up "stack too deep , try using fewer variables" I tried to get rid of it by using bytes32 instead of string, ...
Fahmy Chaabane's user avatar
1 vote
1 answer
2k views

InternalCompilerError: Stack too deep, try removing local variables [duplicate]

I want add and store more than 16 variables value in in my private blockchain, I am unable to define the variable in Struct {}, I got Error "InternalCompilerError: Stack too deep, try removing ...
Sam's user avatar
  • 11
2 votes
0 answers
1k views

Stack too deep when compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack [duplicate]

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 ...
Tom's user avatar
  • 123
0 votes
1 answer
1k views

Getting this ---- Error: Stack too deep, try removing local variables [duplicate]

Hi Ethereum Developer's, Need your precious time.. I know this question is asked and solutions is given for the same I have a smart contract--------- pragma solidity ^0.4.18; contract myContract ...
Muddassar Shaikh's user avatar
1 vote
1 answer
500 views

Uniswap V2 Contract question: Stack too deep [duplicate]

Could someone explain how this line of code (linked below) properly circumvents the "stack too deep" error? I was under the assumption that the "stack too deep" error meant the ...
uma's user avatar
  • 13
0 votes
1 answer
1k views

CompilerError: Stack too deep, try removing local variables. How to solve the problem? [duplicate]

I'm having problems with this part of the code. Can you tell me how to solve this problem? I have read various documentation, but maybe someone knows the solution function _getValues(uint256 tAmount)...
Dmitry's user avatar
  • 1
1 vote
1 answer
735 views

CompilerError: Stack too deep, try removing local variables [duplicate]

While trying to fetch more than 6 variables I am having an issue. /** * Get data based on report id */ function getData(uint256 id) public view returns ( ...
NinjaMAN's user avatar
  • 419
0 votes
1 answer
901 views

Stack Too Deep Compiling Error on Remix -- Solidity [duplicate]

first off I’d like to say that I’m a noob in Solidity so this issue might sound so trivial, pls bear with me. I’m running into a compiler error on line 61 (Stack too deep). I suppose an easy fix would ...
user96723's user avatar
1 vote
0 answers
108 views

Error on contract constructor - CompilerError: Stack too deep, try removing local variables [duplicate]

I have the following constructor on a contract: constructor( string name, string symbol, uint8 tokenResolution, string defaultUnderlying, uint maturityTimestamp, uint rate, ...
Lucas Yamamoto's user avatar
0 votes
1 answer
62 views

Stack too deep error - need help fixing it! [duplicate]

I keep getting the 'stack too deep' error on solidity. I was wondering if anyone can help me fix this with in following code: function _getTValues(uint256 tAmount) private view returns (uint256, ...
GandalfTheGrey's user avatar
0 votes
1 answer
39 views

InternalCompilerError: Stack too deep, try using fewer variables [duplicate]

Here is my code // SPDX-License-Identifier: MIT pragma solidity >=0.4.22 <0.9.0; contract GeoSpatialData{ uint public SpatialDataCount = 0; struct GeoData{ uint id; ...
sarangkkl's user avatar
  • 129
0 votes
0 answers
41 views

How to fix CompilerError: Stack too deep, try using fewer variables? [duplicate]

When attempting to compile the following contract I am receiving the following error: InternalCompilerError: Stack too deep, try using fewer variables. How can I fix this?I want the getPerson function ...
Jaylukmann's user avatar
0 votes
0 answers
38 views

CompilingError: Stack too deep, try removing local variables [duplicate]

I have a function that lists an NFT on a marketplace for sale. In the process, it keeps records by saving data in a struct inside nested maps represented by the NFT address and token ID. I am running ...
Weivy's user avatar
  • 1
0 votes
1 answer
38 views

Stack too deep error [duplicate]

Not sure what the best approach is to get around this. New to solidity. I've read the complicated 'answers' to this that suggest using structs, arrays, etc. but I can't figure out how to address this. ...
Ash's user avatar
  • 1

15 30 50 per page