Hi, guys. I’m new here , just found our community is so good. i tried my best to find out ,but couldn’t.
So here is the problems.
I’m creating a Token with burnning function (Burning rate 5%), I tried so many way and times , it doesn’t work
What should I do ? Or should I put in ?
Here is my code.
pragma solidity ^0.8.0;
import “https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol”;
import “https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/ERC20Burnable.sol”;
contract TEST is ERC20{
constructor ( uint256 initialSupply) public ERC20 (“TEST” , “TT”){
_mint(msg.sender,initialSupply);
function burn(address to, uint256 amount) public onlyOwner {
_burn(to, amount);
}
}
Pls feel free to contact me ~THX SO MUCH