Show / Hide Table of Contents

Class FeePayerExtensions

Who the ledger charges a transaction's network fee to.

Inheritance
object
FeePayerExtensions
Namespace: Xrpl.Models.Transactions
Assembly: Xrpl.dll
Syntax
public static class FeePayerExtensions
Remarks

Not always Account: Delegate pays for a transaction it submits, and a sponsor pays when SponsorFlags has spfSponsorFee (requires the Sponsor amendment, XLS-68). With a Fee of zero nothing is charged: the result is then who would have paid. That is the case of a Batch inner transaction, whose fee is paid by the outer Batch.

Methods

| Edit this page View Source

GetFeePayer(ITransactionCommon)

The account the fee of tx is charged to, read from the transaction alone: the sponsor when it covers the fee, otherwise the delegate, otherwise the account (rippled STTx::getFeePayerID).

Declaration
public static string GetFeePayer(this ITransactionCommon tx)
Parameters
Type Name Description
ITransactionCommon tx

The transaction.

Returns
Type Description
string

The classic address of the payer.

Remarks

A prepaid sponsorship pays from its LOSponsorship object, not from the sponsor's balance, and the transaction cannot say which of the two it was. Where the metadata is at hand use GetFeePayer(ITransactionCommon, ITransactionMetadata).

Exceptions
Type Condition
ArgumentNullException

tx is null.

| Edit this page View Source

GetFeePayer(ITransactionCommon, ITransactionMetadata)

The account whose balance the fee of tx came out of, or null when it came out of a prepaid LOSponsorship object and no account's balance carries it (rippled Transactor::getFeePayer, FeePayerType::SponsorPreFunded).

Declaration
public static string GetFeePayer(this ITransactionCommon tx, ITransactionMetadata meta)
Parameters
Type Name Description
ITransactionCommon tx

The transaction.

ITransactionMetadata meta

Its metadata, with its nodes parsed. Without them, as for metadata read in binary form, nothing tells a prepaid sponsorship from the sponsor's account, and the result is GetFeePayer(ITransactionCommon).

Returns
Type Description
string

The classic address of the payer, or null for a prepaid sponsorship.

Remarks

The object is told by its node in the metadata: the sponsorship between the sponsor and the transaction's initiator, changed or deleted with FeeAmount in its previous fields. A sponsorship this transaction created does not count, because the fee is charged before the transaction applies. Without such a node the fee came out of the sponsor's own account.

Exceptions
Type Condition
ArgumentNullException

tx is null.

  • Edit this page
  • View Source
In this article
Back to top Generated by DocFX