db_lookup_local

Function db_lookup_local 

Source
pub fn db_lookup_local(
    contract_id: ContractId,
    db_name: &str,
) -> GenericResult<DbHandle>
Expand description

Open a tx-local database instance for the given contract. A contract is able to read any tx-local database.

If the calling contract is opening its own db, the db will be created and initialized in-memory.

Returns a DbHandle which is used with methods for reading and writing.

ยงPermissions

  • ContractSection::Deploy
  • ContractSection::Metadata
  • ContractSection::Exec
  • ContractSection::Update