# Please Help, Trying to Verify Wizard Generated ERC20 for 3 Days

**URL:** <https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610>\
**Category:** Contracts\
**Created:** [April 30, 2021, 1:34pm UTC](https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610 "2021-04-30T13:34:58Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![developement](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@developement](https://forum.openzeppelin.com/u/developement)\
**Post date:** [April 30, 2021, 1:34pm UTC](https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610/1 "2021-04-30T13:34:58Z")

</div>

Hi, I Super Appreciate Your Help, on [https://docs.openzeppelin.com/contracts/4.x/wizard](https://docs.openzeppelin.com/contracts/4.x/wizard)

after checking the options “Burnable”, “Pausable”, “Snapshots”, “Permit”, “Roles”, then clicked “Open in Remix”, In Remix Added the Etherscan Verification Plugin, after compiling, the contract successfully verified, but then after deploying on Mainnet, [etherscan.io](http://etherscan.io) will not verify it.

1st error was saying could not import files, tried a few methods from a few discussions including flattening the file, added the flattening plugin from remix and then the new errors were:

1. too many licenses, solution: kept the top MIT license and removed all the other licenses, that worked

2. “definition of base has to precede definition of derived contract” files were not in order, here is the shuffling I have been trying to do with still need help please:

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol  
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol  
// File: contract-18cc8a4dad.sol  
// File: @openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol  
// File: @openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol  
// File: @openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol  
// File: @openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol  
// File: @openzeppelin/contracts/security/Pausable.sol  
// File: @openzeppelin/contracts/utils/introspection/IERC165.sol  
// File: @openzeppelin/contracts/utils/introspection/ERC165.sol  
// File: @openzeppelin/contracts/access/AccessControl.sol  
// File: @openzeppelin/contracts/utils/Counters.sol  
// File: @openzeppelin/contracts/utils/math/Math.sol  
// File: @openzeppelin/contracts/utils/Arrays.sol  
// File: @openzeppelin/contracts/utils/cryptography/ECDSA.sol  
// File: @openzeppelin/contracts/utils/cryptography/draft-EIP712.sol  
// File: @openzeppelin/contracts/utils/Context.sol

Now on the 3rd day on trying to verify, I went back to the unflattened file and realized I could add “// File: @openzeppelin” infront of the files for them to import (I think), that removed the import error but now after 3 days of errors, the new error after reverting to the unflattened file: "ParserError: Expected pragma, import directive or contract/interface/library/struct/enum/constant/function definition.

here is the code:

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

// File: @openzeppelin/contracts/token/ERC20/ERC20.sol";  
// File: @openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";  
// File: @openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol";  
// File: @openzeppelin/contracts/access/AccessControl.sol";  
// File: @openzeppelin/contracts/security/Pausable.sol";  
// File: @openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";

contract MyToken is ERC20, ERC20Burnable, ERC20Snapshot, AccessControl, Pausable, ERC20Permit {  
bytes32 public constant SNAPSHOT\_ROLE = keccak256(“SNAPSHOT\_ROLE”);  
bytes32 public constant PAUSER\_ROLE = keccak256(“PAUSER\_ROLE”);

```
constructor()
    ERC20("My Token", "MTOKEN")
    ERC20Permit("My Token")
{
    _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
    _setupRole(SNAPSHOT_ROLE, msg.sender);
    _setupRole(PAUSER_ROLE, msg.sender);
    _mint(msg.sender, 1000000000 * 10 ** decimals());
}

function snapshot() public {
    require(hasRole(SNAPSHOT_ROLE, msg.sender));
    _snapshot();
}

function pause() public {
    require(hasRole(PAUSER_ROLE, msg.sender));
    _pause();
}

function unpause() public {
    require(hasRole(PAUSER_ROLE, msg.sender));
    _unpause();
}

function _beforeTokenTransfer(address from, address to, uint256 amount)
    internal
    whenNotPaused
    override(ERC20, ERC20Snapshot)
{
    super._beforeTokenTransfer(from, to, amount);
}

```

}

I super Appreciate your help

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 2, 2021, 8:39am UTC](https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610/2 "2021-05-02T08:39:35Z")

</div>

Hello developement, Welcome to the forums.

Have you been able to verify other contracts in the past on Remix?

You might need to follow some guides on how to do this for your dev environment.

> **[Verify Contracts on Remix with Sourcify](https://medium.com/remix-ide/verify-contracts-on-remix-with-sourcify-2912004d9c84)**
>
> Learn how to get your smart contracts verified and how to fetch the source code of a deployed (& verified) contract.

---

<div class="post-metadata">

**Author:** ![developement](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@developement](https://forum.openzeppelin.com/u/developement)\
**Post date:** [May 2, 2021, 1:06pm UTC](https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610/3 "2021-05-02T13:06:27Z")

</div>

Hi Tsushima, I appreciate your response, the wizard generated code verified with the remix etherscan plugin, but not on the actual [etherscan.io](http://etherscan.io), I respect & love that many of these wizards/plugins are new but as a new user following the steps from wizard \> to \> remix \> to \> etherscan, the steps don’t work and now 5th day searching many forums & even inviting devs to solve verifying the wizard generated code, freelancers are also having no solution, is there a code that imports these files that can be verified on Etherscan please?

import “@openzeppelin/contracts/token/ERC20/ERC20.sol”;  
import “@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol”;  
import “@openzeppelin/contracts/token/ERC20/extensions/ERC20Snapshot.sol”;  
import “@openzeppelin/contracts/access/AccessControl.sol”;  
import “@openzeppelin/contracts/security/Pausable.sol”;  
import “@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol”;

what is a sample code to put on [etherscan.io](http://etherscan.io) that works?  
Thank you very much  
MG

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 2, 2021, 1:43pm UTC](https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610/4 "2021-05-02T13:43:49Z")

</div>

I’m sorry I cannot be more help. The problem is that I am on a different dev environment.

I put my code in here, with minimal changes using hardhat.

The only thing I changed was the " to ’  
in the lines

```auto
bytes32 public constant SNAPSHOT_ROLE = keccak256('SNAPSHOT_ROLE');
bytes32 public constant PAUSER_ROLE = keccak256('PAUSER_ROLE');

```

I also changed how I imported those files.

You can see my deployed and verified code here.

> **[MyToken | 0xF3867EA39A78534CFc08d1e79fd046F9C74101Ce](https://rinkeby.etherscan.io/address/0xF3867EA39A78534CFc08d1e79fd046F9C74101Ce#code)**
>
> The Contract Address 0xF3867EA39A78534CFc08d1e79fd046F9C74101Ce page allows users to view the source code, transactions, balances, and analytics for the contract address. Users can also interact and make transactions to the contract directly on...

---

<div class="post-metadata">

**Author:** ![developement](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@developement](https://forum.openzeppelin.com/u/developement)\
**Post date:** [May 3, 2021, 12:26pm UTC](https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610/5 "2021-05-03T12:26:19Z")

</div>

Thank you very much, you have been helpful, I appreciate it, I followed the link you sent for the Sourcify plugin on remix, that plugin was able to successfully Fetch the contract and Said it was verified already on 4/26 and when it gave me the link to get the verified code [https://repo.sourcify.dev/contracts/full\_match/1/0xc9b929079ab56184b73dbab3b36c3c5183d799c8](https://repo.sourcify.dev/contracts/full_match/1/0xc9b929079ab56184b73dbab3b36c3c5183d799c8) that link says the page is not working?

I looked at your verified code, but it is multi file and it looks similar to the same format that I get the errors saying can not import, on full 7 day week of trying, not including the month of wanting to make a token & now finally got to mainnet & paid gas fees but now can’t see token on mainnet because cant verify it, is there a sample single file is there a good place besides fiverr or upwork to find a teacher to help create a token? thank you very much, appreciated

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 3, 2021, 2:29pm UTC](https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610/6 "2021-05-03T14:29:39Z")

</div>

It is multiple files because you are importing multiple files using import “@openzeppelin/contracts/token/ERC20/ERC20.sol”; When verifying it has to verify that too, which is why using a plugin is very helpful.

---

<div class="post-metadata">

**Author:** ![developement](https://avatars.discourse-cdn.com/v4/letter/d/ebca7d/32.png) [@developement](https://forum.openzeppelin.com/u/developement)\
**Post date:** [May 4, 2021, 1:24am UTC](https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610/7 "2021-05-04T01:24:08Z")

</div>

Hi Tsushima, you’re right, thank you, the Sourcify plugin is great, I found why the link was not working, the address had to be converted to checksum

But after I converted the address & uploaded all 17 files to [Etherscan.io](http://Etherscan.io) for verification, I still get the import errors, do I have to change the codes to import in all 17 files (all of them return the import error) and if so, what is the right way to write the code for it to import? Do I include [http://github.com/](http://github.com/) I tried so many ways, can anyone help? Thank you

ParserError: Source “utils/Context.sol” not found: File import callback not supported  
 → AccessControl.sol:5:1:  
|  
5 | import “…/utils/Context.sol”  
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

---

<div class="post-metadata">

**Author:** ![Yoshiko](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/yoshiko/32/6858_2.png) [@Yoshiko](https://forum.openzeppelin.com/u/Yoshiko)\
**Post date:** [May 14, 2021, 12:26pm UTC](https://forum.openzeppelin.com/t/please-help-trying-to-verify-wizard-generated-erc20-for-3-days/7610/8 "2021-05-14T12:26:24Z")

</div>

> 5 | import “…/utils/Context.sol”

It's because that path is incorrect. You need to have your pathing correct to files that exist otherwise it won't see those files.
