Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pooltogether/current-pool-data
Programmatically get constants data (ie. contract addresses, etc) for specific versions of the PoolTogether protocol.
https://github.com/pooltogether/current-pool-data
Last synced: about 2 months ago
JSON representation
Programmatically get constants data (ie. contract addresses, etc) for specific versions of the PoolTogether protocol.
- Host: GitHub
- URL: https://github.com/pooltogether/current-pool-data
- Owner: pooltogether
- License: mit
- Created: 2020-09-28T00:39:22.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-08-26T18:42:14.000Z (over 2 years ago)
- Last Synced: 2024-09-22T14:38:33.255Z (3 months ago)
- Language: JavaScript
- Homepage: https://pooltogether.com
- Size: 282 KB
- Stars: 5
- Watchers: 4
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Current Pool Data
Use this library to programmatically get constants data (ie. contract addresses, etc) for specific versions of the PoolTogether protocol.
###### Note:
Since anyone can create a pool the `contractAddresses` array contains only community approved pool addresses.
This doesn't publish every pool address available, you'll want to use one of the subgraphs for that:
(eg. https://thegraph.com/explorer/subgraph/pooltogether/rinkeby-staging-v3)#### Instructions:
```sh
yarn add @pooltogether/current-pool-data
``````js
import { contractAddresses } from '@pooltogether/current-pool-data'// rinkeby is 4
const CHAIN_ID = 4const daiPoolAddress = contractAddresses[CHAIN_ID].dai.prizePool
const daiPrizeStrategyAddress = contractAddresses[CHAIN_ID].dai.prizeStrategy
```