VERIFY DOES NOT WORK. Compiler debug log: Error! Unable to generate Contract Bytecode and ABI

Tying to Verify & Publish Contract Source Code on Etherscan using ETh - ERC 20

I used remix to deploy. I checked everything three times. The Compiler .8.20 was the same in the code and contract and verify. Enable Optimization was selected on both sides. I used the Version on the Zeplin Imports. At 5.0.0, etc

Flatened the Compiled contract code. The Flatened version compiled succesfully,

:computer: Environment ALL DONE with REMIX

I have never used and dont want to use Truffle, Hardhat

##ERROR
Compiler debug log:
Error! Unable to generate Contract Bytecode and ABI
Found the following ContractName(s) in source code : Checkpoints, Context, CryptoAdoptionToken, ECDSA, EIP712, ERC20, ERC20Burnable, ERC20Permit, ERC20Votes, IERC1155Errors, IERC20, IERC20Errors, IERC20Metadata, IERC20Permit, IERC5267, IERC5805, IERC6372, IERC721Errors, IVotes, Math, MessageHashUtils, Nonces, Ownable, SafeCast, ShortStrings, SignedMath, StorageSlot, Strings, Time, Votes
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.20+commit.a1b79de6
  • Optimization Enabled: True
  • Runs: 200

Bytecode (what we are looking for):
610160604052600c80546001600160a01b031990811673e9c7b49dcb9193c

Before it was flattened I used the Wizard and here is the code and it deployed and worked perfect, but not verifying..

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import "@openzeppelin/contracts@5.0.0/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@5.0.0/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts@5.0.0/token/ERC20/extensions/ERC20Permit.sol";
import "@openzeppelin/contracts@5.0.0/token/ERC20/extensions/ERC20Votes.sol";
import "@openzeppelin/contracts@5.0.0/access/Ownable.sol";

contract CryptoAdoptionToken is ERC20, ERC20Burnable, ERC20Permit, ERC20Votes, Ownable {
constructor(address initialOwner)
ERC20("CryptoAdoptionToken", "CAT")
ERC20Permit("CryptoAdoptionToken")
Ownable(initialOwner)
{
_mint(msg.sender, 10000000000 * 10 ** decimals());
}
address public marketingwallet = 0xe9C7B49Dcb9193c494a464D4a88e4A188E5719b7;
address public devwallet = 0x6A95f241b446537022c68b21Ffed8ff490E0C40e;

uint256 public buyfee = 5;
uint256 public buyTotalfee = buyfee;
uint256 public swaplpfee = 2;
uint256 public swapmarketingfee = 2;
uint256 public swaptreasuryfee = 2;
uint256 public swapTotalfee = swaplpfee + swapmarketingfee + swaptreasuryfee;
uint256 public transfee = 5;
uint256 public feedenominator = 100;

// The following functions are overrides required by Solidity.

function _update(address from, address to, uint256 value)
    internal
    override(ERC20, ERC20Votes)
{
    super._update(from, to, value);
}

function nonces(address owner)
    public
    view
    override(ERC20Permit, Nonces)
    returns (uint256)
{
    return super.nonces(owner);
}

}

Hey @Adoptiontoken, Do you happen to have the actual contract you entered into remix? Would you mind dropping the contract in the chat using the "Preforrmated Text" block to add the contract code here? It's a little difficult to read your above comments.


// SPDX-License-Identifier: MIT

pragma solidity ^0.8.20;

import "@openzeppelin/contracts@5.0.0/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts@5.0.0/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts@5.0.0/token/ERC20/extensions/ERC20Permit.sol";
import "@openzeppelin/contracts@5.0.0/token/ERC20/extensions/ERC20Votes.sol";
import "@openzeppelin/contracts@5.0.0/access/Ownable.sol";

contract CryptoAdoptionToken is ERC20, ERC20Burnable, ERC20Permit, ERC20Votes, Ownable {
    constructor(address initialOwner)
        ERC20("CryptoAdoptionToken", "CAT")
        ERC20Permit("CryptoAdoptionToken")
        Ownable(initialOwner)
    {
        _mint(msg.sender, 10000000000 * 10 ** decimals());
    }
address public marketingwallet = 0xe9C7B49Dcb9193c494a464D4a88e4A188E5719b7;
address public devwallet = 0x6A95f241b446537022c68b21Ffed8ff490E0C40e;

uint256 public buyfee = 5;
uint256 public buyTotalfee = buyfee;
uint256 public swaplpfee = 2;
uint256 public swapmarketingfee = 2;
uint256 public swaptreasuryfee = 2;
uint256 public swapTotalfee = swaplpfee + swapmarketingfee + swaptreasuryfee;
uint256 public transfee = 5;
uint256 public feedenominator = 100;

    // The following functions are overrides required by Solidity.

    function _update(address from, address to, uint256 value)
        internal
        override(ERC20, ERC20Votes)
    {
        super._update(from, to, value);
    }

    function nonces(address owner)
        public
        view
        override(ERC20Permit, Nonces)
        returns (uint256)
    {
        return super.nonces(owner);
    }
}

Why not use the etherscan plugin in remix, flattened files are painful :frowning:

I did try, use the new "CONTRACT VERIFICATION - ETHERSCAN" Has been "Pending in queue" for about 36 hours. So not sure if it will work or not.

Brian