I can't verify my code on etherscan with remix etherum using open zeppelin

Contract Address:
0xabb6b85acc3c35201dbf62725492d47df6705c5f
Optimization: none
Compile: 0.8.0
Code:
import “https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/presets/ERC20PresetFixedSupply.sol”;
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import “…/extensions/ERC20Burnable.sol”;

/**

  • @dev {ERC20} token, including:
    • Preminted initial supply
    • Ability for holders to burn (destroy) their tokens
    • No access control mechanism (for minting/pausing) and hence no governance
  • This contract uses {ERC20Burnable} to include burn capabilities - head to
  • its documentation for details.
  • Available since v3.4.
    /
    contract ERC20PresetFixedSupply is ERC20Burnable {
    /
    *
    • @dev Mints initialSupply amount of token and transfers them to owner.
    • See {ERC20-constructor}.
      */
      constructor(
      string memory name,
      string memory symbol,
      uint256 initialSupply,
      address owner
      ) ERC20(name, symbol) {
      _mint(owner, initialSupply);
      }
      }
      // SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import “…/ERC20.sol”;
import “…/…/…/utils/Context.sol”;

/**

  • @dev Extension of {ERC20} that allows token holders to destroy both their own

  • tokens and those that they have an allowance for, in a way that can be

  • recognized off-chain (via event analysis).
    /
    abstract contract ERC20Burnable is Context, ERC20 {
    /
    *

    • @dev Destroys amount tokens from the caller.
    • See {ERC20-_burn}.
      */
      function burn(uint256 amount) public virtual {
      _burn(_msgSender(), amount);
      }

    /**

    • @dev Destroys amount tokens from account, deducting from the caller’s
    • allowance.
    • See {ERC20-_burn} and {ERC20-allowance}.
    • Requirements:
      • the caller must have allowance for accounts's tokens of at least
    • amount.
      */
      function burnFrom(address account, uint256 amount) public virtual {
      uint256 currentAllowance = allowance(account, _msgSender());
      require(currentAllowance >= amount, “ERC20: burn amount exceeds allowance”);
      _approve(account, _msgSender(), currentAllowance - amount);
      _burn(account, amount);
      }
      }

{
“deploy”: {
“VM:-”: {
“linkReferences”: {},
“autoDeployLib”: true
},
“main:1”: {
“linkReferences”: {},
“autoDeployLib”: true
},
“ropsten:3”: {
“linkReferences”: {},
“autoDeployLib”: true
},
“rinkeby:4”: {
“linkReferences”: {},
“autoDeployLib”: true
},
“kovan:42”: {
“linkReferences”: {},
“autoDeployLib”: true
},
“görli:5”: {
“linkReferences”: {},
“autoDeployLib”: true
},
“Custom”: {
“linkReferences”: {},
“autoDeployLib”: true
}
},
“data”: {
“bytecode”: {
“generatedSources”: ,
“linkReferences”: {},
“object”: “”,
“opcodes”: “”,
“sourceMap”: “”
},
“deployedBytecode”: {
“generatedSources”: ,
“immutableReferences”: {},
“linkReferences”: {},
“object”: “”,
“opcodes”: “”,
“sourceMap”: “”
},
“gasEstimates”: null,
“methodIdentifiers”: {
“allowance(address,address)”: “dd62ed3e”,
“approve(address,uint256)”: “095ea7b3”,
“balanceOf(address)”: “70a08231”,
“burn(uint256)”: “42966c68”,
“burnFrom(address,uint256)”: “79cc6790”,
“decimals()”: “313ce567”,
“decreaseAllowance(address,uint256)”: “a457c2d7”,
“increaseAllowance(address,uint256)”: “39509351”,
“name()”: “06fdde03”,
“symbol()”: “95d89b41”,
“totalSupply()”: “18160ddd”,
“transfer(address,uint256)”: “a9059cbb”,
“transferFrom(address,address,uint256)”: “23b872dd”
}
},
“abi”: [
{
“anonymous”: false,
“inputs”: [
{
“indexed”: true,
“internalType”: “address”,
“name”: “owner”,
“type”: “address”
},
{
“indexed”: true,
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
},
{
“indexed”: false,
“internalType”: “uint256”,
“name”: “value”,
“type”: “uint256”
}
],
“name”: “Approval”,
“type”: “event”
},
{
“anonymous”: false,
“inputs”: [
{
“indexed”: true,
“internalType”: “address”,
“name”: “from”,
“type”: “address”
},
{
“indexed”: true,
“internalType”: “address”,
“name”: “to”,
“type”: “address”
},
{
“indexed”: false,
“internalType”: “uint256”,
“name”: “value”,
“type”: “uint256”
}
],
“name”: “Transfer”,
“type”: “event”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “owner”,
“type”: “address”
},
{
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
}
],
“name”: “allowance”,
“outputs”: [
{
“internalType”: “uint256”,
“name”: “”,
“type”: “uint256”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “approve”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “account”,
“type”: “address”
}
],
“name”: “balanceOf”,
“outputs”: [
{
“internalType”: “uint256”,
“name”: “”,
“type”: “uint256”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “burn”,
“outputs”: ,
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “account”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “burnFrom”,
“outputs”: ,
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: ,
“name”: “decimals”,
“outputs”: [
{
“internalType”: “uint8”,
“name”: “”,
“type”: “uint8”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “subtractedValue”,
“type”: “uint256”
}
],
“name”: “decreaseAllowance”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “addedValue”,
“type”: “uint256”
}
],
“name”: “increaseAllowance”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: ,
“name”: “name”,
“outputs”: [
{
“internalType”: “string”,
“name”: “”,
“type”: “string”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: ,
“name”: “symbol”,
“outputs”: [
{
“internalType”: “string”,
“name”: “”,
“type”: “string”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: ,
“name”: “totalSupply”,
“outputs”: [
{
“internalType”: “uint256”,
“name”: “”,
“type”: “uint256”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “recipient”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “transfer”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “sender”,
“type”: “address”
},
{
“internalType”: “address”,
“name”: “recipient”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “transferFrom”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
}
]
}{
“compiler”: {
“version”: “0.8.0+commit.c7dfd78e”
},
“language”: “Solidity”,
“output”: {
“abi”: [
{
“anonymous”: false,
“inputs”: [
{
“indexed”: true,
“internalType”: “address”,
“name”: “owner”,
“type”: “address”
},
{
“indexed”: true,
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
},
{
“indexed”: false,
“internalType”: “uint256”,
“name”: “value”,
“type”: “uint256”
}
],
“name”: “Approval”,
“type”: “event”
},
{
“anonymous”: false,
“inputs”: [
{
“indexed”: true,
“internalType”: “address”,
“name”: “from”,
“type”: “address”
},
{
“indexed”: true,
“internalType”: “address”,
“name”: “to”,
“type”: “address”
},
{
“indexed”: false,
“internalType”: “uint256”,
“name”: “value”,
“type”: “uint256”
}
],
“name”: “Transfer”,
“type”: “event”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “owner”,
“type”: “address”
},
{
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
}
],
“name”: “allowance”,
“outputs”: [
{
“internalType”: “uint256”,
“name”: “”,
“type”: “uint256”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “approve”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “account”,
“type”: “address”
}
],
“name”: “balanceOf”,
“outputs”: [
{
“internalType”: “uint256”,
“name”: “”,
“type”: “uint256”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “burn”,
“outputs”: ,
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “account”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “burnFrom”,
“outputs”: ,
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: ,
“name”: “decimals”,
“outputs”: [
{
“internalType”: “uint8”,
“name”: “”,
“type”: “uint8”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “subtractedValue”,
“type”: “uint256”
}
],
“name”: “decreaseAllowance”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “spender”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “addedValue”,
“type”: “uint256”
}
],
“name”: “increaseAllowance”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: ,
“name”: “name”,
“outputs”: [
{
“internalType”: “string”,
“name”: “”,
“type”: “string”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: ,
“name”: “symbol”,
“outputs”: [
{
“internalType”: “string”,
“name”: “”,
“type”: “string”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: ,
“name”: “totalSupply”,
“outputs”: [
{
“internalType”: “uint256”,
“name”: “”,
“type”: “uint256”
}
],
“stateMutability”: “view”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “recipient”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “transfer”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
},
{
“inputs”: [
{
“internalType”: “address”,
“name”: “sender”,
“type”: “address”
},
{
“internalType”: “address”,
“name”: “recipient”,
“type”: “address”
},
{
“internalType”: “uint256”,
“name”: “amount”,
“type”: “uint256”
}
],
“name”: “transferFrom”,
“outputs”: [
{
“internalType”: “bool”,
“name”: “”,
“type”: “bool”
}
],
“stateMutability”: “nonpayable”,
“type”: “function”
}
],
“devdoc”: {
“details”: “Extension of {ERC20} that allows token holders to destroy both their own tokens and those that they have an allowance for, in a way that can be recognized off-chain (via event analysis).”,
“kind”: “dev”,
“methods”: {
“allowance(address,address)”: {
“details”: “See {IERC20-allowance}.”
},
“approve(address,uint256)”: {
“details”: “See {IERC20-approve}. Requirements: - spender cannot be the zero address.”
},
“balanceOf(address)”: {
“details”: “See {IERC20-balanceOf}.”
},
“burn(uint256)”: {
“details”: “Destroys amount tokens from the caller. See {ERC20-_burn}.”
},
“burnFrom(address,uint256)”: {
“details”: “Destroys amount tokens from account, deducting from the caller’s allowance. See {ERC20-_burn} and {ERC20-allowance}. Requirements: - the caller must have allowance for accounts's tokens of at least amount.”
},
“decimals()”: {
“details”: “Returns the number of decimals used to get its user representation. For example, if decimals equals 2, a balance of 505 tokens should be displayed to a user as 5,05 (505 / 10 ** 2). Tokens usually opt for a value of 18, imitating the relationship between Ether and Wei. This is the value {ERC20} uses, unless this function is overridden; NOTE: This information is only used for display purposes: it in no way affects any of the arithmetic of the contract, including {IERC20-balanceOf} and {IERC20-transfer}.”
},
“decreaseAllowance(address,uint256)”: {
“details”: “Atomically decreases the allowance granted to spender by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - spender cannot be the zero address. - spender must have allowance for the caller of at least subtractedValue.”
},
“increaseAllowance(address,uint256)”: {
“details”: “Atomically increases the allowance granted to spender by the caller. This is an alternative to {approve} that can be used as a mitigation for problems described in {IERC20-approve}. Emits an {Approval} event indicating the updated allowance. Requirements: - spender cannot be the zero address.”
},
“name()”: {
“details”: “Returns the name of the token.”
},
“symbol()”: {
“details”: “Returns the symbol of the token, usually a shorter version of the name.”
},
“totalSupply()”: {
“details”: “See {IERC20-totalSupply}.”
},
“transfer(address,uint256)”: {
“details”: “See {IERC20-transfer}. Requirements: - recipient cannot be the zero address. - the caller must have a balance of at least amount.”
},
“transferFrom(address,address,uint256)”: {
“details”: “See {IERC20-transferFrom}. Emits an {Approval} event indicating the updated allowance. This is not required by the EIP. See the note at the beginning of {ERC20}. Requirements: - sender and recipient cannot be the zero address. - sender must have a balance of at least amount. - the caller must have allowance for sender's tokens of at least amount.”
}
},
“version”: 1
},
“userdoc”: {
“kind”: “user”,
“methods”: {},
“version”: 1
}
},
“settings”: {
“compilationTarget”: {
“.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol”: “ERC20Burnable”
},
“evmVersion”: “istanbul”,
“libraries”: {},
“metadata”: {
“bytecodeHash”: “ipfs”
},
“optimizer”: {
“enabled”: false,
“runs”: 200
},
“remappings”:
},
“sources”: {
“.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/ERC20.sol”: {
“keccak256”: “0x57de056ae4006d2df0099d564ce5a7e090d844f5af5cca91b13f18bf75ddd4dd”,
“license”: “MIT”,
“urls”: [
“bzz-raw://27adbe63951062bbadbdc65c73073000d8cb9233fda9f79c52ce69e644baacf9”,
“dweb:/ipfs/QmNa9xqxwrQdxCBmYjebmXXH7iNfSEcJYU3jw3kiGjVniz”
]
},
“.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/IERC20.sol”: {
“keccak256”: “0xf8e8d118a7a8b2e134181f7da655f6266aa3a0f9134b2605747139fcb0c5d835”,
“license”: “MIT”,
“urls”: [
“bzz-raw://9ec48567e7ad06acb670980d5cdf3fd7f3949bf12894f02d68c3bb43e75aa84f”,
“dweb:/ipfs/QmaG3R2J9cz92YT77vFjYrjMNU2wHp4ypwYD62HqDUqS5U”
]
},
“.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/extensions/ERC20Burnable.sol”: {
“keccak256”: “0xe308868562b5735fc4f7d1cbedb2458467eef7cef1a30b25c0506192f7c18a91”,
“license”: “MIT”,
“urls”: [
“bzz-raw://394e6700837532defe3fed32446d18d1536ef5a8184dac078060ad43b097cd3a”,
“dweb:/ipfs/QmdAaHy7xKSHs3rfGoVE7rJyvmPGf3ywkMbPPHABQo2tmP”
]
},
“.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol”: {
“keccak256”: “0x83fe24f5c04a56091e50f4a345ff504c8bff658a76d4c43b16878c8f940c53b2”,
“license”: “MIT”,
“urls”: [
“bzz-raw://d4c3df1a7ca104b633a7d81c6c6f5192367d150cd5a32cba81f7f27012729013”,
“dweb:/ipfs/QmSim72e3ZVsfgZt8UceCvbiSuMRHR6WDsiamqNzZahGSY”
]
},
“.deps/github/OpenZeppelin/openzeppelin-contracts/contracts/utils/Context.sol”: {
“keccak256”: “0x9c22fa9375b8b5c840785989cefb0fb93bcef5acf944de3cada11eea1846668b”,
“license”: “MIT”,
“urls”: [
“bzz-raw://fec64cd92f82a727d6029d5c974fc10fae5e5de581a3e1716c0fbea77848440d”,
“dweb:/ipfs/QmcP1Y9S8XoBuncvBYBZugpy2oyCZT7iqNtVyjFmozkNJh”
]
}
},
“version”: 1
}

@abcoathup
Ive seen recently that you’ve been able to help people. I hope you’ll be able to help me. I’ve been trying for two weeks to verify my code, but it does not want to be verified on etherscan. I’ve put some information above please let me know if you need anything else.
Thank you.

@nganem Can you try to format your code better by using triple backticks (```) to surround code?

Please share what steps you’ve tried to follow and what didn’t work.

Basically i copied and pasted some of the codes I have from my remix ethereum to etherscan, but I am not sure which files from openzepplin I am supposed to verify in etherscan. I dont know if it makes much sense.

I just copied the open zeppelin code
here it is:

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import “…/extensions/ERC20Burnable.sol”;

/**

  • @dev {ERC20} token, including:
    • Preminted initial supply
    • Ability for holders to burn (destroy) their tokens
    • No access control mechanism (for minting/pausing) and hence no governance
  • This contract uses {ERC20Burnable} to include burn capabilities - head to
  • its documentation for details.
  • Available since v3.4.
    /
    contract ERC20PresetFixedSupply is ERC20Burnable {
    /
    *
    • @dev Mints initialSupply amount of token and transfers them to owner.
    • See {ERC20-constructor}.
      */
      constructor(
      string memory name,
      string memory symbol,
      uint256 initialSupply,
      address owner
      ) ERC20(name, symbol) {
      _mint(owner, initialSupply);
      }
      }

Unfortunately verifying contracts that were deployed from Remix is not easy. I would’ve recommended that you first try doing this on a testnet but I see that you’ve already deployed to mainnet.

Can you try using the Etherscan module found in the plugin manager tab?

image

If this doesn’t work. You need to know the following:

  • Version of the compiler that you used.
  • Whether optimizations were on. (Assume 200 “runs” parameter.)
  • Since you imported the contracts from the master branch (please don’t do this! use the releases!) you need to know exactly what commit Remix fetched. Remix doesn’t give you this information, and it may even have fetched files from different commits. Hopefully it didn’t. You can try to guess what commit it was based on when you started the project and looking at the commit log in the repository.

With all of this, you can either load the files one by one onto Etherscan’s multi-file input, and make sure the import statements match… You can also try to put together a local project using Hardhat with the Etherscan plugin.

As a reminder: please use triple backticks (```) to surround any code that you paste.

I have activated it, but I am not sure what to do next. I have been trying to verify thiss contract for weeks now working day and night but no luck. Is there a way we can hope on a call ? I’ve already deployed my contract to the mainnet and I would hate to start over again and put that ethereum I spent to waste.

Please try to use the module on Remix. We’re overwhelmed by support requests right now so can’t follow up with you in as much detail.

the commite is 0.8.0
I dont have optimizations on
and I copied the exact code from open zeppelin. It compiles on remix ethereum and I don’t know why it doesnt want to compile on etherscan. Maybe I can send you the Zip file compression and you can take a look ?