Function casper_contract::ext_ffi::casper_ret[][src]

pub unsafe extern "C" fn casper_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 casper_call_contract or casper_call_versioned_contract). Additionally, the known URefs of the calling context are augmented with the URefs 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 URefs are invalid in the current context.

Arguments

  • value_ptr: pointer to bytes representing the value to return to the caller
  • value_size: size of the value (in bytes)