Skip to content

Commit

Permalink
Merge branch 'develop' into amendment/fix-amm-v1-3
Browse files Browse the repository at this point in the history
  • Loading branch information
gregtatcam committed Nov 5, 2024
2 parents fa2866a + d57cced commit cf9b547
Show file tree
Hide file tree
Showing 19 changed files with 2,845 additions and 149 deletions.
4 changes: 4 additions & 0 deletions include/xrpl/protocol/TxFlags.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,10 @@ constexpr std::uint32_t tfDepositSubTx =
constexpr std::uint32_t tfWithdrawMask = ~(tfUniversal | tfWithdrawSubTx);
constexpr std::uint32_t tfDepositMask = ~(tfUniversal | tfDepositSubTx);

// AMMClawback flags:
constexpr std::uint32_t tfClawTwoAssets = 0x00000001;
constexpr std::uint32_t tfAMMClawbackMask = ~(tfUniversal | tfClawTwoAssets);

// BridgeModify flags:
constexpr std::uint32_t tfClearAccountCreateAmount = 0x00010000;
constexpr std::uint32_t tfBridgeModifyMask = ~(tfUniversal | tfClearAccountCreateAmount);
Expand Down
1 change: 1 addition & 0 deletions include/xrpl/protocol/detail/features.macro
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ XRPL_FIX (1513, Supported::yes, VoteBehavior::DefaultYe
XRPL_FEATURE(FlowCross, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(Flow, Supported::yes, VoteBehavior::DefaultYes)
XRPL_FEATURE(OwnerPaysFee, Supported::no, VoteBehavior::DefaultNo)
XRPL_FEATURE(AMMClawback, Supported::yes, VoteBehavior::DefaultYes)

// The following amendments are obsolete, but must remain supported
// because they could potentially get enabled.
Expand Down
8 changes: 8 additions & 0 deletions include/xrpl/protocol/detail/transactions.macro
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,14 @@ TRANSACTION(ttCLAWBACK, 30, Clawback, ({
{sfHolder, soeOPTIONAL},
}))

/** This transaction claws back tokens from an AMM pool. */
TRANSACTION(ttAMM_CLAWBACK, 31, AMMClawback, ({
{sfHolder, soeREQUIRED},
{sfAsset, soeREQUIRED},
{sfAsset2, soeREQUIRED},
{sfAmount, soeOPTIONAL},
}))

/** This transaction type creates an AMM instance */
TRANSACTION(ttAMM_CREATE, 35, AMMCreate, ({
{sfAmount, soeREQUIRED},
Expand Down
1 change: 1 addition & 0 deletions include/xrpl/protocol/jss.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ JSS(Escrow); // ledger type.
JSS(Fee); // in/out: TransactionSign; field.
JSS(FeeSettings); // ledger type.
JSS(Flags); // in/out: TransactionSign; field.
JSS(Holder); // field.
JSS(Invalid); //
JSS(LastLedgerSequence); // in: TransactionSign; field
JSS(LastUpdateTime); // field.
Expand Down
2 changes: 1 addition & 1 deletion src/libxrpl/protocol/TER.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ transResults()

MAKE_ERROR(temMALFORMED, "Malformed transaction."),
MAKE_ERROR(temBAD_AMM_TOKENS, "Malformed: Invalid LPTokens."),
MAKE_ERROR(temBAD_AMOUNT, "Can only send positive amounts."),
MAKE_ERROR(temBAD_AMOUNT, "Malformed: Bad amount."),
MAKE_ERROR(temBAD_CURRENCY, "Malformed: Bad currency."),
MAKE_ERROR(temBAD_EXPIRATION, "Malformed: Bad expiration."),
MAKE_ERROR(temBAD_FEE, "Invalid fee, negative or not XRP."),
Expand Down
Loading

0 comments on commit cf9b547

Please sign in to comment.