Function casper_contract::ext_ffi::casper_record_transfer[][src]

pub unsafe extern "C" fn casper_record_transfer(
    maybe_to_ptr: *const u8,
    maybe_to_size: usize,
    source_ptr: *const u8,
    source_size: usize,
    target_ptr: *const u8,
    target_size: usize,
    amount_ptr: *const u8,
    amount_size: usize,
    id_ptr: *const u8,
    id_size: usize
) -> i32
Expand description

Records a transfer. Can only be called from within the mint contract. Needed to support system contract-based execution.

Arguments

  • maybe_to_ptr - pointer in wasm memory to bytes representing the recipient Option<AccountHash>
  • maybe_to_size - size of the source Option<AccountHash> (in bytes)
  • source_ptr - pointer in wasm memory to bytes representing the source URef to transfer from
  • source_size - size of the source URef (in bytes)
  • target_ptr - pointer in wasm memory to bytes representing the target URef to transfer to
  • target_size - size of the target (in bytes)
  • amount_ptr - pointer in wasm memory to bytes representing the amount to transfer to the target account
  • amount_size - size of the amount (in bytes)
  • id_ptr - pointer in wasm memory to bytes representing the user-defined transaction id
  • id_size - size of the id (in bytes)