Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

README

        



PoolTogether Brand


## 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 = 4

const daiPoolAddress = contractAddresses[CHAIN_ID].dai.prizePool
const daiPrizeStrategyAddress = contractAddresses[CHAIN_ID].dai.prizeStrategy
```