Paycer Pools

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

Setup

  1. Install

    git clone --recursive    git@github.com:/paycer-protocol/paycer-pools.git
    cd paycer-pools
    nvm use
    npm install
  2. set NODE_URL in env

    export NODE_URL=<eth mainnet url>
  3. Compile

    npm run compile
  4. 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_maker-compound_maker.js
  • Or run them all (but some will fail, because of state modifications to the forked chain)
npm test

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>>"

Deploy

Deployment will be done via custom hardhat task deploy-pool which behind the scene uses deploy scripts created using hardhat-deploy

Usage

  • Help

    npx hardhat help deploy-pool
  • Deploy VDAI pool

     npm run deploy -- --pool VDAI --network localhost
     or
     npx hardhat deploy-pool --pool VDAI --network localhost
  • Deploy VDAI pool with release (preferred)

     npm run deploy -- --pool VDAI --network localhost --release 3.0.5

    It will create contracts.json file at /releases/3.0.5

  • Passing any hardhat-deploy param

     npm run deploy -- --pool VDAI --network localhost --release 3.0.5 -- deploy-params '{"tags": "VDAI", gasprice: "25000000000"}'