[−][src]Function casperlabs_contract::ext_ffi::add
pub unsafe extern "C" fn add(
key_ptr: *const u8,
key_size: usize,
value_ptr: *const u8,
value_size: usize
)
This function adds the provided value (read via de-serializing the bytes
in wasm memory from offset value_ptr
to value_ptr + value_size
) to the
current value under the provided key (read via de-serializing the bytes in
wasm memory from offset key_ptr
to key_ptr + key_size
) in the global
state. This function will cause a Trap
if the key or value fail to
de-serialize or if adding to that key is not permitted, or no value
presently exists at that key.
Arguments
key_ptr
- pointer to bytes representing the key to write tokey_size
- size of the key (in bytes)value_ptr
- pointer to bytes representing the value to write at the keyvalue_size
- size of the value (in bytes)