Skip to main content

Module cache

Module cache 

Source
Expand description

Caching a ledger entry into a host slot.

Reading any ledger object other than the one the contract is attached to is two steps: compute the entry’s ID (see crate::ledger_entry_ids), then ask the host to load that entry into one of its cache slots. cache_le is the second step, and the slot it returns is what every slot-based handle is built from — LedgerObject::new for an object with no typed wrapper, <Entry>::new for one that has it.

Functions§

cache_le
Load the ledger entry with the given ID into a host cache slot, returning that slot.