rippled
ripple
app
tx
impl
Escrow.h
1
//------------------------------------------------------------------------------
2
/*
3
This file is part of rippled: https://github.com/ripple/rippled
4
Copyright (c) 2012, 2013 Ripple Labs Inc.
5
6
Permission to use, copy, modify, and/or distribute this software for any
7
purpose with or without fee is hereby granted, provided that the above
8
copyright notice and this permission notice appear in all copies.
9
10
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17
*/
18
//==============================================================================
19
20
#ifndef RIPPLE_TX_ESCROW_H_INCLUDED
21
#define RIPPLE_TX_ESCROW_H_INCLUDED
22
23
#include <ripple/app/tx/impl/Transactor.h>
24
25
namespace
ripple
{
26
27
class
EscrowCreate
:
public
Transactor
28
{
29
public
:
30
static
constexpr
ConsequencesFactoryType
ConsequencesFactory
{
Custom
};
31
32
explicit
EscrowCreate
(
ApplyContext
& ctx) :
Transactor
(ctx)
33
{
34
}
35
36
static
TxConsequences
37
makeTxConsequences
(
PreflightContext
const
& ctx);
38
39
static
NotTEC
40
preflight
(
PreflightContext
const
& ctx);
41
42
TER
43
doApply
()
override
;
44
};
45
46
//------------------------------------------------------------------------------
47
48
class
EscrowFinish
:
public
Transactor
49
{
50
public
:
51
static
constexpr
ConsequencesFactoryType
ConsequencesFactory
{
Normal
};
52
53
explicit
EscrowFinish
(
ApplyContext
& ctx) :
Transactor
(ctx)
54
{
55
}
56
57
static
NotTEC
58
preflight
(
PreflightContext
const
& ctx);
59
60
static
XRPAmount
61
calculateBaseFee
(
ReadView
const
&
view
,
STTx
const
& tx);
62
63
TER
64
doApply
()
override
;
65
};
66
67
//------------------------------------------------------------------------------
68
69
class
EscrowCancel
:
public
Transactor
70
{
71
public
:
72
static
constexpr
ConsequencesFactoryType
ConsequencesFactory
{
Normal
};
73
74
explicit
EscrowCancel
(
ApplyContext
& ctx) :
Transactor
(ctx)
75
{
76
}
77
78
static
NotTEC
79
preflight
(
PreflightContext
const
& ctx);
80
81
TER
82
doApply
()
override
;
83
};
84
85
}
// namespace ripple
86
87
#endif
ripple::EscrowFinish::ConsequencesFactory
static constexpr ConsequencesFactoryType ConsequencesFactory
Definition:
Escrow.h:51
ripple::EscrowCancel::doApply
TER doApply() override
Definition:
Escrow.cpp:516
ripple::Transactor
Definition:
Transactor.h:85
ripple::EscrowCreate::makeTxConsequences
static TxConsequences makeTxConsequences(PreflightContext const &ctx)
Definition:
Escrow.cpp:94
ripple::EscrowCreate
Definition:
Escrow.h:27
ripple::EscrowFinish::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition:
Escrow.cpp:295
ripple::EscrowCreate::ConsequencesFactory
static constexpr ConsequencesFactoryType ConsequencesFactory
Definition:
Escrow.h:30
ripple::EscrowCreate::EscrowCreate
EscrowCreate(ApplyContext &ctx)
Definition:
Escrow.h:32
ripple::Transactor::ConsequencesFactoryType
ConsequencesFactoryType
Definition:
Transactor.h:101
ripple::EscrowFinish::EscrowFinish
EscrowFinish(ApplyContext &ctx)
Definition:
Escrow.h:53
ripple::TERSubset
Definition:
TER.h:340
ripple::STTx
Definition:
STTx.h:45
ripple::ApplyContext
State information when applying a tx.
Definition:
ApplyContext.h:35
ripple::Transactor::Custom
@ Custom
Definition:
Transactor.h:101
ripple::EscrowCancel
Definition:
Escrow.h:69
ripple::EscrowCancel::ConsequencesFactory
static constexpr ConsequencesFactoryType ConsequencesFactory
Definition:
Escrow.h:72
ripple::ReadView
A view into a ledger.
Definition:
ReadView.h:125
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition:
RCLCensorshipDetector.h:29
ripple::EscrowCreate::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition:
Escrow.cpp:100
ripple::EscrowFinish::doApply
TER doApply() override
Definition:
Escrow.cpp:355
ripple::Transactor::view
ApplyView & view()
Definition:
Transactor.h:107
ripple::Transactor::Normal
@ Normal
Definition:
Transactor.h:101
ripple::EscrowCancel::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition:
Escrow.cpp:504
ripple::EscrowCreate::doApply
TER doApply() override
Definition:
Escrow.cpp:160
ripple::EscrowFinish::calculateBaseFee
static XRPAmount calculateBaseFee(ReadView const &view, STTx const &tx)
Definition:
Escrow.cpp:342
ripple::PreflightContext
State information when preflighting a tx.
Definition:
Transactor.h:31
ripple::TxConsequences
Class describing the consequences to the account of applying a transaction if the transaction consume...
Definition:
applySteps.h:45
ripple::EscrowFinish
Definition:
Escrow.h:48
ripple::EscrowCancel::EscrowCancel
EscrowCancel(ApplyContext &ctx)
Definition:
Escrow.h:74
ripple::XRPAmount
Definition:
XRPAmount.h:46
Generated by
1.8.17