[][src]Function casperlabs_contract::ext_ffi::read_value_local

pub unsafe extern "C" fn read_value_local(
    key_ptr: *const u8,
    key_size: usize,
    output_size: *mut usize
) -> i32

The bytes in wasm memory from offset key_ptr to key_ptr + key_size will be used together with the current context’s seed to form a local key. The value at that local key is read from the global state, serialized and buffered in the runtime. This result can be obtained via the read_host_buffer function.

Arguments

  • key_ptr - pointer to bytes representing the user-defined key
  • key_size - size of the key (in bytes)
  • output_size - pointer to a value where host will write size of bytes read from given key