Understand Sui’s unique object-centric architecture and how objects serve as the foundation of the Sui blockchain.
Sui’s object model is fundamentally different from account-based blockchains. Instead of organizing state around accounts, Sui treats everything as an object - making it the fundamental unit of storage and the primary building block for on-chain assets and logic.
pub struct MoveObject { /// The type of this object. Immutable type_: MoveObjectType, /// DEPRECATED this field is no longer used to determine transfer has_public_transfer: bool, /// Number that increases each time a tx takes this object as a mutable input /// This is a lamport timestamp, not a sequentially increasing version version: SequenceNumber, /// BCS bytes of a Move struct value contents: Vec<u8>,}
Why Lamport Timestamps?
Sui uses Lamport timestamps instead of simple sequential numbers to support causally ordered execution. When an object is used as input to a transaction, its version is updated based on the maximum version of all inputs plus one.
Sui has several singleton objects with hardcoded IDs:
/// The hardcoded ID for the singleton Sui System State Object.const SUI_SYSTEM_STATE_OBJECT_ID: address = @0x5;/// The hardcoded ID for the singleton Clock Object.const SUI_CLOCK_OBJECT_ID: address = @0x6;/// The hardcoded ID for the singleton AuthenticatorState Object.const SUI_AUTHENTICATOR_STATE_ID: address = @0x7;/// The hardcoded ID for the singleton Random Object.const SUI_RANDOM_ID: address = @0x8;
Objects have size constraints defined in the protocol:
if contents.len() as u64 > max_move_object_size { return Err(ExecutionError::from_kind( ExecutionErrorKind::MoveObjectTooBig { object_size: contents.len() as u64, max_object_size: max_move_object_size, }, ));}
The default maximum object size is configured in the protocol config, with exceptions for system objects when allow_unbounded_system_objects() is enabled.