0

I am exploring openzeppelinr-solidity smart contracts for Initial Coin Offering(ICO). There are two options available for a token smart contract one is to have hardcoded total supply tokens or mint a new token every time investor purchases a token.

Is it necessary that token must be mintable for a minted crowd sale?

What if my token is mintable but my crowd sale is non-minted?

1

Yes. It's about compatibility.

With a fixed-supply token, the deployer gets the supply initially and then can send an allowance to a crowdsale contract which will then sell them from inventory.

With a minted token, the sale contract calls the tokens mint() function with each sale to create the needed tokens on-the-fly.

If you mix up incompatible types, you could have a mintable crowdsale calling a non-existent mint function in the token contract. This strikes me as the obvious reason to have two variants - either you do or you don't want that step.

If I'm not mistaken, you can use a mintable token with an allowance-style sale. In that case, the minter would occasionally mint more tokens and send them to the crowdsale.

In any case, test your implementation thoroughly. It's a best practice to publish a code audit publicly so your buyers have some assurance that there is no oversight in the finished product.

Hope it helps.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.