Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行不了 #27

Open
tianheng2017 opened this issue Mar 16, 2023 · 0 comments
Open

运行不了 #27

tianheng2017 opened this issue Mar 16, 2023 · 0 comments

Comments

@tianheng2017
Copy link

tianheng2017 commented Mar 16, 2023

Normal cases for liquidity provision and zap ins
1) User adds liquidity to LP tokens
Balance tokenA: 0.000000780625765115
Balance WBNB: 0.0
Balance tokenC: 0.0
√ User completes zapIn with tokenA (pair tokenA/tokenC) (1925ms)
2) User completes zapIn with BNB (pair BNB/tokenC)
3) User completes zapInRebalancing with BNB (pair BNB/tokenC)
Balance tokenA: 0.000000780625765115
Balance WBNB: 0.0
Balance tokenC: 0.006099644004121424
√ User completes zapInRebalancing with tokens (tokenA/tokenC) (1864ms)
Balance tokenA: 0.0
Balance WBNB: 0.0
Balance tokenC: 0.0
√ User completes zapOut to token (tokenA/tokenC) (1403ms)
4) User completes zapOut to BNB (BNB/tokenC)
√ Zap estimation fail if wrong tokens (121ms)
√ Zap estimations work as expected (115ms)
5) Cannot zap if wrong direction/tokens used

5 passing (11s)
5 failing

  1. Contract: PancakeZapV1
    Normal cases for liquidity provision and zap ins
    User adds liquidity to LP tokens:
    Error: Returned error: insufficient funds for gas * price + value
    at Context. (test\PancakeZapV1.test.ts:157:42)
    at step (test\PancakeZapV1.test.ts:33:23)
    at Object.next (test\PancakeZapV1.test.ts:14:53)
    at fulfilled (test\PancakeZapV1.test.ts:5:58)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)

  2. Contract: PancakeZapV1
    Normal cases for liquidity provision and zap ins
    User completes zapIn with BNB (pair BNB/tokenC):
    Error: Returned error: VM Exception while processing transaction: revert PancakeLibrary: INSUFFICIENT_LIQUIDITY
    at Context. (test\PancakeZapV1.test.ts:238:49)
    at step (test\PancakeZapV1.test.ts:33:23)
    at Object.next (test\PancakeZapV1.test.ts:14:53)
    at C:\Users\梦想之家\Desktop\pancake-smart-contracts-master\projects\exchange-protocol\test\PancakeZapV1.test.ts:8:71
    at new Promise ()
    at __awaiter (test\PancakeZapV1.test.ts:4:12)
    at Context. (test\PancakeZapV1.test.ts:362:24)

  3. Contract: PancakeZapV1
    Normal cases for liquidity provision and zap ins
    User completes zapInRebalancing with BNB (pair BNB/tokenC):
    Error: Returned error: VM Exception while processing transaction: revert
    at Context. (test\PancakeZapV1.test.ts:267:49)
    at step (test\PancakeZapV1.test.ts:33:23)
    at Object.next (test\PancakeZapV1.test.ts:14:53)
    at C:\Users\梦想之家\Desktop\pancake-smart-contracts-master\projects\exchange-protocol\test\PancakeZapV1.test.ts:8:71
    at new Promise ()
    at __awaiter (test\PancakeZapV1.test.ts:4:12)
    at Context. (test\PancakeZapV1.test.ts:414:24)

  4. Contract: PancakeZapV1
    Normal cases for liquidity provision and zap ins
    User completes zapOut to BNB (BNB/tokenC):
    Error: Returned error: VM Exception while processing transaction: revert
    at Context. (test\PancakeZapV1.test.ts:389:49)
    at step (test\PancakeZapV1.test.ts:33:23)
    at Object.next (test\PancakeZapV1.test.ts:14:53)
    at C:\Users\梦想之家\Desktop\pancake-smart-contracts-master\projects\exchange-protocol\test\PancakeZapV1.test.ts:8:71
    at new Promise ()
    at __awaiter (test\PancakeZapV1.test.ts:4:12)
    at Context. (test\PancakeZapV1.test.ts:577:24)

  5. Contract: PancakeZapV1
    Normal cases for liquidity provision and zap ins
    Cannot zap if wrong direction/tokens used:

    Wrong kind of exception received

    • expected - actual

    -ds-math-sub-underflow
    +Zap: Token not in LP

    at expectException (C:\Users\梦想之家\Desktop\pancake-smart-contracts-master\node_modules@openzeppelin\test-helpers\src\expectRevert.js:20:30)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.expectRevert (C:\Users\梦想之家\Desktop\pancake-smart-contracts-master\node_modules@openzeppelin\test-helpers\src\expectRevert.js:75:3)

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@tianheng2017 and others