pub fn transfer_coins(
        &mut self,
        space_delim_strings: &[&str],
        is_blocking: bool,
    ) -> Result<IndexAndSequence> {
        ensure!(
            space_delim_strings.len() >= 5 && space_delim_strings.len() <= 7,
            "Invalid number of arguments for transfer"
        );

        let (sender_account_address, _) =
            self.get_account_address_from_parameter(space_delim_strings[1])?;
        let (receiver_address, receiver_auth_key_opt) =
            self.get_account_address_from_parameter(space_delim_strings[2])?;

        let transfer_currency = space_delim_strings[4];
        let num_coins =
            self.convert_to_on_chain_represenation(space_delim_strings[3], transfer_currency)?;

        let gas_unit_price = if space_delim_strings.len() > 5 {
            Some(space_delim_strings[5].parse::<u64>().map_err(|error| {
                format_parse_data_error(
                    "gas_unit_price",
                    InputType::UnsignedInt,
                    space_delim_strings[5],
                    error,
                )
            })?)
        } else {
            None
        };

        let max_gas_amount = if space_delim_strings.len() > 6 {
            Some(space_delim_strings[6].parse::<u64>().map_err(|error| {
                format_parse_data_error(
                    "max_gas_amount",
                    InputType::UnsignedInt,
                    space_delim_strings[6],
                    error,
                )
            })?)
        } else {
            None
        };

        let gas_currency = if space_delim_strings.len() > 7 {
            space_delim_strings[7].to_owned()
        } else {
            transfer_currency.to_owned()
        };

        let sender_account_ref_id = self.get_account_ref_id(&sender_account_address)?;
        let receiver_auth_key_prefix = receiver_auth_key_opt.map_or(Vec::new(), |auth_key| {
            AuthenticationKey::prefix(&auth_key).to_vec()
        });

        self.transfer_coins_int(
            sender_account_ref_id,
            &receiver_address,
            receiver_auth_key_prefix,
            num_coins,
            transfer_currency.to_owned(),
            gas_unit_price,
            Some(gas_currency),
            max_gas_amount,
            is_blocking,
        )
    }
/// Transfers coins from sender to receiver.
Transfers coins from sender to receiver.
Transfers coins from sender to receiver .
pub fn transfer_coins(
        &mut self,
        space_delim_strings: &[&str],
        is_blocking: bool,
    ) -> Result<IndexAndSequence> {
        ensure!(
            space_delim_strings.len() >= 5 && space_delim_strings.len() <= 7,
            "Invalid number of arguments for transfer"
        );
        let (sender_account_address, _) =
            self.get_account_address_from_parameter(space_delim_strings[1])?;
        let (receiver_address, receiver_auth_key_opt) =
            self.get_account_address_from_parameter(space_delim_strings[2])?;
        let transfer_currency = space_delim_strings[4];
        let num_coins =
            self.convert_to_on_chain_represenation(space_delim_strings[3], transfer_currency)?;
        let gas_unit_price = if space_delim_strings.len() > 5 {
            Some(space_delim_strings[5].parse::<u64>().map_err(|error| {
                format_parse_data_error(
                    "gas_unit_price",
                    InputType::UnsignedInt,
                    space_delim_strings[5],
                    error,
                )
            })?)
        } else {
            None
        };
        let max_gas_amount = if space_delim_strings.len() > 6 {
            Some(space_delim_strings[6].parse::<u64>().map_err(|error| {
                format_parse_data_error(
                    "max_gas_amount",
                    InputType::UnsignedInt,
                    space_delim_strings[6],
                    error,
                )
            })?)
        } else {
            None
        };
        let gas_currency = if space_delim_strings.len() > 7 {
            space_delim_strings[7].to_owned()
        } else {
            transfer_currency.to_owned()
        };
        let sender_account_ref_id = self.get_account_ref_id(&sender_account_address)?;
        let receiver_auth_key_prefix = receiver_auth_key_opt.map_or(Vec::new(), |auth_key| {
            AuthenticationKey::prefix(&auth_key).to_vec()
        });
        self.transfer_coins_int(
            sender_account_ref_id,
            &receiver_address,
            receiver_auth_key_prefix,
            num_coins,
            transfer_currency.to_owned(),
            gas_unit_price,
            Some(gas_currency),
            max_gas_amount,
            is_blocking,
        )
    }
pub fn transfer_coins ( & mut self , space_delim_strings : & [ & str ] , is_blocking : bool , ) -> Result < IndexAndSequence > { ensure ! ( space_delim_strings len ( ) 5 space_delim_strings len ( ) 7 " " ) ; let ( sender_account_address , _ ) = self . get_account_address_from_parameter ( space_delim_strings [ 1 ] ) ? ; let ( receiver_address , receiver_auth_key_opt ) = self . get_account_address_from_parameter ( space_delim_strings [ 2 ] ) ? ; let transfer_currency = space_delim_strings [ 4 ] ; let num_coins = self . convert_to_on_chain_represenation ( space_delim_strings [ 3 ] , transfer_currency ) ? ; let gas_unit_price = if space_delim_strings . len ( ) > 5 { Some ( space_delim_strings [ 5 ] . parse :: < u64 > ( ) . map_err ( | error | { format_parse_data_error ( " " , InputType :: UnsignedInt , space_delim_strings [ 5 ] , error , ) } ) ? ) } else { None } ; let max_gas_amount = if space_delim_strings . len ( ) > 6 { Some ( space_delim_strings [ 6 ] . parse :: < u64 > ( ) . map_err ( | error | { format_parse_data_error ( " " , InputType :: UnsignedInt , space_delim_strings [ 6 ] , error , ) } ) ? ) } else { None } ; let gas_currency = if space_delim_strings . len ( ) > 7 { space_delim_strings [ 7 ] . to_owned ( ) } else { transfer_currency . to_owned ( ) } ; let sender_account_ref_id = self . get_account_ref_id ( & sender_account_address ) ? ; let receiver_auth_key_prefix = receiver_auth_key_opt . map_or ( Vec :: new ( ) , | auth_key | { AuthenticationKey :: prefix ( & auth_key ) . to_vec ( ) } ) ; self . transfer_coins_int ( sender_account_ref_id , & receiver_address , receiver_auth_key_prefix , num_coins , transfer_currency . to_owned ( ) , gas_unit_price , Some ( gas_currency ) , max_gas_amount , is_blocking , ) }
Transfers coins from sender to receiver.
Transfers coins from sender to receiver .
&mut self
space_delim_strings
&[&str]
is_blocking
bool
&mut self
space_delim_strings
&[&str]
is_blocking
bool