Post
Share your knowledge.
Oct 23, 2023
Expert Q&A
Error when calling `increaseLiquidity ` in nonFungiblePositionManager.
I have failing tests when calling increaseLiquidity
in nonFungiblePositionManager. decreaseLiquidity
works as expected but increaseLiquidity is failing.
This is the code:
underlyingPositionManager.increaseLiquidity(
INonfungiblePositionManager.IncreaseLiquidityParams({
tokenId: loan.tokenId,
amount0Desired: amount0,
amount1Desired: amount1,
amount0Min: 0,
amount1Min: 0,
deadline: block.timestamp
})
This is the foundry output for the test
[12350] 0xC36442b4a4522E871399CD717aBDD847Ab11FE88::increaseLiquidity((512098 [5.12e5], 0, 671529 [6.715e5], 0, 0, 1685033235 [1.685e9]))
│ │ ├─ [696] 0xCBCdF9626bC03E24f779434178A73a0B4bad62eD::slot0() [staticcall]
│ │ │ └─ ← 0x000000000000000000000000000000000005db000f1598ba8f0e02e024506208000000000000000000000000000000000000000000000000000000000003ec8f000000000000000000000000000000000000000000000000000000000000006400000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001
│ │ ├─ [3747] 0xCBCdF9626bC03E24f779434178A73a0B4bad62eD::mint(0xC36442b4a4522E871399CD717aBDD847Ab11FE88, 253320, 264600, 0, 0x0000000000000000000000002260fac5e5542a773aa44fbcfedf7c193bc2c599000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc20000000000000000000000000000000000000000000000000000000000000bb80000000000000000000000002e234dae75c793f67a35089c9d99245e1c58470b)
│ │ │ └─ ← "EvmError: Revert"
│ │ └─ ← "EvmError: Revert"
│ └─ ← "EvmError: Revert"
└─ ← "EvmError: Revert"
Test result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 424.01ms
Ran 1 test suites: 0 tests passed, 1 failed, 0 skipped (1 total tests)
Can someone tell me what might be the issue, thank you.
- Smart Contract
- Solidity
0
1
Share
Comments
Answers
1Do you know the answer?
Please log in and share it.
Solidity is an object-oriented, high-level language for implementing smart contracts. It is a curly-bracket language designed to target the Ethereum Virtual Machine (EVM).
44Posts39Answers
Trending posts
- My ERC721 contract successfully deploys, but I can't verify the contract's source code with hardhat21
- Solidity and ethers.js Compute Different Addresses from the Same Signature21
- can't understand what are the locations(uint256)22
- How to reverse keccak256 in solidity22
- Clarification on Gas Refunds and Comparison Between "require" and "revert" in Smart Contracts21