Verify contract: ParserError: Source “https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol” not found

Hi, Im trying to verify my contract and getting same error with my contract:

Contract

// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

contract CoinName is ERC20 {
    constructor(uint256 initialSupply) public ERC20("CoinName","CoinSymbol") {
        _mint(msg.sender, initialSupply);
    }
}

Error:
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:

Could you help me? Thanks!!

1 Like

Hi @jscrui,

Welcome to the community :wave:

You should only use an official release of OpenZeppelin Contracts. Currently you are importing via GitHub the master branch which is subject to change.

Remix now supports @ (npm style) imports. Try this using the Contracts Wizard: https://zpl.in/wizard

As for verifying you can try the following with Hardhat: Verify smart contract inheriting from OpenZeppelin Contracts