[−][src]Function casperlabs_contract::ext_ffi::create_purse
pub unsafe extern "C" fn create_purse(
purse_ptr: *const u8,
purse_size: usize
) -> i32
This function uses the mint contract to create a new, empty purse. If the
call is successful then the casperlabs_types::uref::URef
(in serialized form) is written
to the indicated place in wasm memory. It is up to the caller to ensure at
least purse_size
bytes are allocated at purse_ptr
, otherwise
data corruption may occur. This function causes a Trap
if
purse_size
is not equal to 38.
Arguments
purse_ptr
- pointer to position in wasm memory where to write the createdcasperlabs_types::uref::URef
purse_size
- allocated size for thecasperlabs_types::uref::URef