- Install
yarn
- Update your
subgraph.yaml
- Update the
address
with your NftMarketplace Address - Update the
startBlock
with the block right before your contract was deployed
- Build graph locally
graph codegen && graph build
graph codegen
: Generates code in thegenerated
folder based on yourschema.graphql
graph build
: Generates the build that will be uploaded to the graph
- Deploy subgraph
make deploy NAME=<subgraph_name>
Delete the :8000 from the link printed to the console and use it.
- Log into the graph UI and create a new Subgraph.
Use Ethereum Sepolia
or Optimism Sepolia
as the network.
- Initialize Subgraph
graph init --studio <subgraph_name>
- Authenticate CLI
graph auth --studio YOUR_DEPLOY_KEY_HERE
- Update your
subgraph.yaml
- Update the
address
with your NftMarketplace Address - Update the
startBlock
with the block right before your contract was deployed
- Build graph locally
graph codegen && graph build
graph codegen
: Generates code in thegenerated
folder based on yourschema.graphql
graph build
: Generates the build that will be uploaded to the graph
- Deploy subgraph
Replace VERSION_NUMBER_HERE
with a version number like 0.0.1
.
graph deploy --studio <subgraph_name> -l VERSION_NUMBER_HERE