Given a base58-encoded address of a system account, this method will return a new transaction message having the same type as the one supplied plus the TransactionMessageWithFeePayer type.
import { address } from '@solana/addresses';import { setTransactionMessageFeePayer } from '@solana/transaction-messages';const myAddress = address('mpngsFd4tmbUfzDYJayjKZwZcaR7aWb2793J6grLsGu');const txPaidByMe = setTransactionMessageFeePayer(myAddress, tx); Copy
import { address } from '@solana/addresses';import { setTransactionMessageFeePayer } from '@solana/transaction-messages';const myAddress = address('mpngsFd4tmbUfzDYJayjKZwZcaR7aWb2793J6grLsGu');const txPaidByMe = setTransactionMessageFeePayer(myAddress, tx);
Given a base58-encoded address of a system account, this method will return a new transaction message having the same type as the one supplied plus the TransactionMessageWithFeePayer type.