I’m not understanding how erc20 token contract and crowdsale contract works together.
If I set the total supply of tokens in an erc20 token contract why do I have to send it to the crowdsale contract? It wouldn’t be easier to discount from the holder account in erc20 contract?
I also have some doubts about how
approve function works. It seems to me that anyone can call this function out of the contract and not
onlyOwner. In that way, function
approve has to be called in a crowdsale contract?