Encode-Club-Solidity-Foundations / Lesson-01

21 stars 14 forks source link

What is constructor? #8

Closed zklim closed 1 year ago

MatheusDaros commented 1 year ago

Constructor functions are only executed once when the contract is first deployed. Like constructor in many class-based programming languages, these functions often initialize state variables to their specified values. Read more about it in the docs at Constructor definition and in the Contract creation.