You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a contract that has a lot of logic. I came to the point when I get Stack too deep exception.
In my search for the reason I came to a thing I can not get my head around.
The contract is way bigger but I copied the relevant part. The thing is how is it even possible that a defined public property effects the stack? And what would be possible solutions?
I already tried compile with and without viaIR.
contract PositionRouter
{
using Address for address;
using SafeERC20 for IERC20;
struct DecreasePositionRequest {
address account;
address[] path;
address indexToken;
uint256 collateralDelta;
uint256 sizeDelta;
bool isLong;
address receiver;
uint256 acceptablePrice;
uint256 minOut;
uint256 executionFee;
uint256 blockNumber;
uint256 blockTime;
bool withdrawETH;
address callbackTarget;
}
// Enabling this leads to Stack too deep
// mapping (bytes32 => DecreasePositionRequest) public decreasePositionRequests;
...
}
The text was updated successfully, but these errors were encountered:
I know you believe that this code is the only necessary one for debugg but can you give me the link of the entire smart contract ? You are calling out parameters that need to be in order with all the data in the smart contract.
I have a contract that has a lot of logic. I came to the point when I get Stack too deep exception.
In my search for the reason I came to a thing I can not get my head around.
The contract is way bigger but I copied the relevant part. The thing is how is it even possible that a defined public property effects the stack? And what would be possible solutions?
I already tried compile with and without viaIR.
The text was updated successfully, but these errors were encountered: