Verify ERC20 token on BSCScan

Hi. I’m not a developer but have been trying to verify a contract for hours. I’ve gone through all the guides in the search feature but I don’t know what I’m doing with Node or really anything else at the moment. How exactly do you verify it with the link you provided? Is there a way to use that link with Remix? I’m wondering if I should have had a github account prior to deploying this from Remix.

Here is my contract address: https://bscscan.com/address/0x9e18210acfa31e0a48e67971c20c64e2d9211313

I’m getting error about the import feature not working

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


import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol";

contract TestToken is ERC20 {
    constructor () 
    public ERC20("TestToken4", "TEST4") {
        _mint(msg.sender, 1000000000000000000000000);
    }
}

Error:

Error! Unable to generate Contract ByteCode and ABI (General Exception, unable to get compiled [bytecode])

Compiler Warning(s):
ParserError: Source “https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol” not found: File import callback not supported
→ myc:5:1:
|
5 | import “https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  • Compiler Version: v0.8.0+commit.c7dfd78e
  • Optimization Enabled: False
  • Runs: 200

ByteCode (what we are looking for) : *

*(long string of numbers removed)

1 Like

As I have mentioned above, you can use some tool to verify contracts.

Have verified!

2 Likes

Hi @Fluffhead,

Welcome to the community :wave:

We should only use code from an official release of OpenZeppelin Contracts. The GitHub import in your contract imports from the master branch which is subject to change (which can also make it difficult to verify).

If you want to import via GitHub please use a release tag, e.g.:
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v4.0.0-beta.0/contracts/token/ERC20/ERC20.sol

Please note Solidity 0.8 support is only in the OpenZeppelin Contracts 4.0 Beta.