PatrickAlphaC / hardhat-nft-fcc

100 stars 139 forks source link

Error: call revert exception; VM Exception while processing transaction: reverted with reason string "ERC721: invalid token ID" #64

Closed simpleitis closed 1 year ago

simpleitis commented 1 year ago

In the last it block for the unit test for 'BasicNft'

const owner = await basicNft.ownerOf("1")

Should be replaced with

const owner = await basicNft.ownerOf("0")
PatrickAlphaC commented 1 year ago

Thanks! Could you make a PR?

simpleitis commented 1 year ago

Sure @PatrickAlphaC

66

PatrickAlphaC commented 1 year ago

Done https://github.com/PatrickAlphaC/hardhat-nft-fcc/pull/66

BowTiedHeron commented 1 year ago

just wanted to point out that this pr #71 reverses this logic @simpleitis. the reason why it was reverted is because the test was failing. it was solved by @AAYUSH-GUPTA-coder by reverting the change and by changing the pinata/sdk version to ^1.1.23

simpleitis commented 1 year ago

@BowTiedHeron But shouldn't the toke ID used be 0 only because we are only minting one token and I was facing the same error saying 'invalid token Id' and changing token id from 1 to 0 solved it. Maybe there are some changes in the actual contract or something