Lesson 15 : Subgraph mapping error #4888
-
Hello guys, I am facing an issue here after running the mint-and-list script to the goerli testnet. Here are all the informations
Not sure exactly where this could come from, it's not very easy to understand it. Still trying to find the issue but if you have an idea that would be much appreciated. Thank you for your help, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hi @NicolasMazzoleni. These errors in the subgraph logs can sometimes be quite enigmatic. In the code for Except that there is a little issue right here in your code, line if (!activeItem) {
new ActiveItem(getIdFromEventParams(event.params.tokenId, event.params.nft))
} See how the newly created Let me know if it works correctly after that. |
Beta Was this translation helpful? Give feedback.
Hi @NicolasMazzoleni. These errors in the subgraph logs can sometimes be quite enigmatic.
In the code for
handleItemListed
insrc/nft-marketplace.ts
, it seems like there was an unexpected null entity. Which is weird because you made sure to load theactiveItem
, or create it if it doesn't exist.Except that there is a little issue right here in your code, line
62
:See how the newly created
ActiveItem
is never assigned to the variableactiveItem
? I believe it's just a typo, as you did it correctly in the other functions.Let me know if it works correctly after that.