const statement

Syntax
ConstStatement :
   const IDENTIFIER: Type = Expression

A const statement introduces a named constant value. Constants are either directly inlined wherever they are used or loaded from the contract code depending on their type.

Note: Constants do only support literals at this point

Example:


const TEN: u256 = 10

contract Foo:

  pub fn bar() -> u256:
    return TEN * 5