[][src]Function casperlabs_contract::ext_ffi::get_phase

pub unsafe extern "C" fn get_phase(dest_ptr: *mut u8)

This function writes bytes representing the current phase of the deploy execution to the specified pointer. The size of the result is always one byte, it is up to the caller to ensure one byte of memory is allocated at dest_ptr, otherwise data corruption in the wasm memory could occur. The one byte is interpreted as follows: 0 means a system phase (should never be encountered by user deploys), 1 means the payment phase, 2 means the session phase and 3 means the finalization phase (should never be encountered by user code).

Arguments

  • dest_ptr - pointer to position in wasm memory to write the result