PoolTogether Yield Source that uses [Badger WBTC] to generate yield.
Follow Installation instructions.
yarn deploy <network_name>
The deployment script can be found in deploy/deploy.ts
.
Clone this repository and enter the directory.
Install dependencies:
yarn
This project uses Yarn 2, dependencies should get installed pretty quickly.
We use direnv to manage environment variables. You'll likely need to install it.
Copy .envrc.example
and write down the env variables needed to run this project.
cp .envrc.example .envrc
Once your env variables are setup, load them with:
direnv allow
We use the Hardhat ecosystem to test and deploy our contracts.
To run unit tests:
yarn test
To run solhint and tests:
yarn verify
To run coverage:
yarn coverage
Before deploying, you can make sure your implementation works by deploying a Yield Source Prize Pool on a fork of Mainnet.
Start Mainnet fork in a terminal window with the command:
yarn start-fork
In another window, start the scripts to deploy and create a Badger Wbtc Yield Source Prize Pool, deposit WBTC into it, award the prize and withdraw.
yarn run-fork
Once deployment is done, you can verify your contracts on Etherscan by typing:
yarn verify <NETWORK_NAME>
Prettier is used to format TypeScript code. Use it by running:
yarn format
Solhint is used to lint Solidity files. Run it with:
yarn hint
TypeChain is used to generates types for scripts and tests. Generate types by running:
yarn typechain