I have found and deployed an ERC20 smart contract with a crowdsale function. I could set up:
- the number of initial tokens which were minted on my address when I deployed the contract
- the number of tokens reserved to be minted in the crowdsale
- the price of crowdsale: number of tokens / 1 ETH
I tested it and it's working as supposed. All great. But now I thought some more and I want a burn function to it. I want to burn 3% from each transaction until total supply reach a specific number or a percentage from the initial supply. I am not a developer, I just found the code, and I'm afraid to add new functions. I think the contract is not upgradeable but I am willing the deploy another one with the burn function added.
Can someone help me with the code for the burn functions and explain me where exactly should I insert them in the initial code? Thank you!