Lesson 11 createCollectible does not seem to create (tokenCounter still 0) #801
-
I downloaded the code from Patrick's repo, and for the AdvancedCollectible contract, I tried running deploy_and_create.py --network rinkeby. On etherscan, the deployed contract showed the createCollectible transaction was successful, but when I tried to read the tokenCounter (like what Patrick did in the video), the tokenCounter returned 0 instead of 1. Did anyone encounter this issue too? Here's an example of the deployed contract https://rinkeby.etherscan.io/address/0x60e25CA8015C9D58AB400539E20BE291D8D57741#readContract |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hours later, when I checked the contract transactions and tokenCounter again, it seems to be updated to 2 now. I think it's because the Chainlink VRFCoordinator takes some time to call the callback function fulfillRandomness that will mint the NFT. Hence there's some delay between createCollectible and actually minting the token. |
Beta Was this translation helpful? Give feedback.
Hours later, when I checked the contract transactions and tokenCounter again, it seems to be updated to 2 now.
I think it's because the Chainlink VRFCoordinator takes some time to call the callback function fulfillRandomness that will mint the NFT. Hence there's some delay between createCollectible and actually minting the token.