[][src]Function casperlabs_contract::ext_ffi::new_uref

pub unsafe extern "C" fn new_uref(
    uref_ptr: *mut u8,
    value_ptr: *const u8,
    value_size: usize
)

This function causes the runtime to generate a new casperlabs_types::uref::URef, with the provided value stored under it in the global state. The new casperlabs_types::uref::URef is written (in serialized form) to the wasm linear memory starting from the key_ptr offset. Note that data corruption is possible if not enough memory is allocated for the casperlabs_types::uref::URef at key_ptr. This function will cause a Trap if the bytes in wasm memory from offset value_ptr to value_ptr + value_size cannot be de-serialized into a Value.

Arguments