Crowdsale contract with token already deployed

Hi there. I want to create a crowdsale contract to sell an erc20 token that I have already deployed and that has no sales functions. Can anyone help me understand what is the process to do this?

Is there an example of how to do this?

Thank you.

What exactly do you want to do?

Hi! I want users to enter my website and be able to buy my Bep20 token with BNB using their Metamask wallet. I would like to be able to modify the beginning and end of the ICO. In such a way that those values ​​could modify them.

The token is already on the blockchain. Now I need to create a crowdsale contract that makes the sale. But I don't know how to relate the contract of my already deployed token with the crowdsale contract.


Maybe you can have a look at this tutorial:

Thanks. Yes I saw it. The problem is that having the BEP20 token already deployed I can't put the "SimpleToken.sol" contract and I don't know how to write the "2_deploy.js" so that it relates to my Bep20 token