Observing State
Read values from logic or actor storage:
observe <logic>.<Logic|actor>.field
Examples
# Logic state
observe Flipper.Logic.value
# Actor state (using Sender, username, or identifier)
observe ContextFlipper.Sender.value
observe ContextFlipper.default_user.value
observe ContextFlipper.0x3354...1a13.value
# Map values (access by key)
observe MapLogic.Logic.mapValue["key"]
Atomic Storage
MOI uses atomic storage — you can only access individual map keys, not complete maps. This reduces data transfer from the blockchain.
observe MapLogic.Logic.mapValue # Returns key count only
observe MapLogic.Logic.mapValue["x"] # Returns actual value
Storage Keys
For advanced use, generate storage keys directly:
storagekey <slot> idx(<u64>) fld(<u8>) key(<0xMapKey>)
>>> storagekey 0 idx(7898) fld(99) key(0x79d5...6f5d)
0xe5cc...5327
>>> observe MyLogic.Logic.0xe5cc...5327