Hi, I want to verify my contract in snowtrace, . I followed the steps to verify using remix.
-
Added the contract to remix and compiled it
-
use FLATTENER to flatten the code and added the SPDX-License-Identifier: MIT
-
Added flatten code to Solidity Contract Code section
-
when I clicked verify and publish it gives following error
Error! Unable to generate Contract ByteCode and ABI
Found the following ContractName(s) in source code : AddressUpgradeable, ContextUpgradeable, CountersUpgradeable, ERC165Upgradeable, ERC1967UpgradeUpgradeable, ERC721NFTPublic, ERC721URIStorageUpgradeable, ERC721Upgradeable, IBeaconUpgradeable, IERC165Upgradeable, IERC1822ProxiableUpgradeable, IERC2981Upgradeable, IERC721MetadataUpgradeable, IERC721ReceiverUpgradeable, IERC721Upgradeable, Initializable, OwnableUpgradeable, SafeMathUpgradeable, StorageSlotUpgradeable, StringsUpgradeable, UUPSUpgradeable
But we were unable to locate a matching bytecode (err_code_2)
For troubleshooting, you can try compiling your source code with the Remix - Solidity IDE and check for exceptions
- Compiler Version: v0.8.7+commit.e28d00a7
- Optimization Enabled: True
- Runs: 200
Code to reproduce
Environment
- Remix
- Compiler Version: v0.8.7+commit.e28d00a7
- Optimization Enabled: True
- Runs: 200