Subgraph for querying NFTs
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
command -v nvm
npm install -g @graphprotocol/graph-cli
graph init --product hosted-service <GITHUB_USER>/
yarn install
yarn codegen
graph auth --product hosted-service <ACCESS_TOKEN>
graph deploy --product hosted-service <GITHUB_USER>/
✔ Protocol · ethereum ✔ Subgraph name · jesse042811/Foundationsubgraph ✔ Directory to create the subgraph in · Foundationsubgraph ✔ Ethereum network · mainnet ✔ Contract address · 0xc9fe4ffc4be41d93a1a7189975cd360504ee361a ✔ Fetching ABI from Etherscan ✔ Contract Name · Token
-
Run
graph auth
to authenticate with your deploy key. -
Type
cd Foundationsubgraph
to enter the subgraph. -
Run
npm run deploy
to deploy the subgraph.