Skip to content

A generic example of ERC721 indexing with The Graph

License

Notifications You must be signed in to change notification settings

schmidsi/generic-erc721-subgraph

Repository files navigation

Generic ERC721 Subgraph

This is a generic ERC721 Subgraph implementation based on OpenZeppelins ERC721, ERC721Enumerable and ERC721Metadata contracts.

This example uses the Hashmasks contract, but it can easily be forked and pointed to another contract that follows this standard.

See playground: https://thegraph.com/explorer/subgraph/schmidsi/generic-erc721-subgraph

Fork and use your own contract

The only thing that you need to change is the subgraph.yaml and package.json.

In subgraph.yaml, change the lines indicated with # Change me. The name is the name of your token, the address is where it is deployed and startBlock is the block in which the token was deployed.

In package.json you need to search and replace schmidsi/generic-erc721-subgraph with your Subgraph ID in the form of account-name/subgraph-name. See https://thegraph.com/docs/deploy-a-subgraph#create-a-graph-explorer-account

Now you can deploy and index your token. Feel free to extend the schema.graphql and the mapping.ts

About

A generic example of ERC721 indexing with The Graph

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •