mirror of
https://github.com/XRPLF/rippled.git
synced 2026-06-04 17:27:00 +00:00
v2. SponsorSet
This commit is contained in:
@@ -174,6 +174,10 @@ static ticket_t const ticket{};
|
||||
Keylet
|
||||
signers(AccountID const& account) noexcept;
|
||||
|
||||
/** A Sponsor */
|
||||
Keylet
|
||||
sponsor(AccountID const& sponsor, AccountID const& sponsee) noexcept;
|
||||
|
||||
/** A Check */
|
||||
/** @{ */
|
||||
Keylet
|
||||
|
||||
@@ -149,6 +149,8 @@ enum LedgerSpecificFlags {
|
||||
0x40000000, // True, enable trustline locking
|
||||
lsfAllowTrustLineClawback =
|
||||
0x80000000, // True, enable clawback
|
||||
lsfDisallowIncomingSponsor =
|
||||
0x00004000, // True, reject new sponsor
|
||||
|
||||
// ltOFFER
|
||||
lsfPassive = 0x00010000,
|
||||
@@ -196,6 +198,10 @@ enum LedgerSpecificFlags {
|
||||
|
||||
// ltVAULT
|
||||
lsfVaultPrivate = 0x00010000,
|
||||
|
||||
// ltSPONSORSHIP
|
||||
lsfSponsorshipRequireSignForFee = 0x00010000,
|
||||
lsfSponsorshipRequireSignForReserve = 0x00020000,
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -362,6 +362,7 @@ enum TECcodes : TERUnderlyingType {
|
||||
tecPSEUDO_ACCOUNT = 196,
|
||||
tecPRECISION_LOSS = 197,
|
||||
tecNO_DELEGATE_PERMISSION = 198,
|
||||
tecNO_SPONSOR_PERMISSION = 199,
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
@@ -62,9 +62,10 @@ constexpr std::uint32_t tfInnerBatchTxn = 0x40000000;
|
||||
constexpr std::uint32_t tfUniversal = tfFullyCanonicalSig | tfInnerBatchTxn;
|
||||
constexpr std::uint32_t tfUniversalMask = ~tfUniversal;
|
||||
|
||||
// Sponsor flags:
|
||||
// Sponsor flags (Global):
|
||||
constexpr std::uint32_t tfSponsorFee = 0x00000001;
|
||||
constexpr std::uint32_t tfSponsorReserve = 0x00000002;
|
||||
constexpr std::uint32_t tfSponsorMask = tfSponsorFee | tfSponsorReserve;
|
||||
|
||||
// AccountSet flags:
|
||||
constexpr std::uint32_t tfRequireDestTag = 0x00010000;
|
||||
@@ -97,6 +98,7 @@ constexpr std::uint32_t asfDisallowIncomingPayChan = 14;
|
||||
constexpr std::uint32_t asfDisallowIncomingTrustline = 15;
|
||||
constexpr std::uint32_t asfAllowTrustLineClawback = 16;
|
||||
constexpr std::uint32_t asfAllowTrustLineLocking = 17;
|
||||
constexpr std::uint32_t asfDisallowIncomingSponsor = 19;
|
||||
|
||||
// OfferCreate flags:
|
||||
constexpr std::uint32_t tfPassive = 0x00010000;
|
||||
@@ -253,6 +255,14 @@ constexpr std::uint32_t tfIndependent = 0x00080000;
|
||||
constexpr std::uint32_t const tfBatchMask =
|
||||
~(tfUniversal | tfAllOrNothing | tfOnlyOne | tfUntilFailure | tfIndependent) | tfInnerBatchTxn;
|
||||
|
||||
// SponsorSet flags:
|
||||
constexpr std::uint32_t tfSponsorshipSetRequireSignForFee = 0x00010000;
|
||||
constexpr std::uint32_t tfSponsorshipClearRequireSignForFee = 0x00020000;
|
||||
constexpr std::uint32_t tfSponsorshipSetRequireSignForReserve = 0x00040000;
|
||||
constexpr std::uint32_t tfSponsorshipClearRequireSignForReserve = 0x00080000;
|
||||
constexpr std::uint32_t tfDeleteObject = 0x00100000;
|
||||
constexpr std::uint32_t tfSponsorSetMask = ~(tfUniversal | tfSponsorshipSetRequireSignForFee | tfSponsorshipClearRequireSignForFee | tfSponsorshipSetRequireSignForReserve | tfSponsorshipClearRequireSignForReserve | tfDeleteObject);
|
||||
|
||||
// clang-format on
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
@@ -507,5 +507,17 @@ LEDGER_ENTRY(ltVAULT, 0x0084, Vault, vault, ({
|
||||
// no PermissionedDomainID ever (use MPTIssuance.sfDomainID)
|
||||
}))
|
||||
|
||||
/** A ledger object representing a sponsorship.
|
||||
\sa keylet::sponsor
|
||||
*/
|
||||
LEDGER_ENTRY(ltSPONSORSHIP, 0x0085, Sponsorship, sponsorship, ({
|
||||
{sfAccount, soeREQUIRED},
|
||||
{sfSponsee, soeREQUIRED},
|
||||
{sfSponsorNode, soeREQUIRED},
|
||||
{sfSponseeNode, soeREQUIRED},
|
||||
{sfFeeAmount, soeOPTIONAL},
|
||||
{sfReserveCount, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
#undef EXPAND
|
||||
#undef LEDGER_ENTRY_DUPLICATE
|
||||
|
||||
@@ -117,6 +117,7 @@ TYPED_SFIELD(sfPermissionValue, UINT32, 52)
|
||||
TYPED_SFIELD(sfSponsoredOwnerCount, UINT32, 53)
|
||||
TYPED_SFIELD(sfSponsoringOwnerCount, UINT32, 54)
|
||||
TYPED_SFIELD(sfSponsoringAccountCount, UINT32, 55)
|
||||
TYPED_SFIELD(sfReserveCount, UINT32, 56)
|
||||
|
||||
// 64-bit integers (common)
|
||||
TYPED_SFIELD(sfIndexNext, UINT64, 1)
|
||||
@@ -148,6 +149,8 @@ TYPED_SFIELD(sfMPTAmount, UINT64, 26, SField::sMD_BaseTen|SFie
|
||||
TYPED_SFIELD(sfIssuerNode, UINT64, 27)
|
||||
TYPED_SFIELD(sfSubjectNode, UINT64, 28)
|
||||
TYPED_SFIELD(sfLockedAmount, UINT64, 29, SField::sMD_BaseTen|SField::sMD_Default)
|
||||
TYPED_SFIELD(sfSponsorNode, UINT64, 30)
|
||||
TYPED_SFIELD(sfSponseeNode, UINT64, 31)
|
||||
|
||||
// 128-bit
|
||||
TYPED_SFIELD(sfEmailHash, UINT128, 1)
|
||||
@@ -200,6 +203,7 @@ TYPED_SFIELD(sfHookSetTxnID, UINT256, 33)
|
||||
TYPED_SFIELD(sfDomainID, UINT256, 34)
|
||||
TYPED_SFIELD(sfVaultID, UINT256, 35)
|
||||
TYPED_SFIELD(sfParentBatchID, UINT256, 36)
|
||||
TYPED_SFIELD(sfObjectID, UINT256, 37)
|
||||
|
||||
// number (common)
|
||||
TYPED_SFIELD(sfNumber, NUMBER, 1)
|
||||
@@ -244,6 +248,7 @@ TYPED_SFIELD(sfPrice, AMOUNT, 28)
|
||||
TYPED_SFIELD(sfSignatureReward, AMOUNT, 29)
|
||||
TYPED_SFIELD(sfMinAccountCreateAmount, AMOUNT, 30)
|
||||
TYPED_SFIELD(sfLPTokenBalance, AMOUNT, 31)
|
||||
TYPED_SFIELD(sfFeeAmount, AMOUNT, 32)
|
||||
|
||||
// variable length (common)
|
||||
TYPED_SFIELD(sfPublicKey, VL, 1)
|
||||
@@ -293,6 +298,7 @@ TYPED_SFIELD(sfEmitCallback, ACCOUNT, 10)
|
||||
TYPED_SFIELD(sfHolder, ACCOUNT, 11)
|
||||
TYPED_SFIELD(sfDelegate, ACCOUNT, 12)
|
||||
TYPED_SFIELD(sfSponsorAccount, ACCOUNT, 13)
|
||||
TYPED_SFIELD(sfSponsee, ACCOUNT, 14)
|
||||
|
||||
// account (uncommon)
|
||||
TYPED_SFIELD(sfHookAccount, ACCOUNT, 16)
|
||||
|
||||
@@ -526,9 +526,17 @@ TRANSACTION(ttBATCH, 71, Batch, Delegation::notDelegatable, ({
|
||||
{sfBatchSigners, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction transfer sponsor */
|
||||
TRANSACTION(ttSPONSOR_TRANSFER, 72, SponsorTransfer, Delegation::notDelegatable, ({
|
||||
{sfLedgerIndex, soeOPTIONAL},
|
||||
/** This transaction transfer sponsorship */
|
||||
TRANSACTION(ttSPONSORSHIP_TRANSFER, 72, SponsorTransfer, Delegation::notDelegatable, ({
|
||||
{sfObjectID, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This transaction create sponsorship object */
|
||||
TRANSACTION(ttSPONSORSHIP_SET, 73, SponsorSet, Delegation::notDelegatable, ({
|
||||
{sfSponsorAccount, soeOPTIONAL},
|
||||
{sfSponsee, soeREQUIRED},
|
||||
{sfFeeAmount, soeOPTIONAL},
|
||||
{sfReserveCount, soeOPTIONAL},
|
||||
}))
|
||||
|
||||
/** This system-generated transaction type is used to update the status of the various amendments.
|
||||
|
||||
@@ -540,7 +540,7 @@ JSS(reserve_inc_xrp); // out: NetworkOPs
|
||||
JSS(response); // websocket
|
||||
JSS(result); // RPC
|
||||
JSS(ripple_lines); // out: NetworkOPs
|
||||
JSS(ripple_state); // in: LedgerEntr
|
||||
JSS(ripple_state); // in: LedgerEntry
|
||||
JSS(ripplerpc); // ripple RPC version
|
||||
JSS(role); // out: Ping.cpp
|
||||
JSS(rpc);
|
||||
@@ -580,6 +580,7 @@ JSS(source_account); // in: PathRequest, RipplePathFind
|
||||
JSS(source_amount); // in: PathRequest, RipplePathFind
|
||||
JSS(source_currencies); // in: PathRequest, RipplePathFind
|
||||
JSS(source_tag); // out: AccountChannels
|
||||
JSS(sponsee); // in: LedgerEntry
|
||||
JSS(stand_alone); // out: NetworkOPs
|
||||
JSS(standard_deviation); // out: get_aggregate_price
|
||||
JSS(start); // in: TxHistory
|
||||
|
||||
Reference in New Issue
Block a user