Please read and get familiar with Paycer. This repository contains set of smart contracts and test cases of Paycer pools.
-
Install
git clone --recursive git@github.com:/paycer-protocol/paycer-pools.git cd paycer-pools nvm use npm install
-
set NODE_URL in env
export NODE_URL=<eth mainnet url>
-
Compile
npm run compile
-
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
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>>"
Deployment will be done via custom hardhat task deploy-pool
which behind the scene uses deploy scripts created using hardhat-deploy
-
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
paramnpm run deploy -- --pool VDAI --network localhost --release 3.0.5 -- deploy-params '{"tags": "VDAI", gasprice: "25000000000"}'