From 812b7dd38627360c8893bea1ca6b399b2d2af2eb Mon Sep 17 00:00:00 2001 From: Shawn Xie <35279399+shawnxie999@users.noreply.github.com> Date: Wed, 3 Jul 2024 14:11:50 -0400 Subject: [PATCH 1/5] Add missing include (#29) * fix missing include * clang --- src/xrpld/app/tx/detail/Payment.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/xrpld/app/tx/detail/Payment.cpp b/src/xrpld/app/tx/detail/Payment.cpp index 7779f441d64..e6ab5612519 100644 --- a/src/xrpld/app/tx/detail/Payment.cpp +++ b/src/xrpld/app/tx/detail/Payment.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include From 895e1be0f4d9e1dcdf3971b016a449fb813c73e9 Mon Sep 17 00:00:00 2001 From: Gregory Tsipenyuk Date: Thu, 25 Jul 2024 08:57:35 -0400 Subject: [PATCH 2/5] Make common functions (#31) --- src/xrpld/app/tx/detail/MPTokenAuthorize.cpp | 74 ++++++++++++------- src/xrpld/app/tx/detail/MPTokenAuthorize.h | 15 ++++ .../app/tx/detail/MPTokenIssuanceCreate.cpp | 61 ++++++++++----- .../app/tx/detail/MPTokenIssuanceCreate.h | 15 ++++ 4 files changed, 118 insertions(+), 47 deletions(-) diff --git a/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp b/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp index f998858390e..1e9871e0ae3 100644 --- a/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp +++ b/src/xrpld/app/tx/detail/MPTokenAuthorize.cpp @@ -126,40 +126,41 @@ MPTokenAuthorize::preclaim(PreclaimContext const& ctx) } TER -MPTokenAuthorize::doApply() +MPTokenAuthorize::authorize( + ApplyView& view, + beast::Journal journal, + MPTAuthorizeArgs const& args) { - auto const mptIssuanceID = ctx_.tx[sfMPTokenIssuanceID]; - auto const sleAcct = view().peek(keylet::account(account_)); + auto const sleAcct = view.peek(keylet::account(args.account)); if (!sleAcct) return tecINTERNAL; - auto const holderID = ctx_.tx[~sfMPTokenHolder]; - // If the account that submitted the tx is a holder // Note: `account_` is holder's account // `holderID` is NOT used - if (!holderID) + if (!args.holderID) { // When a holder wants to unauthorize/delete a MPT, the ledger must // - delete mptokenKey from owner directory // - delete the MPToken - if (ctx_.tx.getFlags() & tfMPTUnauthorize) + if (args.flags & tfMPTUnauthorize) { - auto const mptokenKey = keylet::mptoken(mptIssuanceID, account_); - auto const sleMpt = view().peek(mptokenKey); + auto const mptokenKey = + keylet::mptoken(args.mptIssuanceID, args.account); + auto const sleMpt = view.peek(mptokenKey); if (!sleMpt) return tecINTERNAL; - if (!view().dirRemove( - keylet::ownerDir(account_), + if (!view.dirRemove( + keylet::ownerDir(args.account), (*sleMpt)[sfOwnerNode], sleMpt->key(), false)) return tecINTERNAL; - adjustOwnerCount(view(), sleAcct, -1, j_); + adjustOwnerCount(view, sleAcct, -1, journal); - view().erase(sleMpt); + view.erase(sleMpt); return tesSUCCESS; } @@ -169,43 +170,48 @@ MPTokenAuthorize::doApply() std::uint32_t const uOwnerCount = sleAcct->getFieldU32(sfOwnerCount); XRPAmount const reserveCreate( (uOwnerCount < 2) ? XRPAmount(beast::zero) - : view().fees().accountReserve(uOwnerCount + 1)); + : view.fees().accountReserve(uOwnerCount + 1)); - if (mPriorBalance < reserveCreate) + if (args.priorBalance < reserveCreate) return tecINSUFFICIENT_RESERVE; - auto const mptokenKey = keylet::mptoken(mptIssuanceID, account_); + auto const mptokenKey = + keylet::mptoken(args.mptIssuanceID, args.account); - auto const ownerNode = view().dirInsert( - keylet::ownerDir(account_), mptokenKey, describeOwnerDir(account_)); + auto const ownerNode = view.dirInsert( + keylet::ownerDir(args.account), + mptokenKey, + describeOwnerDir(args.account)); if (!ownerNode) return tecDIR_FULL; auto mptoken = std::make_shared(mptokenKey); - (*mptoken)[sfAccount] = account_; - (*mptoken)[sfMPTokenIssuanceID] = mptIssuanceID; + (*mptoken)[sfAccount] = args.account; + (*mptoken)[sfMPTokenIssuanceID] = args.mptIssuanceID; (*mptoken)[sfFlags] = 0; (*mptoken)[sfOwnerNode] = *ownerNode; - view().insert(mptoken); + view.insert(mptoken); // Update owner count. - adjustOwnerCount(view(), sleAcct, 1, j_); + adjustOwnerCount(view, sleAcct, 1, journal); return tesSUCCESS; } - auto const sleMptIssuance = view().read(keylet::mptIssuance(mptIssuanceID)); + auto const sleMptIssuance = + view.read(keylet::mptIssuance(args.mptIssuanceID)); if (!sleMptIssuance) return tecINTERNAL; // If the account that submitted this tx is the issuer of the MPT // Note: `account_` is issuer's account // `holderID` is holder's account - if (account_ != (*sleMptIssuance)[sfIssuer]) + if (args.account != (*sleMptIssuance)[sfIssuer]) return tecINTERNAL; - auto const sleMpt = view().peek(keylet::mptoken(mptIssuanceID, *holderID)); + auto const sleMpt = + view.peek(keylet::mptoken(args.mptIssuanceID, *args.holderID)); if (!sleMpt) return tecINTERNAL; @@ -214,7 +220,7 @@ MPTokenAuthorize::doApply() // Issuer wants to unauthorize the holder, unset lsfMPTAuthorized on // their MPToken - if (ctx_.tx.getFlags() & tfMPTUnauthorize) + if (args.flags & tfMPTUnauthorize) flagsOut &= ~lsfMPTAuthorized; // Issuer wants to authorize a holder, set lsfMPTAuthorized on their // MPToken @@ -224,8 +230,22 @@ MPTokenAuthorize::doApply() if (flagsIn != flagsOut) sleMpt->setFieldU32(sfFlags, flagsOut); - view().update(sleMpt); + view.update(sleMpt); return tesSUCCESS; } +TER +MPTokenAuthorize::doApply() +{ + auto const& tx = ctx_.tx; + return authorize( + ctx_.view(), + ctx_.journal, + {.priorBalance = mPriorBalance, + .mptIssuanceID = tx[sfMPTokenIssuanceID], + .account = account_, + .flags = tx.getFlags(), + .holderID = tx[~sfMPTokenHolder]}); +} + } // namespace ripple diff --git a/src/xrpld/app/tx/detail/MPTokenAuthorize.h b/src/xrpld/app/tx/detail/MPTokenAuthorize.h index b2068412b76..94451a61c88 100644 --- a/src/xrpld/app/tx/detail/MPTokenAuthorize.h +++ b/src/xrpld/app/tx/detail/MPTokenAuthorize.h @@ -24,6 +24,15 @@ namespace ripple { +struct MPTAuthorizeArgs +{ + XRPAmount const& priorBalance; + uint192 const& mptIssuanceID; + AccountID const& account; + std::uint32_t flags; + std::optional holderID; +}; + class MPTokenAuthorize : public Transactor { public: @@ -39,6 +48,12 @@ class MPTokenAuthorize : public Transactor static TER preclaim(PreclaimContext const& ctx); + static TER + authorize( + ApplyView& view, + beast::Journal journal, + MPTAuthorizeArgs const& args); + TER doApply() override; }; diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp index 97918758714..de01341e296 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.cpp @@ -68,54 +68,75 @@ MPTokenIssuanceCreate::preflight(PreflightContext const& ctx) } TER -MPTokenIssuanceCreate::doApply() +MPTokenIssuanceCreate::create( + ApplyView& view, + beast::Journal journal, + MPTCreateArgs const& args) { - auto const acct = view().peek(keylet::account(account_)); + auto const acct = view.peek(keylet::account(args.account)); if (!acct) return tecINTERNAL; - if (mPriorBalance < view().fees().accountReserve((*acct)[sfOwnerCount] + 1)) + if (args.priorBalance < + view.fees().accountReserve((*acct)[sfOwnerCount] + 1)) return tecINSUFFICIENT_RESERVE; auto const mptIssuanceKeylet = - keylet::mptIssuance(account_, ctx_.tx.getSeqProxy().value()); + keylet::mptIssuance(args.account, args.sequence); // create the MPTokenIssuance { - auto const ownerNode = view().dirInsert( - keylet::ownerDir(account_), + auto const ownerNode = view.dirInsert( + keylet::ownerDir(args.account), mptIssuanceKeylet, - describeOwnerDir(account_)); + describeOwnerDir(args.account)); if (!ownerNode) return tecDIR_FULL; auto mptIssuance = std::make_shared(mptIssuanceKeylet); - (*mptIssuance)[sfFlags] = ctx_.tx.getFlags() & ~tfUniversal; - (*mptIssuance)[sfIssuer] = account_; + (*mptIssuance)[sfFlags] = args.flags & ~tfUniversal; + (*mptIssuance)[sfIssuer] = args.account; (*mptIssuance)[sfOutstandingAmount] = 0; (*mptIssuance)[sfOwnerNode] = *ownerNode; - (*mptIssuance)[sfSequence] = ctx_.tx.getSeqProxy().value(); + (*mptIssuance)[sfSequence] = args.sequence; - if (auto const max = ctx_.tx[~sfMaximumAmount]) - (*mptIssuance)[sfMaximumAmount] = *max; + if (args.maxAmount) + (*mptIssuance)[sfMaximumAmount] = *args.maxAmount; - if (auto const scale = ctx_.tx[~sfAssetScale]) - (*mptIssuance)[sfAssetScale] = *scale; + if (args.assetScale) + (*mptIssuance)[sfAssetScale] = *args.assetScale; - if (auto const fee = ctx_.tx[~sfTransferFee]) - (*mptIssuance)[sfTransferFee] = *fee; + if (args.transferFee) + (*mptIssuance)[sfTransferFee] = *args.transferFee; - if (auto const metadata = ctx_.tx[~sfMPTokenMetadata]) - (*mptIssuance)[sfMPTokenMetadata] = *metadata; + if (args.metadata) + (*mptIssuance)[sfMPTokenMetadata] = *args.metadata; - view().insert(mptIssuance); + view.insert(mptIssuance); } // Update owner count. - adjustOwnerCount(view(), acct, 1, j_); + adjustOwnerCount(view, acct, 1, journal); return tesSUCCESS; } +TER +MPTokenIssuanceCreate::doApply() +{ + auto const& tx = ctx_.tx; + return create( + ctx_.view(), + ctx_.journal, + {.priorBalance = mPriorBalance, + .account = account_, + .sequence = tx.getSeqProxy().value(), + .flags = tx.getFlags(), + .maxAmount = tx[~sfMaximumAmount], + .assetScale = tx[~sfAssetScale], + .transferFee = tx[~sfTransferFee], + .metadata = tx[~sfMPTokenMetadata]}); +} + } // namespace ripple diff --git a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.h b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.h index 0c1322667cc..2fdf2bdd152 100644 --- a/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.h +++ b/src/xrpld/app/tx/detail/MPTokenIssuanceCreate.h @@ -24,6 +24,18 @@ namespace ripple { +struct MPTCreateArgs +{ + XRPAmount const& priorBalance; + AccountID const& account; + std::uint32_t sequence; + std::uint32_t flags; + std::optional maxAmount; + std::optional assetScale; + std::optional transferFee; + std::optional const& metadata; +}; + class MPTokenIssuanceCreate : public Transactor { public: @@ -38,6 +50,9 @@ class MPTokenIssuanceCreate : public Transactor TER doApply() override; + + static TER + create(ApplyView& view, beast::Journal journal, MPTCreateArgs const& args); }; } // namespace ripple From 570d51373b4bfbb53f699cefb49251332a913a73 Mon Sep 17 00:00:00 2001 From: Shawn Xie <35279399+shawnxie999@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:09:25 -0400 Subject: [PATCH 3/5] fix empty err msg when txfee is out of range (#32) --- src/libxrpl/protocol/TER.cpp | 1 + src/test/app/MPToken_test.cpp | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/libxrpl/protocol/TER.cpp b/src/libxrpl/protocol/TER.cpp index cd0dac413e7..d9af31d2852 100644 --- a/src/libxrpl/protocol/TER.cpp +++ b/src/libxrpl/protocol/TER.cpp @@ -201,6 +201,7 @@ transResults() MAKE_ERROR(temINVALID_COUNT, "Malformed: Count field outside valid range."), MAKE_ERROR(temSEQ_AND_TICKET, "Transaction contains a TicketSequence and a non-zero Sequence."), MAKE_ERROR(temBAD_NFTOKEN_TRANSFER_FEE, "Malformed: The NFToken transfer fee must be between 1 and 5000, inclusive."), + MAKE_ERROR(temBAD_MPTOKEN_TRANSFER_FEE, "Malformed: The MPToken transfer fee must be between 1 and 5000, inclusive."), MAKE_ERROR(temXCHAIN_EQUAL_DOOR_ACCOUNTS, "Malformed: Bridge must have unique door accounts."), MAKE_ERROR(temXCHAIN_BAD_PROOF, "Malformed: Bad cross-chain claim proof."), MAKE_ERROR(temXCHAIN_BRIDGE_BAD_ISSUES, "Malformed: Bad bridge issues."), diff --git a/src/test/app/MPToken_test.cpp b/src/test/app/MPToken_test.cpp index 3bda0a3911a..6e6ccebb1c9 100644 --- a/src/test/app/MPToken_test.cpp +++ b/src/test/app/MPToken_test.cpp @@ -58,7 +58,7 @@ class MPToken_test : public beast::unit_test::suite .metadata = "test", .err = temMALFORMED}); - // tries to set a txfee while not enabling transfer + // tries to set a txfee greater than max mptAlice.create( {.maxAmt = 100, .assetScale = 0, @@ -67,6 +67,14 @@ class MPToken_test : public beast::unit_test::suite .flags = tfMPTCanTransfer, .err = temBAD_MPTOKEN_TRANSFER_FEE}); + // tries to set a txfee while not enabling transfer + mptAlice.create( + {.maxAmt = 100, + .assetScale = 0, + .transferFee = maxTransferFee, + .metadata = "test", + .err = temMALFORMED}); + // empty metadata returns error mptAlice.create( {.maxAmt = 100, From e1251d4a4f2cc01e3d8ef8ade41b74ed44951f1e Mon Sep 17 00:00:00 2001 From: Gregory Tsipenyuk Date: Mon, 26 Aug 2024 11:33:35 -0400 Subject: [PATCH 4/5] Fix clang-format --- include/xrpl/protocol/jss.h | 224 ++++++++++++------------- src/xrpld/app/tx/detail/applySteps.cpp | 2 +- 2 files changed, 113 insertions(+), 113 deletions(-) diff --git a/include/xrpl/protocol/jss.h b/include/xrpl/protocol/jss.h index 4a5ad123ce7..f317968eeb7 100644 --- a/include/xrpl/protocol/jss.h +++ b/include/xrpl/protocol/jss.h @@ -41,123 +41,123 @@ namespace jss { error: Common properties of RPC error responses. */ -JSS(AL_size); // out: GetCounts -JSS(AL_hit_rate); // out: GetCounts -JSS(Account); // in: TransactionSign; field. -JSS(AccountDelete); // transaction type. -JSS(AccountRoot); // ledger type. -JSS(AccountSet); // transaction type. -JSS(AMM); // ledger type -JSS(AMMBid); // transaction type -JSS(AMMID); // field -JSS(AMMCreate); // transaction type -JSS(AMMDeposit); // transaction type -JSS(AMMDelete); // transaction type -JSS(AMMVote); // transaction type -JSS(AMMWithdraw); // transaction type -JSS(Amendments); // ledger type. -JSS(Amount); // in: TransactionSign; field. -JSS(Amount2); // in/out: AMM IOU/XRP pool, deposit, withdraw amount -JSS(Asset); // in: AMM Asset1 -JSS(Asset2); // in: AMM Asset2 -JSS(AssetClass); // in: Oracle -JSS(AssetPrice); // in: Oracle -JSS(AuthAccount); // in: AMM Auction Slot -JSS(AuthAccounts); // in: AMM Auction Slot -JSS(BaseAsset); // in: Oracle -JSS(Bridge); // ledger type. -JSS(Check); // ledger type. -JSS(CheckCancel); // transaction type. -JSS(CheckCash); // transaction type. -JSS(CheckCreate); // transaction type. -JSS(Clawback); // transaction type. -JSS(ClearFlag); // field. -JSS(DID); // ledger type. -JSS(DIDDelete); // transaction type. -JSS(DIDSet); // transaction type. -JSS(DeliverMax); // out: alias to Amount -JSS(DeliverMin); // in: TransactionSign -JSS(DepositPreauth); // transaction and ledger type. -JSS(Destination); // in: TransactionSign; field. -JSS(DirectoryNode); // ledger type. -JSS(EnableAmendment); // transaction type. -JSS(EPrice); // in: AMM Deposit option -JSS(Escrow); // ledger type. -JSS(EscrowCancel); // transaction type. -JSS(EscrowCreate); // transaction type. -JSS(EscrowFinish); // transaction type. -JSS(Fee); // in/out: TransactionSign; field. -JSS(FeeSettings); // ledger type. -JSS(Flags); // in/out: TransactionSign; field. -JSS(Invalid); // -JSS(LastLedgerSequence); // in: TransactionSign; field -JSS(LastUpdateTime); // field. -JSS(LedgerHashes); // ledger type. -JSS(LimitAmount); // field. -JSS(BidMax); // in: AMM Bid -JSS(BidMin); // in: AMM Bid -JSS(MPToken); // ledger type. -JSS(MPTokenIssuance); // ledger type. +JSS(AL_size); // out: GetCounts +JSS(AL_hit_rate); // out: GetCounts +JSS(Account); // in: TransactionSign; field. +JSS(AccountDelete); // transaction type. +JSS(AccountRoot); // ledger type. +JSS(AccountSet); // transaction type. +JSS(AMM); // ledger type +JSS(AMMBid); // transaction type +JSS(AMMID); // field +JSS(AMMCreate); // transaction type +JSS(AMMDeposit); // transaction type +JSS(AMMDelete); // transaction type +JSS(AMMVote); // transaction type +JSS(AMMWithdraw); // transaction type +JSS(Amendments); // ledger type. +JSS(Amount); // in: TransactionSign; field. +JSS(Amount2); // in/out: AMM IOU/XRP pool, deposit, withdraw amount +JSS(Asset); // in: AMM Asset1 +JSS(Asset2); // in: AMM Asset2 +JSS(AssetClass); // in: Oracle +JSS(AssetPrice); // in: Oracle +JSS(AuthAccount); // in: AMM Auction Slot +JSS(AuthAccounts); // in: AMM Auction Slot +JSS(BaseAsset); // in: Oracle +JSS(Bridge); // ledger type. +JSS(Check); // ledger type. +JSS(CheckCancel); // transaction type. +JSS(CheckCash); // transaction type. +JSS(CheckCreate); // transaction type. +JSS(Clawback); // transaction type. +JSS(ClearFlag); // field. +JSS(DID); // ledger type. +JSS(DIDDelete); // transaction type. +JSS(DIDSet); // transaction type. +JSS(DeliverMax); // out: alias to Amount +JSS(DeliverMin); // in: TransactionSign +JSS(DepositPreauth); // transaction and ledger type. +JSS(Destination); // in: TransactionSign; field. +JSS(DirectoryNode); // ledger type. +JSS(EnableAmendment); // transaction type. +JSS(EPrice); // in: AMM Deposit option +JSS(Escrow); // ledger type. +JSS(EscrowCancel); // transaction type. +JSS(EscrowCreate); // transaction type. +JSS(EscrowFinish); // transaction type. +JSS(Fee); // in/out: TransactionSign; field. +JSS(FeeSettings); // ledger type. +JSS(Flags); // in/out: TransactionSign; field. +JSS(Invalid); // +JSS(LastLedgerSequence); // in: TransactionSign; field +JSS(LastUpdateTime); // field. +JSS(LedgerHashes); // ledger type. +JSS(LimitAmount); // field. +JSS(BidMax); // in: AMM Bid +JSS(BidMin); // in: AMM Bid +JSS(MPToken); // ledger type. +JSS(MPTokenIssuance); // ledger type. JSS(MPTokenIssuanceCreate); // transaction type. JSS(MPTokenIssuanceDestroy); // transaction type. JSS(MPTokenAuthorize); // transaction type. JSS(MPTokenIssuanceSet); // transaction type. JSS(MPTokenIssuanceID); // in: MPTokenIssuanceDestroy, MPTokenAuthorize -JSS(NetworkID); // field. -JSS(NFTokenBurn); // transaction type. -JSS(NFTokenMint); // transaction type. -JSS(NFTokenOffer); // ledger type. -JSS(NFTokenAcceptOffer); // transaction type. -JSS(NFTokenCancelOffer); // transaction type. -JSS(NFTokenCreateOffer); // transaction type. -JSS(NFTokenPage); // ledger type. -JSS(LedgerStateFix); // transaction type. -JSS(LPTokenOut); // in: AMM Liquidity Provider deposit tokens -JSS(LPTokenIn); // in: AMM Liquidity Provider withdraw tokens -JSS(LPToken); // out: AMM Liquidity Provider tokens info -JSS(Offer); // ledger type. -JSS(OfferCancel); // transaction type. -JSS(OfferCreate); // transaction type. -JSS(OfferSequence); // field. -JSS(Oracle); // ledger type. -JSS(OracleDelete); // transaction type. -JSS(OracleDocumentID); // field -JSS(OracleSet); // transaction type. -JSS(Owner); // field -JSS(Paths); // in/out: TransactionSign -JSS(PayChannel); // ledger type. -JSS(Payment); // transaction type. -JSS(PaymentChannelClaim); // transaction type. -JSS(PaymentChannelCreate); // transaction type. -JSS(PaymentChannelFund); // transaction type. -JSS(PriceDataSeries); // field. -JSS(PriceData); // field. -JSS(Provider); // field. -JSS(QuoteAsset); // in: Oracle. -JSS(RippleState); // ledger type. -JSS(SLE_hit_rate); // out: GetCounts. -JSS(SetFee); // transaction type. -JSS(UNLModify); // transaction type. -JSS(Scale); // field. -JSS(SettleDelay); // in: TransactionSign -JSS(SendMax); // in: TransactionSign -JSS(Sequence); // in/out: TransactionSign; field. -JSS(SetFlag); // field. -JSS(SetRegularKey); // transaction type. -JSS(SignerList); // ledger type. -JSS(SignerListSet); // transaction type. -JSS(SigningPubKey); // field. -JSS(TakerGets); // field. -JSS(TakerPays); // field. -JSS(Ticket); // ledger type. -JSS(TicketCreate); // transaction type. -JSS(TxnSignature); // field. -JSS(TradingFee); // in/out: AMM trading fee -JSS(TransactionType); // in: TransactionSign. -JSS(TransferRate); // in: TransferRate. -JSS(TrustSet); // transaction type. -JSS(URI); // field. -JSS(VoteSlots); // out: AMM Vote +JSS(NetworkID); // field. +JSS(NFTokenBurn); // transaction type. +JSS(NFTokenMint); // transaction type. +JSS(NFTokenOffer); // ledger type. +JSS(NFTokenAcceptOffer); // transaction type. +JSS(NFTokenCancelOffer); // transaction type. +JSS(NFTokenCreateOffer); // transaction type. +JSS(NFTokenPage); // ledger type. +JSS(LedgerStateFix); // transaction type. +JSS(LPTokenOut); // in: AMM Liquidity Provider deposit tokens +JSS(LPTokenIn); // in: AMM Liquidity Provider withdraw tokens +JSS(LPToken); // out: AMM Liquidity Provider tokens info +JSS(Offer); // ledger type. +JSS(OfferCancel); // transaction type. +JSS(OfferCreate); // transaction type. +JSS(OfferSequence); // field. +JSS(Oracle); // ledger type. +JSS(OracleDelete); // transaction type. +JSS(OracleDocumentID); // field +JSS(OracleSet); // transaction type. +JSS(Owner); // field +JSS(Paths); // in/out: TransactionSign +JSS(PayChannel); // ledger type. +JSS(Payment); // transaction type. +JSS(PaymentChannelClaim); // transaction type. +JSS(PaymentChannelCreate); // transaction type. +JSS(PaymentChannelFund); // transaction type. +JSS(PriceDataSeries); // field. +JSS(PriceData); // field. +JSS(Provider); // field. +JSS(QuoteAsset); // in: Oracle. +JSS(RippleState); // ledger type. +JSS(SLE_hit_rate); // out: GetCounts. +JSS(SetFee); // transaction type. +JSS(UNLModify); // transaction type. +JSS(Scale); // field. +JSS(SettleDelay); // in: TransactionSign +JSS(SendMax); // in: TransactionSign +JSS(Sequence); // in/out: TransactionSign; field. +JSS(SetFlag); // field. +JSS(SetRegularKey); // transaction type. +JSS(SignerList); // ledger type. +JSS(SignerListSet); // transaction type. +JSS(SigningPubKey); // field. +JSS(TakerGets); // field. +JSS(TakerPays); // field. +JSS(Ticket); // ledger type. +JSS(TicketCreate); // transaction type. +JSS(TxnSignature); // field. +JSS(TradingFee); // in/out: AMM trading fee +JSS(TransactionType); // in: TransactionSign. +JSS(TransferRate); // in: TransferRate. +JSS(TrustSet); // transaction type. +JSS(URI); // field. +JSS(VoteSlots); // out: AMM Vote JSS(XChainAddAccountCreateAttestation); // transaction type. JSS(XChainAddClaimAttestation); // transaction type. JSS(XChainAccountCreateCommit); // transaction type. diff --git a/src/xrpld/app/tx/detail/applySteps.cpp b/src/xrpld/app/tx/detail/applySteps.cpp index 09b2da5e290..e33d673e022 100644 --- a/src/xrpld/app/tx/detail/applySteps.cpp +++ b/src/xrpld/app/tx/detail/applySteps.cpp @@ -38,11 +38,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include From 9578002d962dc733a92e7c1abe8f86c9d953d590 Mon Sep 17 00:00:00 2001 From: Gregory Tsipenyuk Date: Mon, 26 Aug 2024 11:44:54 -0400 Subject: [PATCH 5/5] Fix merge conflicts --- include/xrpl/protocol/TxFormats.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/include/xrpl/protocol/TxFormats.h b/include/xrpl/protocol/TxFormats.h index a8a41542a2a..aa26a4641d0 100644 --- a/include/xrpl/protocol/TxFormats.h +++ b/include/xrpl/protocol/TxFormats.h @@ -195,21 +195,21 @@ enum TxType : std::uint16_t /** This transaction type deletes an Oracle instance */ ttORACLE_DELETE = 52, -/** This transaction creates a new MPTokenIssuance object. */ - ttMPTOKEN_ISSUANCE_CREATE = 53, + + /** This transaction type fixes a problem in the ledger state */ + ttLEDGER_STATE_FIX = 53, + + /** This transaction creates a new MPTokenIssuance object. */ + ttMPTOKEN_ISSUANCE_CREATE = 54, /** This transaction destroys an existing MPTokenIssuance object. */ - ttMPTOKEN_ISSUANCE_DESTROY = 54, + ttMPTOKEN_ISSUANCE_DESTROY = 55, /** This transaction destroys an existing MPTokenIssuance object. */ - ttMPTOKEN_AUTHORIZE = 55, + ttMPTOKEN_AUTHORIZE = 56, /** This transaction sets an existing MPTokenIssuance or MPToken object. */ - ttMPTOKEN_ISSUANCE_SET = 56, - - /** This transaction type fixes a problem in the ledger state */ - ttLEDGER_STATE_FIX = 53, - + ttMPTOKEN_ISSUANCE_SET = 57, /** This system-generated transaction type is used to update the status of the various amendments.