PoC for sponsored fees

This commit is contained in:
Mayukha Vadari
2024-03-13 11:02:49 -04:00
committed by tequ
parent edb4f0342c
commit cad305ac7e
10 changed files with 95 additions and 6 deletions

View File

@@ -244,7 +244,9 @@ public:
getFieldV256(SField const& field) const;
STArray const&
getFieldArray(SField const& field) const;
STCurrency const&
const STObject&
getFieldObject(SField const& field) const;
const STCurrency&
getFieldCurrency(SField const& field) const;
STNumber const&
getFieldNumber(SField const& field) const;

View File

@@ -106,6 +106,9 @@ public:
std::uint32_t
getSeqValue() const;
AccountID
getFeePayer() const;
boost::container::flat_set<AccountID>
getMentionedAccounts() const;

View File

@@ -62,6 +62,10 @@ constexpr std::uint32_t tfInnerBatchTxn = 0x40000000;
constexpr std::uint32_t tfUniversal = tfFullyCanonicalSig | tfInnerBatchTxn;
constexpr std::uint32_t tfUniversalMask = ~tfUniversal;
// Sponsor flags:
constexpr std::uint32_t tfSponsorFee = 0x00000001;
constexpr std::uint32_t tfSponsorReserve = 0x00000002;
// AccountSet flags:
constexpr std::uint32_t tfRequireDestTag = 0x00010000;
constexpr std::uint32_t tfOptionalDestTag = 0x00020000;

View File

@@ -32,6 +32,7 @@
// If you add an amendment here, then do not forget to increment `numFeatures`
// in include/xrpl/protocol/Feature.h.
XRPL_FEATURE(Sponsor, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(TokenEscrow, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FIX (EnforceNFTokenTrustlineV2, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FIX (AMMv1_3, Supported::yes, VoteBehavior::DefaultNo)

View File

@@ -362,6 +362,7 @@ UNTYPED_SFIELD(sfCredential, OBJECT, 33)
UNTYPED_SFIELD(sfRawTransaction, OBJECT, 34)
UNTYPED_SFIELD(sfBatchSigner, OBJECT, 35)
UNTYPED_SFIELD(sfBook, OBJECT, 36)
UNTYPED_SFIELD(sfSponsor, OBJECT, 37)
// array of objects (common)
// ARRAY/1 is reserved for end of array