How Does a Contract’s Constructor Relate to Its Gas Usage during Deployment?

A contract's constructor is executed only once, during the contract's deployment. The gas used by the constructor is part of the total deployment cost and is consumed upfront.

The total gas limit for deployment is higher than the transaction gas limit for regular function calls. The gas used in the constructor does not affect the gas stipend provided during later Ether transfers to the deployed contract.

Does the Send Function Have the Same Gas Limitations as Transfer ?
What Is the Role of the UTXO Model in Preventing Double-Spending?
How Have Recent Versions of Solidity Changed the Behavior of Fallback Functions to Mitigate This Risk?
Does the Proxy Pattern Affect the Cost of Contract Deployment?
How Do Modern Solidity Versions Recommend Handling Ether Transfers Instead of Using a Gas Stipend?
How Does the Concept of ‘Liquidity Mining’ Boost Stablecoin Usage?
Can a Contract’s Fallback Function Intentionally Consume More than 2,300 Gas?
How Do Complex Smart Contracts Affect Gas Usage?

Glossar