Can't verify ERC20 contract importing OpenZeppelin

hi i cant verify my contract in etherscan.tried to flattener but i couldnt success. Can some one help ?

1 Like

Which contract do you want to verify? Can you paste your repo?

1 Like
pragma solidity ^0.5.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20.sol";
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v2.5.0/contracts/token/ERC20/ERC20Detailed.sol";


contract Myteamcoin is ERC20, ERC20Detailed {

    constructor () public ERC20Detailed("Myteamcoin", "MYC", 18) {
        _mint(msg.sender, 25000000000 * (10 ** uint256(decimals())));
    }
}

i have created in ethereum chain but i cant verified by using truffle flattener .

1 Like

Hi @marslan,

Welcome to the community :wave:

I recommend the following method: Verify smart contract inheriting from OpenZeppelin Contracts

Your ERC20 contract has no constructor parameters. On Etherscan when verifying you can remove anything in the constructor parameters field.

If you run into issue, let me know the address, and what network you are using and I can try to verify for you.

I verified your contract: Use Truffle Flattener on Windows with OpenZeppelin Contracts 2.x