Accessing the Ledger
Learn how you can directly access the Stellar ledger from a zephyr program.
Reading contract data entries
/// Returns the instance object of a certain contract from
/// the host's ledger.
pub fn read_contract_instance(&self, contract: [u8; 32]) -> Result<Option<ContractDataEntry>, SdkError> {}
/// Returns the requested entry object of a certain contract
/// from the host's ledger.
pub fn read_contract_entry_by_key(&self, contract: [u8; 32], key: ScVal) -> Result<Option<ContractDataEntry>, SdkError> {}
/// Returns all the entry objects of a certain contract
/// from the host's ledger.
pub fn read_contract_entries(&self, contract: [u8; 32]) -> Result<Vec<ContractDataEntry>, SdkError> {}
/// Returns all the entry objects of a certain contract
/// from the host's ledger. This function retuns an iteraror
/// over Soroban host objects, and should be used along with the
/// Soroban SDK.
pub fn read_contract_entries_to_env(&self, env: &soroban_sdk::Env, contract: [u8; 32]) -> Result<Map<Val, Val>, SdkError> {}Last updated