db_set_local

Function db_set_local 

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

Set a value in the tx-local database for the given DbHandle.

  • ptr must contain the DbHandle index and the key-value pair.
  • The DbHandle must match the ContractId.

Returns SUCCESS on success, otherwise returns an error value.

ยงPermissions

  • ContractSection::Deploy
  • ContractSection::Update