Hello! I'm trying to verify this contract on etherscan and ran into this error. I also tried out flattening the contract with the flatterer plugin in remix but that didn't work either. I would appreciate any help to solve, thank you!
Hi, welcome!
If you deployed your contract with Remix, maybe you can have a look at this tutorial: Verify erc20 token on etherscan that was deployed through remix:step by step guide
And if you want to verify contracts by multi-files, I think you can look at this tutorial: Verify smart contract inheriting from OpenZeppelin Contracts
Hi Skyge, Thanks for the reply! I followed your first tutorial and this is what I got. Not really sure where to go from here.
It looks like just some warnings.
So could you please share the source code and contract address?
Sure!
Contract Address: 0xdba5910590c4467cc5b28c5bf85f2f7bfa609df7
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.0.0/contracts/token/ERC20/ERC20.sol";
contract MyToken is ERC20 {
constructor (string memory name, string memory symbol) public ERC20("Neo", "$NEO") {
_mint(msg.sender, 100 * 10 ** uint(decimals()));
}
}