rippled
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 
28  : public Transactor
29 {
30 public:
31  explicit
33  : Transactor(ctx)
34  {
35  }
36 
37  static
38  XRPAmount
39  calculateMaxSpend(STTx const& tx);
40 
41  static
42  NotTEC
43  preflight (PreflightContext const& ctx);
44 
45  TER
46  doApply() override;
47 };
48 
49 //------------------------------------------------------------------------------
50 
52  : public Transactor
53 {
54 public:
55  explicit
57  : Transactor(ctx)
58  {
59  }
60 
61  static
62  NotTEC
63  preflight (PreflightContext const& ctx);
64 
65  static
66  FeeUnit64
68  ReadView const& view,
69  STTx const& tx);
70 
71  TER
72  doApply() override;
73 };
74 
75 //------------------------------------------------------------------------------
76 
78  : public Transactor
79 {
80 public:
81  explicit
83  : Transactor(ctx)
84  {
85  }
86 
87  static
88  NotTEC
89  preflight (PreflightContext const& ctx);
90 
91  TER
92  doApply() override;
93 };
94 
95 } // ripple
96 
97 #endif
ripple::EscrowFinish::calculateBaseFee
static FeeUnit64 calculateBaseFee(ReadView const &view, STTx const &tx)
Definition: Escrow.cpp:343
ripple::EscrowCancel::doApply
TER doApply() override
Definition: Escrow.cpp:521
ripple::Transactor
Definition: Transactor.h:78
ripple::EscrowCreate
Definition: Escrow.h:27
ripple::EscrowFinish::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition: Escrow.cpp:293
ripple::EscrowCreate::EscrowCreate
EscrowCreate(ApplyContext &ctx)
Definition: Escrow.h:32
ripple::EscrowCreate::calculateMaxSpend
static XRPAmount calculateMaxSpend(STTx const &tx)
Definition: Escrow.cpp:93
ripple::EscrowFinish::EscrowFinish
EscrowFinish(ApplyContext &ctx)
Definition: Escrow.h:56
ripple::TERSubset
Definition: TER.h:311
ripple::STTx
Definition: STTx.h:43
ripple::ApplyContext
State information when applying a tx.
Definition: ApplyContext.h:35
ripple::feeunit::TaggedFee
Definition: FeeUnits.h:72
ripple::EscrowCancel
Definition: Escrow.h:77
ripple::ReadView
A view into a ledger.
Definition: ReadView.h:186
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:99
ripple::EscrowFinish::doApply
TER doApply() override
Definition: Escrow.cpp:359
ripple::Transactor::view
ApplyView & view()
Definition: Transactor.h:98
ripple::EscrowCancel::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition: Escrow.cpp:508
ripple::EscrowCreate::doApply
TER doApply() override
Definition: Escrow.cpp:159
ripple::PreflightContext
State information when preflighting a tx.
Definition: Transactor.h:32
ripple::EscrowFinish
Definition: Escrow.h:51
ripple::EscrowCancel::EscrowCancel
EscrowCancel(ApplyContext &ctx)
Definition: Escrow.h:82
ripple::XRPAmount
Definition: XRPAmount.h:46