# Burnable token

**URL:** <https://forum.openzeppelin.com/t/burnable-token/12815>\
**Category:** Contracts\
**Tags:** erc20\
**Created:** [July 21, 2021, 1:33am UTC](https://forum.openzeppelin.com/t/burnable-token/12815 "2021-07-21T01:33:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jesmincoin](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.openzeppelin.com/jesmincoin/32/7671_2.png) [@Jesmincoin](https://forum.openzeppelin.com/u/Jesmincoin)\
**Post date:** [July 21, 2021, 1:33am UTC](https://forum.openzeppelin.com/t/burnable-token/12815/1 "2021-07-21T01:33:48Z")

</div>

Good day can someone please help me i imported my code from openzepelin contract after i deployed to testnet i tested the functions several times but it is giving a wrong out put. i deployed 5000 token but when I tried to burn 3000 from it, my total supply turn to 4,999.999999 while 0.0000003 was only send to dead wallet.

this is the code

```auto
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
   
    
import"https://github.com/abcoathup/openzeppelin-contracts/blob/release-v3.1.0/contracts/token/ERC20/ERC20.sol";
import"https://github.com/abcoathup/openzeppelin-contracts/blob/release-v3.1.0/contracts/token/ERC20/ERC20Burnable.sol";
import"https://github.com/abcoathup/openzeppelin-contracts/blob/release-v3.1.0/contracts/math/SafeMath.sol";
import"https://github.com/abcoathup/openzeppelin-contracts/blob/release-v3.1.0/contracts/access/Ownable.sol";

contract MyToken is ERC20,ERC20Burnable,Ownable{
    constructor () public ERC20("Solace Token", "SLT") {
        _mint(msg.sender, 5000 * (10 ** uint256(decimals())));
    }
   
}

```

---

<div class="post-metadata">

**Author:** ![hlampe](https://avatars.discourse-cdn.com/v4/letter/h/5f9b8f/32.png) [@hlampe](https://forum.openzeppelin.com/u/hlampe)\
**Post date:** [December 12, 2021, 2:11am UTC](https://forum.openzeppelin.com/t/burnable-token/12815/2 "2021-12-12T02:11:14Z")

</div>

To burn 3000, you have to look at the number of digits in the token. If you have 18 digits, to burn 3000, you must burn 3000000000000000000000000000000000.
