-
Notifications
You must be signed in to change notification settings - Fork 11.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: Ability to use crowdsale contract with pre minted tokens #554
Conversation
Actually the We're making a release today so I can't look at it in detail no but we'll do it soon. Thanks @MADANA-HQ! |
I like this; would simplify a lot of usecases that currently require copy-pasting Crowdsale and changing the token interface. Does composite crowdsale also solve this issue, though? |
@shrugs As far as I understand, the CompositeCrowdsale does not solve this issue. I believe though that they would fit together by combining the CompositeCrowdsale with a DistributionStrategy which then pseudo mints tokens via the PseudoMinter contract. |
@MADANA-HQ |
Legal issues and perhaps other reasons such as pre sales require the need to use the crowdsale contract with already minted tokens. Currently the zeppelin-solidity repo does not offer a solution for this problem. I have developed a small contract which can be assigned tokens with the StandardTokens approve function and therefore gains pseudo minting abilities. This contract can be passed on to the Crowdsale contract, allowing it to sell the already minted tokens.
Because of the various important steps needed to be done outside of the crowdsale contract, I opted to create an example including a vault contract in which the that outside logic is shown.
Further I created a Mintable interface, which replaces the MintableToken inside the Crowdsale contract. This is not necessary and possibly creates backwards compatibility issues, however I chose to add an interface for better code structure and to prevent misconception.
Fixes #351.