PatrickAlphaC/nft-mix

Stuck on TokenID 0 is ...

Langer004 opened this issue · 2 comments

So when i go to deploy my NFT no matter how many times i deploy it comes back as tokenId is 0, like my token counter is not adding one.

function fulfillRandomness(bytes32 requestId, uint256 randomNumber) internal override{
address hyenaOwner = requestIdToSender[requestId];
string memory tokenURI = requestIdToTokenURI[requestId];
uint256 newItemId = tokenCounter;
_safeMint(hyenaOwner, newItemId);
_setTokenURI(newItemId, tokenURI);
Hyena status = Hyena(randomNumber % 3);
tokenIdToHyena[newItemId] = status;
requestIdToTokenId[requestId] = newItemId;
tokenCounter = tokenCounter + 1;

That is the section saying it needs to me incremented by one, so I dont understand the issue, i am also getting this error in my terminal when i run the deploy script,

....local\pipx\venvs\eth-brownie\lib\site-packages\brownie\network\event.py:243: UserWarning: 0x01BE23585060835E02B77ef475b0Cc51aA1e0709: Event log contains more topics than expected for the given ABI - this is usually because an event argument is incorrectly marked as indexed

any insight would be greatly appreciated.,

also should note I am reaching timeout for listen for event.

so token Id is increasing, BUT i am still getting the UserWarning is it a big issue?

With this information, I don't think I have enough to triage. Are all your local tests passing?

If you are reaching timeout then that is the likely reason.