Hello, I just deployed my contract for a token on mainnet but when I try to verify it doesn’t work, here is my code :
// contracts/empire.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract EMPIRE is ERC20 {
constructor(uint256 initialSupply) ERC20 ("EMPIRE", "MPR"){
_mint(msg.sender,initialSupply);
}
}
and the contract adress : 0xFfc15B9119e806720b9b0BE5437271851c4f3393
I compiled with remix ide and when i try to verify there is this error :
ParserError: Source "@openzeppelin/contracts/token/ERC20/ERC20.sol" not found: File import callback not supported
--> myc:5:1:
|
5 | import "@openzeppelin/contracts/token/ERC20/ERC20.sol"
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
I read a dozen of topics but still not understand how to verify this
HAve you tried to search in the forum?
For a complete list of resources regarding verification visit How to verify a contract on Etherscan/BscScan/PolygonScan .
The recommended way to verify a smart contract inheriting from OpenZeppelin Contracts is as a "multi-file" contract (corresponding to the Standard-Json-Input compiler type on Etherscan). It is easier to read, imports are maintained, licenses are maintained.
Verified using Hardhat
Verified using Truffle
Hardhat
Hardhat has an Etherscan plugin: Hardhat Etherscan plugin
N…
Thank you i find how to do it
Hey guys im having a similar problem. I am absolutely brand new at coding. Im just doing it to learn not looking to make money. If anyone can help that would be amazing. I copied the link to my question in this reply. Thanks guys appreciate it!!
Im not looking to make any money off these coins im just trying to learn about coding and practicing my understanding of crypto and smart contracts.
I successfully deployed my contract to the bscan network. but when i try to verify i get this message. Error! Unable to generate Contract ByteCode and ABI
Found the following ContractName(s) in source code : Token
But we were unable to locate a matching bytecode (err_code_2)
Here is my source code:
// SPDX-License-Identifier: UNLICENSED
pragma…
frangio
December 22, 2021, 4:46pm
6
For questions about verification please consult our main post:
Make sure to read this post before asking a question about verification. If your issue is not addressed here, just leave a comment below.
If you want to pay someone to do the verification for you, create a post in Developer Wanted .
This guide applies to all Etherscan instances , including all of the following as well as their testnet explorers:
etherscan.io (Ethereum)
bscscan.com (Binance Smart Chain)
polygonscan.com (Polygon)
snowtrace.io (Avalanche)
Recommendations
Practice in testnet
Be…