As far as I know, in order to create a contract, a contract account is created which contains the code. When this account is triggered by a transaction or message call, the EVM executes this code.

What about smart contracts launching new cryptocurrencies? What triggers their execution? It looks like they are always executed.

1 Answer 1


The most popular library for creating a Crowdsale and a Token is OpenZeppelin. A Crowdsale contract receives the Token address that has been created separately.

In an [earlier version](https://github.com/OpenZeppelin/openzeppelin-solidity/blob/c5d66183abcb63a90a2528b8333b2b17067629fc/contracts/crowdsale/Crowdsale.dol], the Token contract got created inside the Crowdsale constructor. That was limiting as a complex token and crowdsale would need to be deployed in one transaction that sometimes would exceeded the blockgaslimit and then couldn't be deployed anymore.

Every single payment that comes into the Crowdsale contact then allocates tokens for the buyer (usually only if some conditions are met such that the purchase happened after the start and before the end time of the Crowdsale).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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