# @pooltogether/v4-periphery

> PoolTogether V4 Periphery

Latest version **1.4.0** (published 2023-01-25) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install @pooltogether/v4-periphery
pnpm add @pooltogether/v4-periphery
yarn add @pooltogether/v4-periphery
bun add @pooltogether/v4-periphery
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; large bundle.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2023-01-25 |
| First published | 2021-10-07 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 16.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | asselstine, chuckbergeron, dylandesrosier, pierrick |

## Links

- npm: https://www.npmjs.com/package/@pooltogether/v4-periphery
- npm.io page: https://npm.io/package/@pooltogether/v4-periphery

## Recent versions

- 1.4.0 (latest) — 2023-01-25
- 1.4.0-beta.2 (beta) — 2023-01-20
- 1.4.0-beta.1 — 2023-01-20
- 1.3.0 — 2022-12-13
- 1.3.0-beta.1 — 2022-11-07
- 1.2.6 — 2022-09-15
- 1.2.6-beta.1 — 2022-08-12
- 1.2.5 — 2022-06-02
- 1.2.4 — 2022-06-02
- 1.2.3 — 2022-04-04
- 1.2.2 — 2022-03-24
- 1.2.1 — 2022-03-24
- 1.2.0 — 2022-01-20
- 1.1.0 — 2021-12-20
- 1.1.0-beta.1 — 2021-12-06
- … 10 more at https://npm.io/package/@pooltogether/v4-periphery/versions

## 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)

<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://discord.gg/JFBPMxv5tr)
[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://twitter.com/PoolTogether_)

**Documentation**<br>
https://v4.docs.pooltogether.com

**Deployments**<br>
- [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).

---
_Source: https://npm.io/package/@pooltogether/v4-periphery · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
