Skip to content

Polymarket/resolution-subgraph

Repository files navigation

resolutions-subgraph

Codegen

Run the following command to generate the generated folder:

yarn codegen

Environment Variables

Create a .env file with the following variables:

MATIC_RPC_URL=

Local Development

Run graph node locally

docker compose up

Restart graph node and clear volumes

docker compose down
sudo docker rm resolution-subgraph-graph-node-1 && sudo docker rm resolution-subgraph-ipfs-1 && sudo docker rm resolution-subgraph-postgres-1 && sudo docker rm resolution-subgraph-ganache-1

Create and deploy subgraph

While local subgraph node is running run:

yarn create-local
yarn deploy-local

Access the GraphQL editor at:

http://localhost:8000/subgraphs/name/resolutions-subgraph/graphql

Example query:

query marketResolutions {
  marketResolutions {
    id
    author
    ancillaryData
    lastUpdateTimestamp
    status
    wasDisputed
    proposedPrice
    reproposedPrice
    price
    updates
  }
}

Goldsky

Build the subgraph with yarn build and then run the following to deploy:

goldsky subgraph deploy resolutions-subgraph/<version> --path .

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •