pub fn transfer_to_account(target: AccountHash, amount: U512, id: Option<u64>) -> TransferResult {
    let (target_ptr, target_size, _bytes1) = contract_api::to_ptr(target);
    let (amount_ptr, amount_size, _bytes2) = contract_api::to_ptr(amount);
    let (id_ptr, id_size, _bytes3) = contract_api::to_ptr(id);
    let mut maybe_result_value = MaybeUninit::uninit();

    let return_code = unsafe {
        ext_ffi::casper_transfer_to_account(
            target_ptr,
            target_size,
            amount_ptr,
            amount_size,
            id_ptr,
            id_size,
            maybe_result_value.as_mut_ptr(),
        )
    };

    // Propagate error (if any)
    api_error::result_from(return_code)?;

    // Return appropriate result if transfer was successful
    let transferred_to_value = unsafe { maybe_result_value.assume_init() };
    TransferredTo::result_from(transferred_to_value)
}
/// Transfers `amount` of motes from the default purse of the account to `target`
/// account.  If `target` does not exist it will be created.
Transfers `amount` of motes from the default purse of the account to `target`
account.  If `target` does not exist it will be created.
Transfers ` amount ` of motes from the default purse of the account to ` target ` account . If ` target ` does not exist it will be created .
pub fn transfer_to_account(target: AccountHash, amount: U512, id: Option<u64>) -> TransferResult {
    let (target_ptr, target_size, _bytes1) = contract_api::to_ptr(target);
    let (amount_ptr, amount_size, _bytes2) = contract_api::to_ptr(amount);
    let (id_ptr, id_size, _bytes3) = contract_api::to_ptr(id);
    let mut maybe_result_value = MaybeUninit::uninit();
    let return_code = unsafe {
        ext_ffi::casper_transfer_to_account(
            target_ptr,
            target_size,
            amount_ptr,
            amount_size,
            id_ptr,
            id_size,
            maybe_result_value.as_mut_ptr(),
        )
    };
    // Propagate error (if any)
    api_error::result_from(return_code)?;
    // Return appropriate result if transfer was successful
    let transferred_to_value = unsafe { maybe_result_value.assume_init() };
    TransferredTo::result_from(transferred_to_value)
}
pub fn transfer_to_account ( target : AccountHash , amount : U512 , id : Option < u64 > ) -> TransferResult { let ( target_ptr , target_size , _bytes1 ) = contract_api :: to_ptr ( target ) ; let ( amount_ptr , amount_size , _bytes2 ) = contract_api :: to_ptr ( amount ) ; let ( id_ptr , id_size , _bytes3 ) = contract_api :: to_ptr ( id ) ; let mut maybe_result_value = MaybeUninit :: uninit ( ) ; let return_code = unsafe { ext_ffi :: casper_transfer_to_account ( target_ptr , target_size , amount_ptr , amount_size , id_ptr , id_size , maybe_result_value . as_mut_ptr ( ) , ) } ; // Propagate error (if any) api_error :: result_from ( return_code ) ? ; // Return appropriate result if transfer was successful let transferred_to_value = unsafe { maybe_result_value . assume_init ( ) } ; TransferredTo :: result_from ( transferred_to_value ) }
Transfers `amount` of motes from the default purse of the account to `target`
account.
Transfers ` amount ` of motes from the default purse of the account to ` target ` account .
target
AccountHash
amount
U512
id
Option<u64>
target
AccountHash
amount
U512
id
Option<u64>