Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

vesperfi/vesper-pools-v2

Repository files navigation

Vesper Pools V2

Please read and get familiar with Vesper. This repository contains set of smart contracts and test cases of Vesper pools.

Setup

  1. Install

    git clone --recursive https://github.com/vesperfi/vesper-pools-v2.git
    cd vesper-pools-v2
    npm install
    npm run compile
  2. set NODE_URL in env

    export NODE_URL=<eth mainnet url>
  3. Test

Note: These tests will fork the mainnet as required in step 3. It is not recommended to run all tests at once, but rather to specify a single file.

  • Run single file
npm test test/veth-aave.js
  • Or run them all (but some will fail, because of state modifications to the forked chain)
npm test

Mainnet fork deployment

Fork mainnet using ganache

npm run fork

Run test with coverage

Coverage will launch its own in-process ganache server, so all you need to run is below command.

npm run coverage

Coverage for one file

npm run coverage -- --testfiles "<<filename>>"

If you get heap memory error in solidity coverage then try below command

   node --max-old-space-size=4096 ./node_modules/.bin/hardhat coverage --testfiles "fileName"