Storage
Leo provides storage variables for persistent on-chain state that isn't tied to record ownership or mapping key-value lookups:
leo
storage count: u64;
storage rolling_hash: field;
final fn finalize_increment(next: u64) {
count = next;
rolling_hash = BHP256::hash_to_field(next);
}
Storage variables and vectors persist across transitions and are publicly readable. Use them for counters, configuration state, accumulator patterns, and any data that needs to live on-chain without the key-value structure of a mapping or the ownership model of a record.