I want to develop a crowd_sale contract. I have an ERC20 token contract. Now I want to transfer the tokens to the crowdsale contract at the time of deployment, so that people can buy tokens from that contract and also the ether they send to that contract should get deposited to my wallet. Main hurdle I am facing is to send the tokens to the crowdsale contract .

1 Answer 1


Try writing this in your deploy scripts:

await token.transfer(Crowdsale_Contract_Name.address, 'number of tokens to transfer to the contract')

For example:

await token.transfer(crowdSale.address, '1000000000000000000000000')

  • Hey thanks for answering. I was actually developing on remix. Is there any way. I am not using any of the libraries. Trying to create my own simple contract. Sep 12, 2022 at 6:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.