Function casper_contract::ext_ffi::casper_dictionary_get[][src]

pub unsafe extern "C" fn casper_dictionary_get(
    uref_ptr: *const u8,
    uref_size: usize,
    key_bytes_ptr: *const u8,
    key_bytes_size: usize,
    output_size: *mut usize
) -> i32
Expand description

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 dictionary. The value at that dictionary is read from the global state, serialized and buffered in the runtime. This result can be obtained via the casper_read_host_buffer function.

Arguments

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