-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dylan DesRosier
committed
Jun 26, 2023
1 parent
a3f1c7f
commit a48b7b3
Showing
1 changed file
with
212 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,213 @@ | ||
# PoolTogether V5 VRGDA Prize Claimer | ||
<p align="center"> | ||
<a href="https://github.com/pooltogether/pooltogether--brand-assets"> | ||
<img src="https://github.com/pooltogether/pooltogether--brand-assets/blob/977e03604c49c63314450b5d432fe57d34747c66/logo/pooltogether-logo--purple-gradient.png?raw=true" alt="PoolTogether Brand" style="max-width:100%;" width="400"> | ||
</a> | ||
</p> | ||
|
||
[![Tests with 100% Coverage](https://github.com/pooltogether/v5-vrgda-claimer/actions/workflows/coverage.yml/badge.svg)](https://github.com/pooltogether/v5-vrgda-claimer/actions/workflows/coverage.yml) | ||
# PoolTogether V5 VRGDA Claimer | ||
|
||
[![Code Coverage](https://github.com/pooltogether/v5-vrgda-claimer/actions/workflows/coverage.yml/badge.svg)](https://github.com/pooltogether/v5-vrgda-claimer/actions/workflows/coverage.yml) | ||
[![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/) | ||
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html) | ||
|
||
<strong>Have questions or want the latest news?</strong> | ||
<br/>Join the PoolTogether Discord or follow us on Twitter: | ||
|
||
[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://pooltogether.com/discord) | ||
[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://twitter.com/PoolTogether_) | ||
|
||
## Overview | ||
|
||
In PoolTogether V5 prizes are awarded every "Draw". When a user wins a prize a transaction needs to be submitted to claim the prize before the next "Draw" occurs otherwise it will expire. The VRGDA Claimer is an incentivization mechanism the allows third parties to claim prizes on behalf of the prize winner for a fee. | ||
|
||
- Prizes come from the Prize Pool. | ||
- All depositors in Vaults that have contributed yield through a Liquidator recently are elgigible to win a prize. | ||
|
||
## Development | ||
|
||
### Installation | ||
|
||
You may have to install the following tools to use this repository: | ||
|
||
- [Foundry](https://github.com/foundry-rs/foundry) to compile and test contracts | ||
- [direnv](https://direnv.net/) to handle environment variables | ||
- [lcov](https://github.com/linux-test-project/lcov) to generate the code coverage report | ||
|
||
Install dependencies: | ||
|
||
``` | ||
npm i | ||
``` | ||
|
||
### Env | ||
|
||
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 | ||
``` | ||
|
||
### Compile | ||
|
||
Run the following command to compile the contracts: | ||
|
||
``` | ||
npm run compile | ||
``` | ||
|
||
### Coverage | ||
|
||
Forge is used for coverage, run it with: | ||
|
||
``` | ||
npm run coverage | ||
``` | ||
|
||
You can then consult the report by opening `coverage/index.html`: | ||
|
||
``` | ||
open coverage/index.html | ||
``` | ||
|
||
### Code quality | ||
|
||
[Husky](https://typicode.github.io/husky/#/) is used to run [lint-staged](https://github.com/okonet/lint-staged) and tests when committing. | ||
|
||
[Prettier](https://prettier.io) is used to format TypeScript and Solidity code. Use it by running: | ||
|
||
``` | ||
npm run format | ||
``` | ||
|
||
[Solhint](https://protofire.github.io/solhint/) is used to lint Solidity files. Run it with: | ||
|
||
``` | ||
npm run hint | ||
``` | ||
|
||
### Tests | ||
|
||
Test names including `SLOW` will be skipped on default test runs and need to be explicitly run. | ||
|
||
### CI | ||
|
||
A default Github Actions workflow is setup to execute on push and pull request. | ||
|
||
It will build the contracts and run the test coverage. | ||
|
||
You can modify it here: [.github/workflows/coverage.yml](.github/workflows/coverage.yml) | ||
|
||
For the coverage to work, you will need to setup the `MAINNET_RPC_URL` repository secret in the settings of your Github repository. | ||
|
||
<p align="center"> | ||
<a href="https://github.com/pooltogether/pooltogether--brand-assets"> | ||
<img src="https://github.com/pooltogether/pooltogether--brand-assets/blob/977e03604c49c63314450b5d432fe57d34747c66/logo/pooltogether-logo--purple-gradient.png?raw=true" alt="PoolTogether Brand" style="max-width:100%;" width="400"> | ||
</a> | ||
</p> | ||
|
||
# PoolTogether V5 VRGDA Claimer | ||
|
||
[![Code Coverage](https://github.com/pooltogether/v5-vrgda-claimer/actions/workflows/coverage.yml/badge.svg)](https://github.com/pooltogether/v5-vrgda-claimer/actions/workflows/coverage.yml) | ||
[![built-with openzeppelin](https://img.shields.io/badge/built%20with-OpenZeppelin-3677FF)](https://docs.openzeppelin.com/) | ||
[![GPLv3 license](https://img.shields.io/badge/License-GPLv3-blue.svg)](http://perso.crans.org/besson/LICENSE.html) | ||
|
||
<strong>Have questions or want the latest news?</strong> | ||
<br/>Join the PoolTogether Discord or follow us on Twitter: | ||
|
||
[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://pooltogether.com/discord) | ||
[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://twitter.com/PoolTogether_) | ||
|
||
## Overview | ||
|
||
In PoolTogether V5 prizes are awarded every "Draw". When a user wins a prize a transaction needs to be submitted to claim the prize before the next "Draw" occurs otherwise it will expire. The VRGDA Claimer is an incentivization mechanism the allows third parties to claim prizes on behalf of the prize winner for a fee. | ||
|
||
- Prizes come from the Prize Pool. | ||
- All depositors in Vaults that have contributed yield through a Liquidator recently are elgigible to win a prize. | ||
|
||
## Development | ||
|
||
### Installation | ||
|
||
You may have to install the following tools to use this repository: | ||
|
||
- [Foundry](https://github.com/foundry-rs/foundry) to compile and test contracts | ||
- [direnv](https://direnv.net/) to handle environment variables | ||
- [lcov](https://github.com/linux-test-project/lcov) to generate the code coverage report | ||
|
||
Install dependencies: | ||
|
||
``` | ||
npm i | ||
``` | ||
|
||
### Env | ||
|
||
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 | ||
``` | ||
|
||
### Compile | ||
|
||
Run the following command to compile the contracts: | ||
|
||
``` | ||
npm run compile | ||
``` | ||
|
||
### Coverage | ||
|
||
Forge is used for coverage, run it with: | ||
|
||
``` | ||
npm run coverage | ||
``` | ||
|
||
You can then consult the report by opening `coverage/index.html`: | ||
|
||
``` | ||
open coverage/index.html | ||
``` | ||
|
||
### Code quality | ||
|
||
[Husky](https://typicode.github.io/husky/#/) is used to run [lint-staged](https://github.com/okonet/lint-staged) and tests when committing. | ||
|
||
[Prettier](https://prettier.io) is used to format TypeScript and Solidity code. Use it by running: | ||
|
||
``` | ||
npm run format | ||
``` | ||
|
||
[Solhint](https://protofire.github.io/solhint/) is used to lint Solidity files. Run it with: | ||
|
||
``` | ||
npm run hint | ||
``` | ||
|
||
### Tests | ||
|
||
Test names including `SLOW` will be skipped on default test runs and need to be explicitly run. | ||
|
||
### CI | ||
|
||
A default Github Actions workflow is setup to execute on push and pull request. | ||
|
||
It will build the contracts and run the test coverage. | ||
|
||
You can modify it here: [.github/workflows/coverage.yml](.github/workflows/coverage.yml) | ||
|
||
For the coverage to work, you will need to setup the `MAINNET_RPC_URL` repository secret in the settings of your Github repository. |