db_get

Function db_get 

Source
pub(crate) fn db_get(
    ctx: FunctionEnvMut<'_, Env>,
    ptr: WasmPtr<u8>,
    ptr_len: u32,
) -> i64
Expand description

Reads a value by key from the on-chain key-value store.

On success, returns the length of the objects Vector in the environment. Otherwise, returns an error code.

ยงPermissions

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