Im having troubles verifying and my constructor arguments and ABI have been triple checked. Can anyone assist? here is what im getting on polygonscan.

Compiler debug log: Error! Unable to generate Contract ByteCode and ABI Found the following ContractName(s) in source code : Address, Context, ContractName, ERC165, ERC721, ERC721Enumerable, IERC165, IERC721, IERC721Enumerable, IERC721Metadata, IERC721Receiver, Ownable, Strings 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

1 Answer 1


Yes, it can be tricky. From what I understand it cannot find a byte-for-byte match. The match has to be over the whole tx.data that you sent. This includes constructor code and parameters, plus the deployed code.

  1. Did you write the contracts in the proper order so that they are declared before they are used? (I think yes)
  2. Did you properly enter the constructor parameters, like 0x1234..., and without a potential Swarm appendage? (If you had constructor parameters)
  3. Are you sure about the version and optimisation runs used by the compiler? (Check in your computer folder for a .json file that could tell you that)
  • The contract should be in proper order. The constructor parameters have been triple checked same with ABI so that should be good. As for the compiler that is the correct one too. hmm..
    – 0xGbrads
    Oct 7, 2021 at 19:40
  • Can you perhaps update your question with a github repo for the code and the address Etherscan link? Oct 8, 2021 at 8:19
  • Please provide 1. Code 2. Deployed Address 3. Consturctor passed 4. Optimizer : on/off Aug 18, 2022 at 10:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.