Verify Solidity 0.8 ERC20 token deployed using Remix

:computer: Environment
Remix 0.8.0

:memo:Details
I was all day trying to verify my sc but I cant.

:1234: Code to reproduce

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

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/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-ERC20Permit.sol";

contract FreightChainFinance is ERC20, ERC20Burnable, ERC20Snapshot, Ownable, Pausable, ERC20Permit {
    constructor()
        ERC20("FreightChainFinance", "TCFT")
        ERC20Permit("FreightChainFinance")
    {
        _mint(msg.sender, 100000000 * 10 ** decimals());
    }

    function snapshot() public onlyOwner {
        _snapshot();
    }

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    function mint(address to, uint256 amount) public onlyOwner {
        _mint(to, amount);
    }

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

Hi @JamesChan,

Welcome to the community :wave:

I suggest using Hardhat to verify, see: Verify smart contract inheriting from OpenZeppelin Contracts

You can Format code in the forum

I tried all the solutions! Would you please help me?

What is the address (please share a link to the blockchain explorer)?
What version of Solidity compiler did you use?
Did you use Optimization?