mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 07:30:30 +00:00
59 lines
1.5 KiB
C++
59 lines
1.5 KiB
C++
#pragma once
|
|
|
|
#include <xrpl/beast/utility/Journal.h>
|
|
#include <xrpl/core/ServiceRegistry.h>
|
|
#include <xrpl/ledger/ApplyView.h>
|
|
#include <xrpl/ledger/ReadView.h>
|
|
#include <xrpl/protocol/AccountID.h>
|
|
#include <xrpl/protocol/STTx.h>
|
|
#include <xrpl/protocol/TER.h>
|
|
#include <xrpl/protocol/XRPAmount.h>
|
|
#include <xrpl/tx/ApplyContext.h>
|
|
#include <xrpl/tx/Transactor.h>
|
|
|
|
namespace xrpl {
|
|
|
|
/**
|
|
* Price Oracle is a system that acts as a bridge between
|
|
* a blockchain network and the external world, providing off-chain price data
|
|
* to decentralized applications (dApps) on the blockchain. This implementation
|
|
* conforms to the requirements specified in the XLS-47d.
|
|
*
|
|
* The OracleDelete transactor implements the deletion of Oracle objects.
|
|
*/
|
|
|
|
class OracleDelete : public Transactor
|
|
{
|
|
public:
|
|
static constexpr auto kConsequencesFactory = ConsequencesFactoryType::Normal;
|
|
|
|
explicit OracleDelete(ApplyContext& ctx) : Transactor(ctx)
|
|
{
|
|
}
|
|
|
|
static NotTEC
|
|
preflight(PreflightContext const& ctx);
|
|
|
|
static TER
|
|
preclaim(PreclaimContext const& ctx);
|
|
|
|
TER
|
|
doApply() override;
|
|
|
|
void
|
|
visitInvariantEntry(bool isDelete, SLE::const_ref before, SLE::const_ref after) override;
|
|
|
|
[[nodiscard]] bool
|
|
finalizeInvariants(
|
|
STTx const& tx,
|
|
TER result,
|
|
XRPAmount fee,
|
|
ReadView const& view,
|
|
beast::Journal const& j) override;
|
|
|
|
static TER
|
|
deleteOracle(ApplyView& view, SLE::ref sle, AccountID const& account, beast::Journal j);
|
|
};
|
|
|
|
} // namespace xrpl
|