PatrickAlphaC / hardhat-nft-fcc

100 stars 139 forks source link

corrected owner logic #71

Closed AAYUSH-GUPTA-coder closed 1 year ago

AAYUSH-GUPTA-coder commented 1 year ago

Change const owner = await basicNft.ownerOf("0") to const owner = await basicNft.ownerOf("1")

To solve the below error

Error Image: pat1

Error Message:

Error: call revert exception; VM Exception while processing transaction: reverted with reason string "ERC721: invalid token ID" [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="ownerOf(uint256)", data="0x08c379a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000184552433732313a20696e76616c696420746f6b656e2049440000000000000000", errorArgs=["ERC721: invalid token ID"], 
errorName="Error", errorSignature="Error(string)", reason="ERC721: invalid token ID", code=CALL_EXCEPTION, version=abi/5.7.0)

Corrected code Image: pat2

AAYUSH-GUPTA-coder commented 1 year ago

Change pinata/sdk version to ^1.1.23

In Version "@pinata/sdk": "^2.1.0" I am facing this issue pinata

It is solved by using the version ^1.1.23