xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
entries
MPTokenEntry.h
1
#pragma once
2
3
#include <xrpl/basics/base_uint.h>
4
#include <xrpl/beast/utility/Journal.h>
5
#include <xrpl/ledger/ApplyView.h>
6
#include <xrpl/ledger/ReadView.h>
7
#include <xrpl/ledger/entries/SLEBase.h>
8
#include <xrpl/protocol/AccountID.h>
9
#include <xrpl/protocol/Indexes.h>
10
#include <xrpl/protocol/LedgerFormats.h>
11
#include <xrpl/protocol/UintTypes.h>
12
13
namespace
xrpl
{
14
15
template
<
typename
ViewT>
16
class
MPTokenEntry
:
public
SLEBase
<ViewT, ltMPTOKEN>
17
{
18
public
:
19
using
Base
=
SLEBase<ViewT, ltMPTOKEN>
;
20
21
// Inherit base constructors: adopt an existing SLE, or resolve one from a
22
// Keylet against the view.
23
using
Base::Base;
24
25
explicit
MPTokenEntry
(
26
MPTID
const
& issuanceID,
27
AccountID
const
& holder,
28
Base::ViewRefType
view,
29
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
30
: Base(
keylet
::mptoken(issuanceID, holder), view, j)
31
{
32
}
33
34
explicit
MPTokenEntry
(
35
UInt256
const
& issuanceKey,
36
AccountID
const
& holder,
37
Base::ViewRefType
view,
38
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
39
: Base(
keylet
::mptoken(issuanceKey, holder), view, j)
40
{
41
}
42
43
explicit
MPTokenEntry
(
44
UInt256
const
& mptokenKey,
45
Base::ViewRefType
view,
46
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
47
: Base(
keylet
::mptoken(mptokenKey), view, j)
48
{
49
}
50
};
51
52
using
MPTokenEntryR
=
MPTokenEntry<ReadView>
;
53
using
MPTokenEntryW
=
MPTokenEntry<ApplyView>
;
54
55
}
// namespace xrpl
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:44
beast::Journal::getNullSink
static Sink & getNullSink()
Returns a Sink which does nothing.
Definition
beast_Journal.cpp:63
xrpl::MPTokenEntry
Definition
MPTokenEntry.h:17
xrpl::MPTokenEntry::MPTokenEntry
MPTokenEntry(MPTID const &issuanceID, AccountID const &holder, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
MPTokenEntry.h:25
xrpl::MPTokenEntry::Base
SLEBase< ViewT, ltMPTOKEN > Base
Definition
MPTokenEntry.h:19
xrpl::MPTokenEntry::MPTokenEntry
MPTokenEntry(UInt256 const &issuanceKey, AccountID const &holder, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
MPTokenEntry.h:34
xrpl::MPTokenEntry::MPTokenEntry
MPTokenEntry(UInt256 const &mptokenKey, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
MPTokenEntry.h:43
xrpl::SLEBase::ViewRefType
std::conditional_t< kIsWritable, ApplyView &, ReadView const & > ViewRefType
Definition
SLEBase.h:106
xrpl::SLEBase< ViewT, ltMPTOKEN >::SLEBase
SLEBase(SLEBase const &)=default
xrpl::keylet
Keylet computation functions.
Definition
Indexes.h:40
xrpl
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:5
xrpl::MPTokenEntryW
MPTokenEntry< ApplyView > MPTokenEntryW
Definition
MPTokenEntry.h:53
xrpl::MPTokenEntryR
MPTokenEntry< ReadView > MPTokenEntryR
Definition
MPTokenEntry.h:52
xrpl::UInt256
BaseUInt< 256 > UInt256
Definition
base_uint.h:580
xrpl::MPTID
BaseUInt< 192 > MPTID
MPTID is a 192-bit value representing MPT Issuance ID, which is a concatenation of a 32-bit sequence ...
Definition
UintTypes.h:54
xrpl::AccountID
BaseUInt< 160, detail::AccountIDTag > AccountID
A 160-bit unsigned that uniquely identifies an account.
Definition
AccountID.h:34
Generated by
1.17.0