Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pooltogether/pooltogether-prizestrategy-upkeep
Contracts that provide automation of prize pool award functions
https://github.com/pooltogether/pooltogether-prizestrategy-upkeep
Last synced: about 2 months ago
JSON representation
Contracts that provide automation of prize pool award functions
- Host: GitHub
- URL: https://github.com/pooltogether/pooltogether-prizestrategy-upkeep
- Owner: pooltogether
- Created: 2021-02-19T01:37:07.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-24T22:00:33.000Z (over 3 years ago)
- Last Synced: 2024-04-23T21:42:38.608Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 1.16 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# PoolTogether PrizePool Upkeep
[![Coverage Status](https://coveralls.io/repos/github/pooltogether/pooltogether-operations-contracts/badge.svg?branch=main)](https://coveralls.io/github/pooltogether/pooltogether-operations-contracts?branch=main)
![Tests](https://github.com/pooltogether/pooltogether-prizepool-upkeep/actions/workflows/main.yml/badge.svg)PoolTogether Operations contracts is PoolTogether's integration with ChainLinks upkeep system, [currently in beta](https://docs.chain.link/docs/kovan-keeper-network-beta/).
## How it works
The goal of this system is to fully automate the awarding of the PoolTogether governance owned prize pools.
A registry of these prize pools exists (as an Ownable MappedSinglyLinkedList) and the prize strategy for each prize pool checked every block (`canStartAward()` and `canCompleteAward()`) to see if upkeep is required.
If upkeep is required then either `startAward()` or `completeAward()` are called on the prize pool.
To prevent out-of-gas situations, an owner updatable `upkeepBatchSize` is maintained to prevent attempting to award too many prize strategies in the same transaction.
An owner updatable `upkeepMinimumBlockInterval` is also maintained so as to mitigate multiple `performUpkeep()` transactions within the same block - if a transaction is to be included in the same block, it will revert.
# Installation
Install the repo and dependencies by running:
`yarn`## Deployment
These contracts can be deployed to a network by running:
`yarn deploy `# Testing
Run the unit tests locally with:
`yarn test`## Coverage
Generate the test coverage report with:
`yarn coverage`