here is the deployment transaction link https://sepolia.etherscan.io/tx/0xd04e03bd757f0a3b3aed7573a4e0922d09ac564a43c4b8a2ae543a7606f28c67
this is the code below
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./IERC20.sol";
contract myCoin is IERC20 {
string public name = "My Coin";
string public symbol = "MCN";
uint256 public totalSupply= 100000000000000000000000;
uint256 public decimals = 18;
address public owner;
mapping(address => uint256) public balanceOf;
mapping(address=>mapping(address=>uint256)) public allowance;
event Transfer(
address indexed to,
uint256 value
);
event TransferFrom(
address indexed from,
address indexed to,
uint256 value
);
event Burn(
address indexed from,
uint256 value
);
event Mint(
address indexed to,
uint256 value
);
constructor(){
owner = msg.sender;
balanceOf[msg.sender] = totalSupply;
}
modifier onlyOwner(){
require(owner == msg.sender, "Not owner!!");
_;
}
function transfer(address to, uint256 value) external returns (bool){
balanceOf[msg.sender] -= value;
require(balanceOf[msg.sender] >= value, "Insufficient balance");
balanceOf[to] += value;
emit Transfer(to, value);
return true;
}
function transferFrom(address from, address to, uint256 value) external returns (bool){
allowance[from][msg.sender] -= value;
balanceOf[from] -= value;
balanceOf[to] += value;
emit TransferFrom(from, to, value);
return true;
}
function approve(address from, uint256 value) external returns (bool){
allowance[msg.sender][from] = value;
emit Approval(msg.sender, from, value);
return true;
}
function burn(uint256 value) public onlyOwner {
require(balanceOf[msg.sender] >= value, "Insufficient balance");
balanceOf[msg.sender] -= value;
totalSupply -= value;
emit Burn(msg.sender, value);
}
function mint(address to, uint256 value) public onlyOwner {
balanceOf[to] += value;
totalSupply += value;
emit Mint(to, value);
}
}