Skip to content

Commit 0da6ded

Browse files
authored
Merge pull request #24 from pooltogether/fix/twab-rewards-audit-2
chore(TwabRewards): add back TwabRewards
2 parents d377653 + 318e5ac commit 0da6ded

10 files changed

+1678
-147
lines changed

README.md

+11-48
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,23 @@
1111
[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/JFBPMxv5tr)
1212
[![Twitter](https://badgen.net/badge/icon/twitter?icon=twitter&label)](https://twitter.com/PoolTogether_)
1313

14-
**Documention**<br>
15-
https://docs.pooltogether.com
14+
**Documentation**<br>
15+
- [PrizeDistributionFactory](https://v4.docs.pooltogether.com/protocol/reference/v4-periphery/PrizeDistributionFactory)
16+
- [PrizeFlush](https://v4.docs.pooltogether.com/protocol/reference/v4-periphery/PrizeFlush)
17+
- [PrizeTierHistory](https://v4.docs.pooltogether.com/protocol/reference/v4-periphery/PrizeTierHistory)
18+
- [TwabRewards](https://v4.docs.pooltogether.com/protocol/reference/v4-periphery/TwabRewards)
1619

17-
**Deplyoments**<br>
18-
- [Ethereum](https://docs.pooltogether.com/resources/networks/ethereum)
19-
- [Matic](https://docs.pooltogether.com/resources/networks/matic)
20-
21-
# Overview
22-
- [PrizeFlush](/contracts/PrizeFlush.sol)
23-
24-
The `PrizeFlush` contract wraps multiple draw completion steps: capturing/distributing interest, and automatically transferring the captured interest to PrizeDistributor. The contract is **simple in nature** and is expeced to evolve with the V4 rollout and governance requirements.
25-
26-
As the draw and prize distribution params are optimized with continual hypothesis and testing, the PoolTogether Community and Governance process can "codify" the rules for an optimal interest distribution - adding intermediary steps to fine-tuning prize models and optimal interes allocation.
27-
28-
**Core and Timelock contracts:**
29-
30-
- https://github.com/pooltogether/v4-core
31-
- https://github.com/pooltogether/v4-timelocks
20+
**Deployments**<br>
21+
- [Ethereum](https://v4.docs.pooltogether.com/protocol/reference/deployments/mainnet#mainnet)
22+
- [Polygon](https://v4.docs.pooltogether.com/protocol/reference/deployments/mainnet#polygon)
23+
- [Avalanche](https://v4.docs.pooltogether.com/protocol/reference/deployments/mainnet#avalanche)
3224

3325
# Getting Started
3426

3527
The project is made available as a NPM package.
3628

3729
```sh
38-
$ yarn add @pooltogether/pooltogether-contracts
30+
$ yarn add @pooltogether/v4-periphery
3931
```
4032

4133
The repo can be cloned from Github for contributions.
@@ -54,13 +46,11 @@ We use [direnv](https://direnv.net/) to manage environment variables. You'll li
5446
cp .envrc.example .envrv
5547
```
5648

57-
To run fork scripts, deploy or perform any operation with a mainnet/testnet node you will need an Infura API key.
58-
5949
# Testing
6050

6151
We use [Hardhat](https://hardhat.dev) and [hardhat-deploy](https://github.com/wighawag/hardhat-deploy)
6252

63-
To run unit & integration tests:
53+
To run unit tests:
6454

6555
```sh
6656
$ yarn test
@@ -71,30 +61,3 @@ To run coverage:
7161
```sh
7262
$ yarn coverage
7363
```
74-
75-
# Fork Testing
76-
77-
Ensure your environment variables are set up. Make sure your Alchemy URL is set. Now start a local fork:
78-
79-
```sh
80-
$ yarn start-fork
81-
```
82-
83-
Setup account impersonation and transfer eth:
84-
85-
```sh
86-
$ ./scripts/setup.sh
87-
```
88-
89-
# Deployment
90-
91-
## Deploy Locally
92-
93-
Start a local node and deploy the top-level contracts:
94-
95-
```bash
96-
$ yarn start
97-
```
98-
99-
NOTE: When you run this command it will reset the local blockchain.
100-

contracts/PrizeTierHistory.sol

+1-5
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ contract PrizeTierHistory is IPrizeTierHistory, Manageable {
2222
/* ============ External Functions ============ */
2323

2424
// @inheritdoc IPrizeTierHistory
25-
function push(PrizeTier calldata _nextPrizeTier)
26-
external
27-
override
28-
onlyManagerOrOwner
29-
{
25+
function push(PrizeTier calldata _nextPrizeTier) external override onlyManagerOrOwner {
3026
PrizeTier[] memory _history = history;
3127

3228
if (_history.length > 0) {

0 commit comments

Comments
 (0)