Skip to content

Latest commit

 

History

History
73 lines (44 loc) · 1.82 KB

README.md

File metadata and controls

73 lines (44 loc) · 1.82 KB

PooltogetherV4 Substreams

  • This repo contains example substream implementation for pooltogether set of smart contracts.

  • This is mainly for demonstration purposes but should still work.

  • Pooltogether is a collection of smart contracts https://dev.pooltogether.com/protocol/V4/deployments/mainnet.

  • Each folder focuses on the substream for each contract.

Prize DistributorV4

Pack & Build

  • make pack to create .spkg file.

  • graph build

Deploy on subgraph studio

  • create a subgraph https://thegraph.com/explorer

  • you will be given a list of steps to follow, you only need to follow these;

  • graph auth --studio [studio-key] to authenticate

  • graph deploy --studio [studio-name]

Deploy on hosted service

  • create a hosted service account https://thegraph.com/hosted-service

  • create a subgraph from you dashboard,

  • you will be given a list of steps to follow, you only need to follow these;

  • graph auth --product hosted-service [studio-key] to authenticate

  • graph deploy --product hosted-service [studio-name]

Sample Query

{
  aggregates(first: 5) {
    id
    totalClaimed
  }
  accounts(first: 5) {
    id
    totalClaimed
    draws {
      id
      totalClaimed
      firstClaimedAtTimestamp
      lastClaimedAtTimestamp
    }
  }
}