I have everything up and running but the transaction always reverts and I tracked it down to this line:
So within the token contract I get
msg.sender to be the Crowdsale contract. However, since the crowdsale contract get's deployed after the token contract, all the tokens are at the address that created the token contract and my guess is that this is causing the revert - because the crowdsale does not have any tokens.
Hence, I have 3 questions:
- is this correct?
- does this simply mean that I need to transfer all tokens to the crowdsale contract?
- is there a way to automate this?