Where are Crowdsale contracts in OpenZeppelin Contracts 3.0?

Hello. Is the situation with the crowdsale related contracts the same (Where is ERC20Mintable.sol in OpenZeppelin Contracts 3.0?)? Seems it was removed in this commit.

I don’t want to push you, but maybe you could provide any rough estimate when do you plan to add it back?

Thanks for your help and the great job you’re doing.

1 Like

Hi @Revinand,

Welcome to the community :wave:.

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).

Got it. Thanks for a quick reply

1 Like

Hi @Revinand,

Are you working on a Crowdsale?
Are you importing OpenZeppelin Contracts via npm or via GitHub?

Hello @abcoathup,

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.

1 Like

Hi @Revinand,

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?

As an FYI: OpenZeppelin CLI 2.8: Release Candidate includes regular (non-upgradeable) deploys.

So you could test with OpenZeppelin Test Environment and deploy with OpenZeppelin CLI.

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.



1 Like