NEXT_PUBLIC_ENVIRONMENT="testnet" || "local"
NEXT_PUBLIC_POLY_URL=<Infura Mumbai Endpoint>
NEXT_PUBLIC_PROJECT_ID=<Infura IPFS Project ID>
NEXT_PUBLIC_PROJECT_SECRET=<Infura IPFS Project Secret>
NEXT_PUBLIC_PK=<private key>
- Install the Graph CLI
$ npm install -g @graphprotocol/graph-cli
# or
$ yarn global add @graphprotocol/graph-cli
- Initialize using the deployed contract address
$ graph init --from-contract your-contract-address \
--network mumbai --contract-name Blog --index-events
- Run
graph codegen
to generate code from your GraphQL schema.
- Run
graph build
to build.
- Get Access Key from the Graph dashboard and then run
graph auth
- To deploy the subgraph, run
yarn deploy
from within the subgraph directory.