Crowdsales have been removed from the OpenZeppelin Contracts v3.0 beta release and there are no plans to migrate them to Solidity 0.6. If you need a crowdsale you can use OpenZeppelin Contracts 2.5:
Crowdsales were removed: we’ll continue to provide support for security issues on the v2.5 release, but will not bring them over to v3.0.
Note: You should only use code published in an official release of OpenZeppelin Contracts. When importing via GitHub on Remix you can specify the release tag, (otherwise you will get the latest code in the master branch).
Yes, I am. It’s a small crowdsale, so I need a very basic functionality, but I want to follow the best practices. That’s why I chose OpenZeppelin and asked why did you remove these contracts from the new version. If you say that v2.5 is ok, then it’s fine for me.
For now I’m using truffle as testing environment (didn’t have much time to try yours) and importing contracts via npm.
Also I noticed that you have Network JS project and going to try it in my React app.
Crowdsales are in OpenZeppelin Contracts 2.5. Feel free to ask any questions that you need.
Any solution should be appropriately tested and audited. You should also obtain appropriate regulatory advice.
Crowdsales weren’t included in the migration to Solidity 0.6 (OpenZeppelin Contracts 3.0) based on need/demand.
Out of interest, what is your token being used for?
Hello @abcoathup, since crowdsales will be removed with v3.0 What is the recommended pattern as a replacement for them? In my solution I will be deploying N number of token contracts (ERC777).
The buyer of a token must send ether and the ether gets transferred to the issuer of those tokens (just like in buyTokens in Crowdsale). The tokens will be capped and are all minted at once.
May I make a suggestion. Please add the fact that crowdsales are deprecated in the docs. I started using them trusting the documentation and now I have invested too much time in them.
Kind of a follow-up question on this. So, my ERC-20 token is built using OpenZeppelin v3, and for crowd sale, I will need v2.5. So, is it okay to create these contracts in two different projects? Coz most ppl I know who were writing crowd sales wrote both their token and their crowd sale contract in the same project (the project is a truffle project and Openzeppelin is installed via npm).
I think having a project for a Crowdsale extending from OpenZeppelin Contracts 2.x and a separate project for an ERC20 token extending from OpenZeppelin Contracts 3.x is an acceptable approach.
The crowdsale has a limited life, whilst the token is meant to have a long life.
I know this is very old conversation but I want to use the crowdsale contract so my only option would be version 2.5 which is extremely old by now.
Is it still safe to use it now in 2021 or should I opt to custom or other solution?
Thank you very much. I have already started building the crowd sale using v2.5 and I intend to build the contract also using 2.5 so I don’t have to maintain two truffle projects one for the token and one for the ico.
There doesn’t seem to be important changes that would affect my project directly in newer versions.