How to use the Solidity Burn function?

Newbie here,

Can someone explain how to use the Burn function in a solidity contract? I have a token with 1 trillion supply and I would like to burn 1% when necessary. The Function is asking for a amount = uinit256. I am stuck on what the input would be. I have tried entering 10000000000 and it only burns 1 token.


I think almost every tokens has decimals, such as the decimals of DAI is 18, the the decimals of USDC is 6, so when we say 1 token, actually the number should be 1 * 10 ** decimals, eg, 1 DAI = 10**18

1 Like

Hi @Skyge
I hope you are doing well.

Can you let me know your email or phone number ?

All conversations should be public and please do not ask different thing in a topic.

Looks like the decimals in your contract is 10 and hence 1 token is burned.
10000000000 / (10**10) = 1

1 Like