Constants
State variables can be declared as constant
. Value of constant
variables must be set before compilation and it cannot be modified after the contract is compiled.
Why use constants?
Compared to state variables, constant variables use less gas.
Style guide
Following convention, constants should be named with all capital letters with underscore separating words.
Last updated
Was this helpful?