SubGraph for indexing Colony on chain events and providing key colony network metrics.
First, clone this repository :)
Pick the right node version (as seen in .nvmrc):
nvm useInstall all dependencies:
npm installThis project depends on external libraries, so after cloning, they need to be provisioned:
npm run provisionBuild and deploy the subgraph locally
npm run codegen
npm run create-local
npm run deploy-local
Build and deploy the subgraph to The Graphs hosted service
npm run deploy-network
Request to query errors while deployed
curl --location --request POST 'https://api.thegraph.com/index-node/graphql' --data-raw '{"query":"{ indexingStatusForPendingVersion(subgraphName: \"<SUBGRAPH_USERNAME>/<SUBGRAPH_NAME>\") { subgraph fatalError { message } nonFatalErrors { message } } }"}'
Source address: 0x78163f593D1Fa151B4B7cacD146586aD2b686294 (Note: Ensure this is in subgraph.yaml) Starting block: 11800000
{
colonyMetricsDailies(first: 5, orderBy: date, orderDirection: desc) {
id
date
colonies
newColonies
domains
totalTokens
totalUnlockedTokens
}
colonyMetrics(id: 1) {
id
colonies
domains
totalTokens
totalUnlockedTokens
}
votingReputationExtensions(id: 1) {
id
installs
uninstalled
initialised
motions
motionsStaked
}
colonies(first: 5, orderBy: created, orderDirection: desc) {
id
created
}
}