Skip to content

Latest commit

 

History

History
35 lines (26 loc) · 1.54 KB

README.md

File metadata and controls

35 lines (26 loc) · 1.54 KB

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