Failing to pass the tests testMintSuccess() and testSwapBuyEth() because of Invalid Tick Range. #80
Replies: 1 comment
-
I don't see this problem on the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Running 2 tests for test/UniswapV3Pool.t.sol:UniswapV3PoolTest
[FAIL. Reason: InvalidTickRange()] testMintSuccess() (gas: 798561)
[FAIL. Reason: InvalidTickRange()] testSwapBuyEth() (gas: 798540)
Test result: FAILED. 0 passed; 2 failed; 0 skipped; finished in 2.07ms
Ran 1 test suites: 0 tests passed, 2 failed, 0 skipped (2 total tests)
Failing tests:
Encountered 2 failing tests in test/UniswapV3Pool.t.sol:UniswapV3PoolTest
[FAIL. Reason: InvalidTickRange()] testMintSuccess() (gas: 798561)
[FAIL. Reason: InvalidTickRange()] testSwapBuyEth() (gas: 798540)
Encountered a total of 2 failing tests, 0 tests succeeded
~/uniswapv3clone main ⇡2 !2 ?3 ··································································································· 5s 01:28:20 AM
❯ forge test --vvvv
error: unexpected argument '--vvvv' found
Usage: forge test [OPTIONS]
For more information, try '--help'.
~/uniswapv3clone main ⇡2 !2 ?3 ·········································································································· 08:20:45 PM
❯ forge test -vvvv
[⠃] Compiling...
No files changed, compilation skipped
Running 2 tests for test/UniswapV3Pool.t.sol:UniswapV3PoolTest
[FAIL. Reason: InvalidTickRange()] testMintSuccess() (gas: 798561)
Traces:
[1355009] UniswapV3PoolTest::setUp()
├─ [622372] → new ERC20Mintable@0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← 2874 bytes of code
├─ [622372] → new ERC20Mintable@0x2e234DAe75C793f67A35089C9d99245E1C58470b
│ └─ ← 2874 bytes of code
└─ ← ()
[798561] UniswapV3PoolTest::testMintSuccess()
├─ [46596] ERC20Mintable::mint(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 1000000000000000000 [1e18])
│ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], amount: 1000000000000000000 [1e18])
│ └─ ← ()
├─ [46596] ERC20Mintable::mint(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 5000000000000000000000 [5e21])
│ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], amount: 5000000000000000000000 [5e21])
│ └─ ← ()
├─ [604065] → new UniswapV3Pool@0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
│ └─ ← 2903 bytes of code
├─ [24523] ERC20Mintable::approve(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 1000000000000000000 [1e18])
│ ├─ emit Approval(owner: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], spender: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], amount: 1000000000000000000 [1e18])
│ └─ ← true
├─ [24523] ERC20Mintable::approve(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 5000000000000000000000 [5e21])
│ ├─ emit Approval(owner: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], spender: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], amount: 5000000000000000000000 [5e21])
│ └─ ← true
├─ [962] UniswapV3Pool::mint(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 84222, 86129, 1517882343751509868544 [1.517e21], 0x0000000000000000000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f0000000000000000000000002e234dae75c793f67a35089c9d99245e1c58470b0000000000000000000000007fa9385be102ac3eac297483dd6233d62b3e1496)
│ └─ ← "InvalidTickRange()"
└─ ← "InvalidTickRange()"
[FAIL. Reason: InvalidTickRange()] testSwapBuyEth() (gas: 798540)
Traces:
[1355009] UniswapV3PoolTest::setUp()
├─ [622372] → new ERC20Mintable@0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f
│ └─ ← 2874 bytes of code
├─ [622372] → new ERC20Mintable@0x2e234DAe75C793f67A35089C9d99245E1C58470b
│ └─ ← 2874 bytes of code
└─ ← ()
[798540] UniswapV3PoolTest::testSwapBuyEth()
├─ [46596] ERC20Mintable::mint(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 1000000000000000000 [1e18])
│ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], amount: 1000000000000000000 [1e18])
│ └─ ← ()
├─ [46596] ERC20Mintable::mint(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 5000000000000000000000 [5e21])
│ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], amount: 5000000000000000000000 [5e21])
│ └─ ← ()
├─ [604065] → new UniswapV3Pool@0xF62849F9A0B5Bf2913b396098F7c7019b51A820a
│ └─ ← 2903 bytes of code
├─ [24523] ERC20Mintable::approve(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 1000000000000000000 [1e18])
│ ├─ emit Approval(owner: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], spender: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], amount: 1000000000000000000 [1e18])
│ └─ ← true
├─ [24523] ERC20Mintable::approve(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 5000000000000000000000 [5e21])
│ ├─ emit Approval(owner: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], spender: UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], amount: 5000000000000000000000 [5e21])
│ └─ ← true
├─ [962] UniswapV3Pool::mint(UniswapV3PoolTest: [0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496], 84222, 86129, 1517882343751509868544 [1.517e21], 0x0000000000000000000000005615deb798bb3e4dfa0139dfa1b3d433cc23b72f0000000000000000000000002e234dae75c793f67a35089c9d99245e1c58470b0000000000000000000000007fa9385be102ac3eac297483dd6233d62b3e1496)
│ └─ ← "InvalidTickRange()"
└─ ← "InvalidTickRange()"
Test result: FAILED. 0 passed; 2 failed; 0 skipped; finished in 15.07ms
Ran 1 test suites: 0 tests passed, 2 failed, 0 skipped (2 total tests)
Failing tests:
Encountered 2 failing tests in test/UniswapV3Pool.t.sol:UniswapV3PoolTest
[FAIL. Reason: InvalidTickRange()] testMintSuccess() (gas: 798561)
[FAIL. Reason: InvalidTickRange()] testSwapBuyEth() (gas: 798540)
Encountered a total of 2 failing tests, 0 tests succeeded
Beta Was this translation helpful? Give feedback.
All reactions