-
Hello, At around 10:50:00 and later on in course Patrick is showing verified contract details (his contract has been verified automatically somehow). In my case none of my contracts has been verified (I have already tried tons of times). I have also tried to manually publish and verify deployed contract but I keep getting error that it does not recognize my 2 imports of ERC721 and VRFConsumerBase. I have also tried to use following line of code in my deploy script: Error from etherscan manual verification: Anyone can help me to solve this issue? I'm unable to see if my |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Hello @Neftyr Regarding to your issue, please share the following: And remember to have setup the etherscan key on .env |
Beta Was this translation helpful? Give feedback.
-
@cromewar I have found issue, but have no idea how is this even possible... as issue lays in commented code! I have located problem with Working part of code: function setTokenURI(uint256 tokenId, string memory _tokenURI) public {
// pug, shiba inu, st bernard
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not owner or not approved");
_setTokenURI(tokenId, _tokenURI);
} Code with error function setTokenURI(uint256 tokenId, string memory _tokenURI) public {
// We need 3 differens tokenURI's for each breed (pug, shiba inu, st bernard) and let only owner of token update token URI's
// to do that we are going to use imported OpenZeppelin function "_isApprovedOrOwner()" from "ERC721"
// and "_msgSender()" from https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/utils/Context.sol
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: caller is not token owner or approved");
_setTokenURI(tokenId, _tokenURI);
} Once you remove commented lines there is no more error... I have also figured out that error occurs with this line: I don't know if it is solidity language error related and comment doesnt work as they supposed to and i have found some kind of |
Beta Was this translation helpful? Give feedback.
@cromewar I have found issue, but have no idea how is this even possible... as issue lays in commented code! I have located problem with
AdvancedCollectible.sol
in below function:Working part of code:
Code with error
FileNotFoundError: [Errno 2] No such file or directory
: