rippled
Loading...
Searching...
No Matches
VaultClawback.h
1#ifndef XRPL_TX_VAULTCLAWBACK_H_INCLUDED
2#define XRPL_TX_VAULTCLAWBACK_H_INCLUDED
3
4#include <xrpld/app/tx/detail/Transactor.h>
5
6namespace xrpl {
7
9{
10public:
12
14 {
15 }
16
17 static NotTEC
18 preflight(PreflightContext const& ctx);
19
20 static TER
21 preclaim(PreclaimContext const& ctx);
22
23 TER
24 doApply() override;
25
26private:
29 std::shared_ptr<SLE> const& vault,
30 std::shared_ptr<SLE const> const& sleShareIssuance,
31 AccountID const& holder,
33};
34
35} // namespace xrpl
36
37#endif
State information when applying a tx.
VaultClawback(ApplyContext &ctx)
static NotTEC preflight(PreflightContext const &ctx)
static constexpr ConsequencesFactoryType ConsequencesFactory
static TER preclaim(PreclaimContext const &ctx)
Expected< std::pair< STAmount, STAmount >, TER > assetsToClawback(std::shared_ptr< SLE > const &vault, std::shared_ptr< SLE const > const &sleShareIssuance, AccountID const &holder, STAmount const &clawbackAmount)
TER doApply() override
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition algorithm.h:6
STAmount clawbackAmount(std::shared_ptr< SLE const > const &vault, std::optional< STAmount > const &maybeAmount, AccountID const &account)
State information when determining if a tx is likely to claim a fee.
Definition Transactor.h:61
State information when preflighting a tx.
Definition Transactor.h:16