Closed NandanNNN closed 10 months ago
@PatrickAlphaC can you please help here?
Your hint is here: ERC721InvalidReceiver
What does MintBasicNft::onERC721Received
do?
I found the issue. Actually i didn't broadcasted mintNFT function in interactions.s.sol . Thanks a lot @PatrickAlphaC for taking out time to look into the issue.
Code i made change
''' function mintNftOnContract(address contractAddress) public { vm.startBroadcast(); //this i didn't put earlier BasicNft(contractAddress).mintNft(PUG); vm.stopBroadcast(); } '''
After deploying NFT contract on etherscan getting below error Deployed contract --> 0x394cbE9FC534f73116E0c0cb8060376D93Ae360a --> https://sepolia.etherscan.io/address/0x394cbe9fc534f73116e0c0cb8060376d93ae360a#code
├─ [139900] BasicNft::mintNft(ipfs://bafybeig37ioir76s7mg5oobetncojcm3c3hxasyd4rvid4jqhy4gkaheg4/?filename=0-PUG.json%22) │ ├─ emit Transfer(from: 0x0000000000000000000000000000000000000000, to: MintBasicNft: [0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519], tokenId: 0) │ ├─ [170] MintBasicNft::onERC721Received(MintBasicNft: [0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519], 0x0000000000000000000000000000000000000000, 0, 0x) │ │ └─ ← "EvmError: Revert" │ └─ ← "ERC721InvalidReceiver(0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519)" └─ ← "ERC721InvalidReceiver(0x5b73C5498c1E3b4dbA84de0F1833c4a029d90519)"