fn create_txn_to_submit(
        &self,
        program: TransactionPayload,
        sender_account: &AccountData,
        max_gas_amount: Option<u64>,
        gas_unit_price: Option<u64>,
        gas_currency_code: Option<String>,
    ) -> Result<SignedTransaction> {
        let signer: Box<&dyn TransactionSigner> = match &sender_account.key_pair {
            Some(key_pair) => Box::new(key_pair),
            None => Box::new(&self.wallet),
        };
        create_user_txn(
            *signer,
            program,
            sender_account.address,
            sender_account.sequence_number,
            max_gas_amount.unwrap_or(MAX_GAS_AMOUNT),
            gas_unit_price.unwrap_or(GAS_UNIT_PRICE),
            gas_currency_code.unwrap_or_else(|| LBR_NAME.to_owned()),
            TX_EXPIRATION,
        )
    }
/// Craft a transaction to be submitted.
Craft a transaction to be submitted.
Craft a transaction to be submitted .
fn create_txn_to_submit(
        &self,
        program: TransactionPayload,
        sender_account: &AccountData,
        max_gas_amount: Option<u64>,
        gas_unit_price: Option<u64>,
        gas_currency_code: Option<String>,
    ) -> Result<SignedTransaction> {
        let signer: Box<&dyn TransactionSigner> = match &sender_account.key_pair {
            Some(key_pair) => Box::new(key_pair),
            None => Box::new(&self.wallet),
        };
        create_user_txn(
            *signer,
            program,
            sender_account.address,
            sender_account.sequence_number,
            max_gas_amount.unwrap_or(MAX_GAS_AMOUNT),
            gas_unit_price.unwrap_or(GAS_UNIT_PRICE),
            gas_currency_code.unwrap_or_else(|| LBR_NAME.to_owned()),
            TX_EXPIRATION,
        )
    }
fn create_txn_to_submit ( & self , program : TransactionPayload , sender_account : & AccountData , max_gas_amount : Option < u64 > , gas_unit_price : Option < u64 > , gas_currency_code : Option < String > , ) -> Result < SignedTransaction > { let signer : Box < & dyn TransactionSigner > = match & sender_account . key_pair { Some ( key_pair ) => Box :: new ( key_pair ) , None => Box :: new ( & self . wallet ) , } ; create_user_txn ( * signer , program , sender_account . address , sender_account . sequence_number , max_gas_amount . unwrap_or ( MAX_GAS_AMOUNT ) , gas_unit_price . unwrap_or ( GAS_UNIT_PRICE ) , gas_currency_code . unwrap_or_else ( | | LBR_NAME . to_owned ( ) ) , TX_EXPIRATION , ) }
Craft a transaction to be submitted.
Craft a transaction to be submitted .
&self
program
TransactionPayload
sender_account
&AccountData
max_gas_amount
Option<u64>
gas_unit_price
Option<u64>
gas_currency_code
Option<String>
&self
program
TransactionPayload
sender_account
&AccountData
max_gas_amount
Option<u64>
gas_unit_price
Option<u64>
gas_currency_code
Option<String>