This project defines subgraph for partybid v2.
Install Graph CLI globally: yarn global add @graphprotocol/graph-cli
Download subgraph codes: git clone https://github.com/gzliudan/partybid-subgraph
Install dependencies: cd partybid-subgraph && yarn
Instructions: https://thegraph.com/docs/developer/quick-start#local-development
- yarn global add ganache-cli
- ganache-cli -h 0.0.0.0
- Install Docker and Docker Compose
- Clone Graph Node:
git clone https://github.com/graphprotocol/graph-node/
- Enter the directory:
cd graph-node/docker
- For Linux only:
./setup.sh
- Start a local Graph Node:
sudo docker-compose up
Notice: delete the data directory after tear down the graph node
docker-compose down
rm -rf ./data
- Deploy PartBid contracts Locally, get addresses of contracts
- update file networks/local.json in partybid-subgraph directory
- Enter direcory:
cd partybid-subgraph
- Deploy:
yarn clean && yarn prepare:local && graph codegen:local && yarn create:local && yarn deploy:local
Instructions: https://thegraph.com/docs/legacyexplorer/deploy-subgraph-hosted
# Only run once
graph auth --product hosted-service <ACCESS_TOKEN>
- rinkeby:
yarn clean && yarn prepare:rinkeby && yarn codegen:rinkeby && yarn deploy:rinkeby
- mainnet:
yarn clean && yarn prepare:mainnet && yarn codegen:mainnet && yarn deploy:mainnet
- Entities
- Quickly query:
- Programmatically query:
This project is licensed under the MIT license.