nft-marketplace-box
nft-marketplace-box copied to clipboard
TypeError: Cannot read properties of undefined (reading 'length')
Hi,
I wonder why this error happens when creating a NFT:
pages/create-and-list-nft.js (82:40) @ _callee$
80 | let listingFee = await marketPlaceContract.methods.LISTING_FEE().call()
81 | listingFee = listingFee.toString()
> 82 | boredPetsContract.methods.mint(url).send({ from: accounts[0] }).on('receipt', function (receipt) {
| ^
83 | console.log('minted');
84 | // List the NFT
85 | const tokenId = receipt.events.NFTMinted.returnValues[0];