Skip to content

Latest commit

 

History

History
16 lines (11 loc) · 503 Bytes

constants.rst

File metadata and controls

16 lines (11 loc) · 503 Bytes

Constants

Constants can be declared at the global level or at the contract level, just like contract storage variables. They do not use any contract storage and cannot be modified. The variable must have an initializer, which must be a constant expression. It is not allowed to call functions or read variables in the initializer:

string constant greeting = "Hello, World!";

contract ethereum {
    uint constant byzantium_block = 4_370_000;
}