#include <AMMClawback.h>
|
| static NotTEC | checkSign (ReadView const &view, ApplyFlags flags, std::optional< uint256 const > const &parentBatchId, AccountID const &idAccount, STObject const &sigObject, beast::Journal const j) |
| |
| static XRPAmount | minimumFee (ServiceRegistry ®istry, XRPAmount baseFee, Fees const &fees, ApplyFlags flags) |
| | Compute the minimum fee required to process a transaction with a given baseFee based on the current server load.
|
| |
| static XRPAmount | calculateOwnerReserveFee (ReadView const &view, STTx const &tx) |
| |
| static bool | checkExtraFeatures (PreflightContext const &ctx) |
| |
| static NotTEC | preflightSigValidated (PreflightContext const &ctx) |
| |
| static bool | validDataLength (std::optional< Slice > const &slice, std::size_t maxLength) |
| |
| template<class T > |
| static bool | validNumericRange (std::optional< T > value, T max, T min=T{}) |
| |
| template<class T , class Unit > |
| static bool | validNumericRange (std::optional< T > value, unit::ValueUnit< Unit, T > max, unit::ValueUnit< Unit, T > min=unit::ValueUnit< Unit, T >{}) |
| |
| template<class T > |
| static bool | validNumericMinimum (std::optional< T > value, T min=T{}) |
| | Minimum will usually be zero.
|
| |
| template<class T , class Unit > |
| static bool | validNumericMinimum (std::optional< T > value, unit::ValueUnit< Unit, T > min=unit::ValueUnit< Unit, T >{}) |
| | Minimum will usually be zero.
|
| |
|
| TER | applyGuts (Sandbox &view) |
| |
| std::tuple< TER, STAmount, STAmount, std::optional< STAmount > > | equalWithdrawMatchingOneAmount (Sandbox &view, SLE const &ammSle, AccountID const &holder, AccountID const &ammAccount, STAmount const &amountBalance, STAmount const &amount2Balance, STAmount const &lptAMMBalance, STAmount const &holdLPtokens, STAmount const &amount) |
| | Withdraw both assets by providing maximum amount of asset1, asset2's amount will be calculated according to the current proportion.
|
| |
| std::pair< TER, XRPAmount > | reset (XRPAmount fee) |
| | Reset the context, discarding any changes made and adjust the fee.
|
| |
| TER | consumeSeqProxy (SLE::pointer const &sleAccount) |
| |
| TER | payFee () |
| |
| void | trapTransaction (uint256) const |
| |
◆ ConsequencesFactoryType
| Enumerator |
|---|
| Normal | |
| Blocker | |
| Custom | |
Definition at line 126 of file Transactor.h.
◆ AMMClawback()
◆ getFlagsMask()
◆ preflight()
◆ preclaim()
◆ doApply()
| TER xrpl::AMMClawback::doApply |
( |
| ) |
|
|
overridevirtual |
◆ applyGuts()
| TER xrpl::AMMClawback::applyGuts |
( |
Sandbox & |
view | ) |
|
|
private |
◆ equalWithdrawMatchingOneAmount()
| std::tuple< TER, STAmount, STAmount, std::optional< STAmount > > xrpl::AMMClawback::equalWithdrawMatchingOneAmount |
( |
Sandbox & |
view, |
|
|
SLE const & |
ammSle, |
|
|
AccountID const & |
holder, |
|
|
AccountID const & |
ammAccount, |
|
|
STAmount const & |
amountBalance, |
|
|
STAmount const & |
amount2Balance, |
|
|
STAmount const & |
lptAMMBalance, |
|
|
STAmount const & |
holdLPtokens, |
|
|
STAmount const & |
amount |
|
) |
| |
|
private |
Withdraw both assets by providing maximum amount of asset1, asset2's amount will be calculated according to the current proportion.
Since it is two-asset withdrawal, tfee is omitted.
- Parameters
-
| view | |
| ammAccount | current AMM account |
| amountBalance | current AMM asset1 balance |
| amount2Balance | current AMM asset2 balance |
| lptAMMBalance | current AMM LPT balance |
| amount | asset1 withdraw amount |
- Returns
Definition at line 226 of file AMMClawback.cpp.
◆ operator()()
◆ view() [1/2]
◆ view() [2/2]
| ApplyView const & xrpl::Transactor::view |
( |
| ) |
const |
|
inherited |
◆ checkSeqProxy()
◆ checkPriorTxAndLastLedger()
◆ checkFee()
◆ checkSign() [1/2]
◆ checkSign() [2/2]
◆ checkBatchSign()
◆ calculateBaseFee()
◆ invokePreflight() [1/3]
◆ invokePreflight() [2/3]
◆ invokePreflight() [3/3]
◆ checkPermission()
◆ ticketDelete()
◆ apply()
| TER xrpl::Transactor::apply |
( |
| ) |
|
|
protectedinherited |
◆ preCompute()
| void xrpl::Transactor::preCompute |
( |
| ) |
|
|
protectedvirtualinherited |
◆ minimumFee()
Compute the minimum fee required to process a transaction with a given baseFee based on the current server load.
- Parameters
-
| registry | The service registry. |
| baseFee | The base fee of a candidate transaction |
- See also
- xrpl::calculateBaseFee
- Parameters
-
| fees | Fee settings from the current ledger |
| flags | Transaction processing fees |
Definition at line 314 of file Transactor.cpp.
◆ calculateOwnerReserveFee()
◆ checkExtraFeatures()
◆ preflightSigValidated()
◆ validDataLength()
◆ validNumericRange() [1/2]
template<class T >
| bool xrpl::Transactor::validNumericRange |
( |
std::optional< T > |
value, |
|
|
T |
max, |
|
|
T |
min = T{} |
|
) |
| |
|
staticprotectedinherited |
◆ validNumericRange() [2/2]
template<class T , class Unit >
◆ validNumericMinimum() [1/2]
template<class T >
| bool xrpl::Transactor::validNumericMinimum |
( |
std::optional< T > |
value, |
|
|
T |
min = T{} |
|
) |
| |
|
staticprotectedinherited |
◆ validNumericMinimum() [2/2]
template<class T , class Unit >
◆ reset()
Reset the context, discarding any changes made and adjust the fee.
- Parameters
-
| fee | The transaction fee to be charged. |
- Returns
- A pair containing the transaction result and the actual fee charged.
Definition at line 1015 of file Transactor.cpp.
◆ consumeSeqProxy()
◆ payFee()
| TER xrpl::Transactor::payFee |
( |
| ) |
|
|
privateinherited |
◆ checkSingleSign()
◆ checkMultiSign()
◆ trapTransaction()
| void xrpl::Transactor::trapTransaction |
( |
uint256 |
txHash | ) |
const |
|
privateinherited |
◆ preflight1()
Performs early sanity checks on the account and fee fields.
(And passes flagMask to preflight0)
Do not try to call preflight1 from preflight() in derived classes. See the description of invokePreflight for details.
Definition at line 139 of file Transactor.cpp.
◆ preflight2()
Checks whether the signature appears valid.
Do not try to call preflight2 from preflight() in derived classes. See the description of invokePreflight for details.
Definition at line 193 of file Transactor.cpp.
◆ ConsequencesFactory
◆ ctx_
◆ sink_
◆ j_
◆ account_
◆ preFeeBalance_
| XRPAmount xrpl::Transactor::preFeeBalance_ {} |
|
protectedinherited |