xrpld
Toggle main menu visibility
Loading...
Searching...
No Matches
include
xrpl
ledger
entries
MPTokenIssuanceEntry.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
#include <
cstdint
>
14
15
namespace
xrpl
{
16
17
template
<
typename
ViewT>
18
class
MPTokenIssuanceEntry
:
public
SLEBase
<ViewT, ltMPTOKEN_ISSUANCE>
19
{
20
public
:
21
using
Base
=
SLEBase<ViewT, ltMPTOKEN_ISSUANCE>
;
22
23
// Inherit base constructors: adopt an existing SLE, or resolve one from a
24
// Keylet against the view.
25
using
Base::Base;
26
27
explicit
MPTokenIssuanceEntry
(
28
std::uint32_t
seq,
29
AccountID
const
& issuer,
30
Base::ViewRefType
view,
31
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
32
: Base(
keylet
::mptokenIssuance(
makeMptID
(seq, issuer)), view, j)
33
{
34
}
35
36
explicit
MPTokenIssuanceEntry
(
37
MPTID
const
& issuanceID,
38
Base::ViewRefType
view,
39
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
40
: Base(
keylet
::mptokenIssuance(issuanceID), view, j)
41
{
42
}
43
44
explicit
MPTokenIssuanceEntry
(
45
UInt256
const
& issuanceKey,
46
Base::ViewRefType
view,
47
beast::Journal
j =
beast::Journal
{
beast::Journal::getNullSink
()})
48
: Base(
keylet
::mptokenIssuance(issuanceKey), view, j)
49
{
50
}
51
};
52
53
using
MPTokenIssuanceEntryR
=
MPTokenIssuanceEntry<ReadView>
;
54
using
MPTokenIssuanceEntryW
=
MPTokenIssuanceEntry<ApplyView>
;
55
56
}
// 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::MPTokenIssuanceEntry
Definition
MPTokenIssuanceEntry.h:19
xrpl::MPTokenIssuanceEntry::MPTokenIssuanceEntry
MPTokenIssuanceEntry(UInt256 const &issuanceKey, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
MPTokenIssuanceEntry.h:44
xrpl::MPTokenIssuanceEntry::MPTokenIssuanceEntry
MPTokenIssuanceEntry(MPTID const &issuanceID, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
MPTokenIssuanceEntry.h:36
xrpl::MPTokenIssuanceEntry::Base
SLEBase< ViewT, ltMPTOKEN_ISSUANCE > Base
Definition
MPTokenIssuanceEntry.h:21
xrpl::MPTokenIssuanceEntry::MPTokenIssuanceEntry
MPTokenIssuanceEntry(std::uint32_t seq, AccountID const &issuer, Base::ViewRefType view, beast::Journal j=beast::Journal{beast::Journal::getNullSink()})
Definition
MPTokenIssuanceEntry.h:27
xrpl::SLEBase::ViewRefType
std::conditional_t< kIsWritable, ApplyView &, ReadView const & > ViewRefType
Definition
SLEBase.h:106
xrpl::SLEBase< ViewT, ltMPTOKEN_ISSUANCE >::SLEBase
SLEBase(SLEBase const &)=default
cstdint
std::uint32_t
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::MPTokenIssuanceEntryR
MPTokenIssuanceEntry< ReadView > MPTokenIssuanceEntryR
Definition
MPTokenIssuanceEntry.h:53
xrpl::UInt256
BaseUInt< 256 > UInt256
Definition
base_uint.h:580
xrpl::MPTokenIssuanceEntryW
MPTokenIssuanceEntry< ApplyView > MPTokenIssuanceEntryW
Definition
MPTokenIssuanceEntry.h:54
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::makeMptID
MPTID makeMptID(std::uint32_t const sequence, AccountID const &account)
Definition
Indexes.cpp:206
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