Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pooltogether/v4-periphery
PoolTogether V4 Periphery Smart Contracts
https://github.com/pooltogether/v4-periphery
Last synced: about 2 months ago
JSON representation
PoolTogether V4 Periphery Smart Contracts
- Host: GitHub
- URL: https://github.com/pooltogether/v4-periphery
- Owner: pooltogether
- License: gpl-3.0
- Created: 2021-09-27T18:51:10.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-01-26T20:39:15.000Z (almost 2 years ago)
- Last Synced: 2024-04-23T21:42:43.316Z (9 months ago)
- Language: TypeScript
- Size: 992 KB
- Stars: 9
- Watchers: 3
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PoolTogether V4 Periphery Contracts
![Fork](https://github.com/pooltogether/v4-periphery/actions/workflows/fork.yml/badge.svg)
![Tests](https://github.com/pooltogether/v4-periphery/actions/workflows/main.yml/badge.svg)
[![Coverage Status](https://coveralls.io/repos/github/pooltogether/v4-periphery/badge.svg?branch=master)](https://coveralls.io/github/pooltogether/v4-periphery?branch=master)
[![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)Have questions or want the latest news?
Join the PoolTogether Discord or follow us on Twitter:[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/JFBPMxv5tr)
[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://twitter.com/PoolTogether_)**Documentation**
https://v4.docs.pooltogether.com**Deployments**
- [Ethereum](https://v4.docs.pooltogether.com/protocol/deployments/mainnet#mainnet)
- [Polygon](https://v4.docs.pooltogether.com/protocol/deployments/mainnet#polygon)
- [Avalanche](https://v4.docs.pooltogether.com/protocol/deployments/mainnet#avalanche)# Overview
- [PrizeDistributionFactory](/contracts/PrizeDistributionFactory.sol)
- [PrizeFlush](/contracts/PrizeFlush.sol)
- [PrizeTierHistory](/contracts/PrizeTierHistory.sol)
- [TwabRewards](/contracts/TwabRewards.sol)# Getting Started
The project is made available as a NPM package.
```sh
$ yarn add @pooltogether/v4-periphery
```The repo can be cloned from Github for contributions.
```sh
$ git clone https://github.com/pooltogether/v4-periphery
``````sh
$ yarn
```We use [direnv](https://direnv.net/) to manage environment variables. You'll likely need to install it.
```sh
cp .envrc.example .envrc
```# Testing
We use [Hardhat](https://hardhat.dev) and [hardhat-deploy](https://github.com/wighawag/hardhat-deploy)
To run unit tests:
```sh
$ yarn test
```To run coverage:
```sh
$ yarn coverage
```# Forking
Mainnet fork tests have been implemented to test the functionalities of the TWAB Rewards contract.
To start the mainnet fork RPC server, run:
```sh
$ yarn start-fork
```To run the mainnet fork tests for the TWAB Rewards contract, run:
```sh
$ yarn twab-rewards-fork
```If you wish to run both at the same time, run:
```sh
$ yarn run-twab-rewards-fork
```This command is used in the Github Actions workflow located in `.github/workflows/fork.yml`.
# Deployment
## Testnets
Deployment is maintained in a different [repo](https://github.com/pooltogether/v4-testnet).## Mainnet
Deployment is maintained in a different [repo](https://github.com/pooltogether/v4-mainnet).