Skip to content

Latest commit

 

History

History
213 lines (134 loc) · 6.53 KB

README.md

File metadata and controls

213 lines (134 loc) · 6.53 KB

PoolTogether Brand

PoolTogether V5 VRGDA Claimer

Code Coverage built-with openzeppelin GPLv3 license

Have questions or want the latest news?
Join the PoolTogether Discord or follow us on Twitter:

Discord Twitter

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 to compile and test contracts
  • direnv to handle environment variables
  • 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 is used to run lint-staged and tests when committing.

Prettier is used to format TypeScript and Solidity code. Use it by running:

npm run format

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

For the coverage to work, you will need to setup the MAINNET_RPC_URL repository secret in the settings of your Github repository.

PoolTogether Brand

PoolTogether V5 VRGDA Claimer

Code Coverage built-with openzeppelin GPLv3 license

Have questions or want the latest news?
Join the PoolTogether Discord or follow us on Twitter:

Discord Twitter

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 to compile and test contracts
  • direnv to handle environment variables
  • 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 is used to run lint-staged and tests when committing.

Prettier is used to format TypeScript and Solidity code. Use it by running:

npm run format

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

For the coverage to work, you will need to setup the MAINNET_RPC_URL repository secret in the settings of your Github repository.