Skip to content

Write 3 e2e tests with fork on ganache #4

@talkol

Description

@talkol
  1. Full flow sanity:
    1.a. enterPosition with $1M USDC (min $10K)
    1.b. exitPosition
    1.c. transfer the $1M USDC out to the owner
    1.d. claim COMP and transfer COMP out to the owner

  2. Multiple enters:
    2.a. enterPosition with $1M USDC (min $10K)
    2.b. Transfer new $20K USDC to the contract (to simulate COMP that was sold)
    2.c. enterPosition again with the $20K USDC
    2.d. exitPosition
    2.e. transfer the $1M+$20K out to the owner

  3. Manual exit (simulate recovery in case exitPosition fails for some unknown reason):
    3.a. enterPosition with $1M USDC (min $10K)
    3.b. Manual loop calling repayBorrow and friend functions to fully exit without calling exitPosition
    3.c. transfer the $1M USDC out to the owner

I have some example similar forked tests I wrote for ycrv strategy example that might be useful - https://github.com/defi-org-code/ycrv-strategy-test/blob/master/test/index.test.js

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions