pub fn sponsor_transaction<S, F>(
sender: &S,
sender_sequence_number: u64,
fee_payer: &F,
payload: TransactionPayload,
chain_id: ChainId,
) -> AptosResult<SignedTransaction>Expand description
Creates a simple sponsored transaction with minimal configuration.
This is a convenience function for the common case of sponsoring a simple transaction without secondary signers.
§Example
ⓘ
use aptos_sdk::transaction::sponsor_transaction;
let signed = sponsor_transaction(
&sender_account,
sender_sequence_number,
&sponsor_account,
payload,
ChainId::testnet(),
)?;§Errors
Returns an error if building the transaction fails or if any signer fails to sign.