I need simple ERC20 token template with pramga version 0.8.0 and up

The 1 contract I have works but for some reason i cant verify it on etherscan.

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

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract CWJToken is ERC20 {
    constructor() public ERC20("CodeWithJoe", "CWJ") {
        _mint(msg.sender, 100000 *(10 ** uint256(decimals())));
    }
}

can you more specify? how you deploy it? Remix, Hardhat, or Truffle ?

there's a tool to automatically verify smart contracts. or maybe you want to manually flatten it out then send the ABI to etherscan.

This is the error I get when verifiying the contract

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 have deployed the contract with remix and tried to verify it with remix and also on bscscan, both times it didnt work

I also copied and pasted the exact code from the openzeppelin homepage

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


import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract ExampleToken is ERC20 {
    constructor () ERC20("ExampleToken", "EGT") {
        _mint(msg.sender, 10000 * 10 ** decimals());
    }
}

and i cant verify this 1 either

This is also an error I get when trying to verify

**Compiler debug log:**
Error! Unable to generate Contract ByteCode and ABI **(General Exception, unable to get compiled [bytecode])**
For troubleshooting, you can try compiling your source code with the [Remix - Solidity IDE](https://remix.ethereum.org) and check for exceptions

I dont understnd why those stupid smart contracts are not automatically verified as soon as they are deployed

the error message is clear, compiler does not found the imported contracts. do you check if the file is exist? how you can deploy it if the file does not exist? please refer to my first reply, there's bunch of method to verify in etherscan if you already deployed it.

verify your code using hardhat plugin. https://hardhat.org/plugins/nomiclabs-hardhat-etherscan.html

I dont care about hardhat
I want to verify this stupid ass contract through bscscan and i dont want any other option cause they all suck

well... good luck verifying your contract. :hugs:

Hi, welcome! :wave:

Sorry, I am not familiar with the BSC-Chain, maybe you should ask for help in their forum: Home | Binance Chain Forum

And they have a documentation about how to verify contracts, maybe you can have a look at it:

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 for the next time, please search at the forum at first, and then ask questions, thanks!
How do I ask a good question? - General / Meta - OpenZeppelin Community

I prefer to close this topic, if you still can not verify your contracts following all the tutorials I shared above, you can reply under this topic and ping me.

I'm sorry to everyone who tried to help in this thread and was met with violent language. @Coding_Joe has been suspended for a period of time for their behavior.