DEV Community

Cover image for Day 3 - Initializing Smart Contract
Vedant Chainani
Vedant Chainani

Posted on • Updated on

Day 3 - Initializing Smart Contract

This is Day 3 of 30 in Solidity Series
Today I Learned About Initializing a Smart Contract in Solidity.

Smart contracts are simply programs stored on a blockchain that run when predetermined conditions are met. They typically are used to automate the execution of an agreement so that all participants can be immediately certain of the outcome, without any intermediary’s involvement or time loss. They can also automate a workflow, triggering the next action when conditions are met.

contract ContractName {
Enter fullscreen mode Exit fullscreen mode

It is Recommended to use Pascal case Notation for the Contract Name, you should capitalize first letter of each word in the contract name. eg -

Enter fullscreen mode Exit fullscreen mode

GitHub logo Envoy-VC / 30-Days-of-Solidity

30 Days of Solidity step-by-step guide to learn Smart Contract Development.

Top comments (1)

yongchanghe profile image
Yongchang He

If you have state variables in your contract, you can use constructor as an alternative to initialize them. Here is an example from Smart Contract Engineer channel. Enjoy and have fun!