owner
variable in GivingThanks.sol
is declared as a public
state variable. Since this value is set only once during contract deployment and is not intended to change thereafter, it can be marked as immutable
to save gas costs associated with storage. By using immutable
, the value is set only during the constructor, reducing gas costs for accessing the owner
variable.owner
variable immutable
, gas costs for reading the owner
address will be reduced. This is especially useful in contracts with frequent interactions, where saving on gas can lead to overall cost reductions. The functionality of the contract is not affected, as the owner
is not intended to be changed after deployment.Manual code review
It is recommended to mark the owner
variable as immutable
since it is only set once during contract deployment and does not change afterward. This can be achieved by using the immutable
keyword.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.