Hello Community just read through another post about converting imports and verifying when using Github. I made the mistake of not compiling now I need to get this sorted.
I tried what was in here however could not get it to verify:
Any help would be greatly appreciated.
Environment
Deployed using remix and 0.6.12 & OpenZepplin v3.2.0
Details
Trying to flatten using truffle like in the post but threw Multiple SPX errors after removing got this:
myc:2103:1: DeclarationError: Identifier already declared.
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
^ (Relevant source part starts here and spans across multiple lines).
myc:1628:1: The previous declaration is here:
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
^ (Relevant source part starts here and spans across multiple lines).
myc:2271:25: TypeError: Cannot call function via contract type name.
address owner = ERC721.ownerOf(tokenId)
^---------------------^
Hey there, I am currently interacting using web 3 but would like it to be publicly verified but struggling to get it, will never use github imports again now that see how easy truffle isβ¦
When converting to npm imports, you need to install the same version of OpenZeppelin Contracts.
In your case you were importing OpenZeppelin Contracts 3.2 via GitHub so need to install npm install @openzepplin/contracts@3.2.0
Using Binance Smart Chain I am not sure if Hardhat verify supports bscscan, so flattening is likely to be the easiest way to do this. You would need to remove the duplicate SPDX-License-Idetifierβs, though as you are using MIT, this is fairly straight forward.
Yes i did install the 3.2 Version, BSC is the exact same as ETH from my experience so far. Not sure why like i stated above after flattening and removing duplicate License I got a really weird error.
@abcoathup Hello! I am also having troubles trying to verify my smart contract for an ERC721 token. I deployed it on Remix and this is the error im getting,
"Error! Unable to generate Contract ByteCode and ABI (General Exception, unable to get compiled [bytecode])"