Function casper_contract::ext_ffi::casper_dictionary_put[][src]

pub unsafe extern "C" fn casper_dictionary_put(
    uref_ptr: *const u8,
    uref_size: usize,
    key_ptr: *const u8,
    key_size: usize,
    value_ptr: *const u8,
    value_size: usize
) -> i32
Expand description

The bytes in wasm memory from offset key_ptr to key_ptr + key_size will be used together with the passed URef’s seed to form a dictionary. This function writes the provided value (read via de-serializing the bytes in wasm memory from offset value_ptr to value_ptr + value_size) under that dictionary in the global state. This function will cause a Trap if the value fails to de-serialize.

Arguments

  • uref_ptr - pointer to bytes representing the user-defined key
  • uref_size - size of the key (in bytes)
  • key_ptr - pointer to bytes representing the user-defined key to write to
  • key_size - size of the key (in bytes)
  • value_ptr - pointer to bytes representing the value to write at the key
  • value_size - size of the value (in bytes)