Unable to verify abi on etherscan

I deployed a contract through remix using zeppelin files. I was able to verify on kovan but not etherscan main net.

I’ve tried all the examples given through out the forum but I’m still unable to verify abi on my contract.
Again I’ve flattened the contract a have it verified on kovan.etherscan but I’m unable to verify on etherscan mainnet. I was unable to use hashex to create abi also. Any help would be great it’s been a couple of weeks and I’d like to know what I’m doing wrong. And how to correct it.

:1234: Code to reproduce

<!`Preformatted text`-- The community will be able to better help if you provide a minimal example that reproduces your issue. Place code inside backticks. -->`// SPDX-License-Identifier: MIT
pragma solidity ^0.8.7;

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

contract Richoffcrypto is ERC20 {
    address public admin;
    constructor() ERC20('Richoffcrypto', 'ROC') {
     _mint(msg.sender, 10000000 * 10 ** 18);
     admin = msg.sender;
 function mint(address to, uint amount) external {
     require(msg.sender == admin, 'only admin');
     _mint(to, amount);

 function burn(uint amount) external {
     _burn(msg.sender, amount);


:computer: Environment

remix 8.7

Refer to this article

as far as i know verifying directly from the scan sometimes have a slight problem, but when you do it from hardhat/truffle it's working, or use Etherscan API with Remix.

1 Like