Contracts
Contracts in Ola are similar to Solidity languages. Each contract can contain declarations of State Variables
, Functions
, Events
, Struct Types
and Enum Types
.
There are also special kinds of contracts called libraries
and interface
.
The section about contracts contains more details than this section, which serves to provide a quick overview.
State Variables
State variables are variables whose values are permanently stored in contract storage.
Functions
Functions are the executable units of code. Functions are usually defined inside a contract.
Functions accept parameters
and return
variables to pass parameters and values between them.
Events
Events are convenience interfaces with the Ola logging facilities.
Struct Types
Structs are custom defined types that can group several variables
Enum Types
Enums can be used to create custom types with a finite set of constant values
Last updated