Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix fetchERC721 #5

Merged
merged 1 commit into from
Aug 6, 2021
Merged

Fix fetchERC721 #5

merged 1 commit into from
Aug 6, 2021

Conversation

freeatnet
Copy link
Contributor

Remove re-declaration of contract, so that the newly created instance is returned by the function.

This bug manifests itself as the subgraph failing to index transfer events.

Steps to reproduce the bug

  1. Deploy a sample mintable ERC721 contract generated from the OZ wizard, mint a few tokens.
  2. Deploy the subgraph.
  3. Run the following query: https://gist.github.com/freeatnet/99884eb7b698fe4a010bb1744ff5d812#file-erc721-graphql

Expected
erc721Contracts returns the deployed contract, along with its name and symbol; erc721Transfers field returns minting transactions; accounts.ERC721tokens and accounts.ERC721transferToEvent fields are populated appropriately.

Observed
erc721Contracts returns the deployed contract, along with its name and symbol; however, erc721Transfers, accounts.ERC721tokens, and accounts.ERC721transferToEvent are empty.

Remove re-declaration of `contract`, so that the newly created instance is returned by the function.
@Amxx Amxx merged commit fbfbd99 into OpenZeppelin:main Aug 6, 2021
@Amxx
Copy link
Collaborator

Amxx commented Aug 6, 2021

Thank you for finding this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants