Basically, I already have ERC20 token created, which is using solidity 0.8.2 and OpenZeppelin version 4.5.0. I know that Crowdsales supports only OpenZeppelin Contracts 2.x version. I am not sure if I can use my already created Token with Crowdsale. Will it work considering both contracts use a different OpenZeppelin version?
I think yes, you can, although using two different versions in a project is not a good idea. But you know, sometimes, when the two contracts are used in combination, maybe they will generate some unexpected result, so I think you should test more when you publish these two contracts to use together.
Great, thanks for the advice. I try to test them, hopefully, there won't be any conflicts. I need two different versions because my token should be upgradeable and only OZ version >=3 provides this feature.
I also found the article that desribes how Crowdsale could be modified to work with OZ4. I don't know if this is safe, what do you think?
We eventually decided to do pre-ICO manually as this was sufficient in our case. Unfortunately, I haven't decided yet how to approach ICO - whether to code custom code or update the OZ crowdsale. I am leaning towards the former as there are some github repos like this one, and the code is pretty straightforward.