Implement ERC20 token with burn and mint functions?

Hi @chloecarvalho220,

I suggest you extend from OpenZeppelin Contracts to create an ERC20 token rather than creating your own, as there look to be multiple issues in the contract you have.

I suggest only having functionality in a token if it is required for the life of the token. So I wouldn’t include crowdsale functionality in a token as a crowdsale has a limited life.

You could look at Simple ERC20 Crowdsale.


As an aside, see how to Format code in the forum. I formatted your code using this.