0

We started to work on smart contract project on BEP20 tokens and we deployed a smart contract , now one of my customer wants to burn some tokens but in our contract i saw that _burn and _burnFrom both are interal functions and couldn't able to call them from outside, so now my question is- how come we burn the tokens since both are internal functions, please let us know.

1 Answer 1

1

Use at your own risk

You cannot call those internal methods if your contract is deployed and it does not have a public method that can invoke those 2 functions.

However, there is another way to burn tokens and it is by sending them to an inaccessible address or contract. This has the same effect as burning but it will not reduce the value that is stored "totalsupply" variable

On the Ethereum mainnet developers/people usually send their tokens to one of these 2 addresses (some contracts don't let you send it to the zero address and therefore you must use the dead address or any other inaccessible one)

Zero Address: 0x0000000000000000000000000000000000000000

Dead Address: 0x000000000000000000000000000000000000dEaD

1
  • Thank you for your reply, believe the second option will help us! Commented Jul 21, 2022 at 7:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.