Please read and get familiar with Vesper. This repository contains set of smart contracts and test cases of Vesper pools.
-
Install
git clone --recursive https://github.com/vesperfi/vesper-pools.git cd vesper-pools npm install npm run truffle compile
-
set NODE_URL in env
export NODE_URL=<eth mainnet url>
-
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
Fork mainnet using ganache
npm run fork
Coverage will launch its own in-process ganache server, so all you need to run is below command.
npm run coverage
If you get heap memory error in solidity coverage then try below command
node --max-old-space-size=4096 ./node_modules/.bin/truffle run coverage