Endaoment has a GraphQL API Endpoint hosted by The Graph called a subgraph for indexing and organizing data from the Endaoment smart contracts.
This subgraph can be used to query Endaoment data.
Subgraph information is serviced by a decentralized group of server operators called Indexers.
To learn more about the Endaoment’s smart contract, please read this documentation.
The schema of GraphQL entities available is defined in /schema.graphql
.
Install dependencies with yarn install
Run tests with yarn test
This section covers how to spin up a local Indexer node with the Endaoment subgraph.
Docker is installed and running.
Docker has at least 10 GB of memory assigned to it.
If you are running this repository on a Mac M1, manually build the graph node docker image.
Create a .env
file at the root of the project using the .env.model
file as a reference and fill in the necessary values.
Spin up a forked hardhat node with yarn hardhat
Run yarn docker-up
Run yarn create-local
to reserve the name for the subgraph on your local node.
Run yarn deploy-local
to deploy the subgraph code.
Once the latest block has been indexed, the URL made available on the deployment step will start serving up-to-date requests.
If you made changes to the subgraph and wish to see it reflected in the local node, run:
This section covers a few examples of queries that can be run against the Endaoment subgraph.
returns
returns
returns
Endaoment has a GraphQL API Endpoint hosted by The Graph called a subgraph for indexing and organizing data from the Endaoment smart contracts.
This subgraph can be used to query Endaoment data.
Subgraph information is serviced by a decentralized group of server operators called Indexers.
To learn more about the Endaoment’s smart contract, please read this documentation.
The schema of GraphQL entities available is defined in /schema.graphql
.
Install dependencies with yarn install
Run tests with yarn test
This section covers how to spin up a local Indexer node with the Endaoment subgraph.
Docker is installed and running.
Docker has at least 10 GB of memory assigned to it.
If you are running this repository on a Mac M1, manually build the graph node docker image.
Create a .env
file at the root of the project using the .env.model
file as a reference and fill in the necessary values.
Spin up a forked hardhat node with yarn hardhat
Run yarn docker-up
Run yarn create-local
to reserve the name for the subgraph on your local node.
Run yarn deploy-local
to deploy the subgraph code.
Once the latest block has been indexed, the URL made available on the deployment step will start serving up-to-date requests.
If you made changes to the subgraph and wish to see it reflected in the local node, run:
This section covers a few examples of queries that can be run against the Endaoment subgraph.
returns
returns
returns