Skip to content

This repository contains the backend code for an NFT Marketplace built using TheGraph. It enables efficient querying and indexing of blockchain data to support various functionalities within the marketplace.

Notifications You must be signed in to change notification settings

PsychoPunkSage/Blockchain__NFTMarketplace_theGraph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

49867a9 · Apr 2, 2024

History

3 Commits
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023
Apr 2, 2024
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023
Mar 10, 2023

Repository files navigation

Graph NFT Marketplace

Quickstart

  1. Install Subgraph CLI
yarn global add @graphprotocol/graph-cli
  1. Log into the graph UI and create a new Subgraph.

Use Goerli as the network.

  1. Initialize Subgraph
graph init --studio nft-marketplace
  1. Authenticate CLI
graph auth  --studio YOUR_DEPLOY_KEY_HERE
  1. Update your subgraph.yaml
  • Update the address with your NftMarketplace Address
  • Update the startBlock with the block right before your contract was deployed
  1. Build graph locally
graph codegen && graph build
  • graph codegen: Generates code in the generated folder based on your schema.graphql
  • graph build: Generates the build that will be uploaded to the graph
  1. Deploy subgraph

Replace VERSION_NUMBER_HERE with a version number like 0.0.1.

graph deploy --studio nft-marketplace -l VERSION_NUMBER_HERE
  1. View your UI

Back in your hardhat project, mint and list an NFT with:

yarn hardhat run scripts/mint-and-list-item.js --network goerli

About

This repository contains the backend code for an NFT Marketplace built using TheGraph. It enables efficient querying and indexing of blockchain data to support various functionalities within the marketplace.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published