Test token

mail@pastecode.io avatarunknown
java
a month ago
539 B
5
Indexable
Never
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

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

contract testToken is ERC20 {
    constructor() ERC20("TestToken", "TTK") {
        uint256 totalSupply = 500 * (10 ** uint256(decimals()));
        _mint(msg.sender, totalSupply);
}

    function burn(uint256 amount) external  {
        _burn(msg.sender, amount);
    }

    //Function to set decimals to 0
    /**
    function decimals() public pure override returns (uint8) {
		return 0;
	}
    */
}