Provide the historical and analytics data for Tokenlon.
The Graph exposes a GraphQL endpoint to query the events and entities within the Tokenlon ecosytem.
Current subgraph locations:
-
Exchange: includes all Tokenlon Exchange (AMM/PMM) data
https://thegraph.com/explorer/subgraph/consenlabs/tokenlon-v5-exchange
-
Staking: includes all Tokenlon Staking (Staking/Buyback) data
https://thegraph.com/explorer/subgraph/consenlabs/tokenlon-v5-staking
Install global commands.
# NPM
$ npm install -g truffle ganache-cli
# Yarn
$ yarn global add truffle ganache-cli
Install dependencies
# NPM
$ npm install
# Yarn
$ yarn
Generate subgraph yaml for Ethereum mainnet
$ yarn prepare:mainnet
Generate subgraph yaml for Ethereum goerli
$ yarn prepare:goerli
$ yarn codegen
Writing your mapper algorithm after doing codegen under src
folder.
$ yarn build
Prerequisite:
- Go to official website and register an account.
- Get your
<access-token>
in your subgraph space.
Should execute auth command first.
$ graph auth [options] <node> <access-token>
Deploy to subgraph space.
$ yarn deploy
Deploy to testing subgraph space.
$ SUBGRAPH_USER=username yarn deploy-staging
Please use our node utility: tokenlon-v5-data.
Note: This is in on going development as well.