Developer tutorial on Soroban state management covering persistent, temporary, and instance storage types, rental fees for data storage, and practical code examples for storing and extending contract data on the Stellar blockchain.
This tutorial explores how data is stored on Stellar's Soroban smart contract platform and addresses state bloat through a rental fee system. The speaker explains three primary storage types: persistent storage for long-term critical data, temporary storage for short-lived data, and instance storage for contract-specific configuration. Soroban uses a Merkle tree structure for secure data archival and restoration. The tutorial includes practical code examples demonstrating how to set, get, and extend the time-to-live (TTL) for contract data using methods like has, get, set, update, extend TTL, and remove. The speaker walks through deploying a contract to testnet, storing a value, retrieving it, and extending its lifetime to prevent data expiration.