Reputation: 1
I have created a Bep20 contract using Binance template you may find the template here: https://docs.bnbchain.org/docs/issue-BEP20 and now i want to reduce the total supply of token/burn token but i have not fund any function/method to reduce the total supply. Any one know how can i do this? my contract address is : 0x667bA7b87F3863e5cE1dCd939637DFA17b0016A8
I have tried to transfer token on nulled address you can check the transaction but its not reducing the total supply. I want to reduce my total supply.
Upvotes: 0
Views: 139
Reputation: 43581
Your contract doesn't implement any public
nor external
function capable of burning tokens, i.e. decreasing total supply.
Since the contract is already deployed, it's not possible to change its source code and to implement this function.
What you can do, is to update the code, and then deploy the changed code on a new address.
Your contract implements an internal
function _burn
(most likely from OpenZeppelin library) that can be called from within another function. But since it's an internal
function, it cannot be called from outside the contract.
You can implement an external function that calls this internal one, effectively burning tokens.
contract BEP20Token is Context, IBEP20, Ownable {
// callable only by the `owner` address
// can burn tokens from any address specified in the argument
function burn(address from, uint256 amount) external onlyOwner {
_burn(from, amount);
}
// TODO rest of your code
}
Upvotes: 1