-
archive : Archived contracts & tests already deployed on the mainnet
-
contracts : Convergence Protocol
- interfaces : Smart Contract interfaces
- mock : Mocked contracts, ONLY FOR TESTING PURPOSE
- poc : POC for Mainnet, ONLY FOR TESTING PURPOSE
- utils : Libraries used in the project
- Any other folder sorts contracts per feature
-
docs : Generated doc by hardhat-docgen
-
scripts : Deployment & utility scripts interacting with contracts **DeployHelper.js** containing the deployment script context
-
tasks : Hardhat tasks
-
technical-docs : Sequential diagrams & Description of complex functions
-
test : Unit & Integration testing. TestHelper containing the deployment script context
-
utils : Utility classes & functions
As for now, the install with NPM is broken by hardhat-ethernal
dependency
To install dependencies, please use yarn
yarn
npm run mainnet-forking
Unit testing are located in test
folder.
To run the full test :
npm run test
Single test:
npm run test --grep path/to/file
Entire folder:
npm run test --grep path/to/folder/**
If you have 15 min in front of you, run the coverage with:
npm run coverage
Once the local network that forks the mainnet is started, run the bond deployment script. This script is handling the deployment of the all the base (controlTower, MockedERC20) As the mainnet is forked, we are also creating the liquid pools on UNISWAP
npm run deploy-bonds-local
OR if on CVG network with ethernal
npm run deploy-bonds-ethernal
Refers to tasks.md
to view the task associated to bonds
npx hardhat size-contracts
npm run deploy-protocol-local
OR if on CVG network with ethernal
npm run deploy-protocol-cvg
clean contracts after use
npm run clean-contracts