[−][src]Function casperlabs_contract::ext_ffi::ret
pub unsafe extern "C" fn ret(value_ptr: *const u8, value_size: usize) -> !
This function causes a Trap
, terminating the currently running module,
but first copies the bytes from value_ptr
to value_ptr + value_size
to
a buffer which is returned to the calling module (if this module was
invoked by call_contract
or call_versioned_contract
). Additionally, the known
casperlabs_types::uref::URef
s of the calling context are augmented with the
casperlabs_types::uref::URef
s de-serialized from wasm memory offset
extra_urefs_ptr
to extra_urefs_ptr + extra_urefs_size
. This function will cause a
Trap
if the bytes at extra_urefs_ptr
cannot be de-serialized as type Vec<URef>
, or
if any of the extra casperlabs_types::uref::URef
s are invalid in the current
context.
Arguments
value_ptr
: pointer to bytes representing the value to return to the callervalue_size
: size of the value (in bytes)