rippled
Loading...
Searching...
No Matches
xrpld
app
tx
detail
MPTokenIssuanceCreate.h
1
//------------------------------------------------------------------------------
2
/*
3
This file is part of rippled: https://github.com/ripple/rippled
4
Copyright (c) 2024 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_MPTOKENISSUANCECREATE_H_INCLUDED
21
#define RIPPLE_TX_MPTOKENISSUANCECREATE_H_INCLUDED
22
23
#include <xrpld/app/tx/detail/Transactor.h>
24
25
#include <xrpl/basics/Expected.h>
26
#include <xrpl/protocol/UintTypes.h>
27
28
namespace
ripple
{
29
30
struct
MPTCreateArgs
31
{
32
std::optional<XRPAmount>
priorBalance
;
33
AccountID
const
&
account
;
34
std::uint32_t
sequence
;
35
std::uint32_t
flags
= 0;
36
std::optional<std::uint64_t>
maxAmount
{};
37
std::optional<std::uint8_t>
assetScale
{};
38
std::optional<std::uint16_t>
transferFee
{};
39
std::optional<Slice>
const
&
metadata
{};
40
std::optional<uint256>
domainId
{};
41
std::optional<std::uint32_t>
mutableFlags
{};
42
};
43
44
class
MPTokenIssuanceCreate
:
public
Transactor
45
{
46
public
:
47
static
constexpr
ConsequencesFactoryType
ConsequencesFactory
{
Normal
};
48
49
explicit
MPTokenIssuanceCreate
(
ApplyContext
& ctx) :
Transactor
(ctx)
50
{
51
}
52
53
static
NotTEC
54
preflight
(
PreflightContext
const
& ctx);
55
56
TER
57
doApply
()
override
;
58
59
static
Expected<MPTID, TER>
60
create
(
ApplyView
&
view
,
beast::Journal
journal,
MPTCreateArgs
const
& args);
61
};
62
63
}
// namespace ripple
64
65
#endif
beast::Journal
A generic endpoint for log messages.
Definition
Journal.h:60
ripple::ApplyContext
State information when applying a tx.
Definition
ApplyContext.h:37
ripple::ApplyView
Writeable view to a ledger, for applying a transaction.
Definition
ApplyView.h:143
ripple::Expected
Definition
Expected.h:132
ripple::MPTokenIssuanceCreate
Definition
MPTokenIssuanceCreate.h:45
ripple::MPTokenIssuanceCreate::ConsequencesFactory
static constexpr ConsequencesFactoryType ConsequencesFactory
Definition
MPTokenIssuanceCreate.h:47
ripple::MPTokenIssuanceCreate::MPTokenIssuanceCreate
MPTokenIssuanceCreate(ApplyContext &ctx)
Definition
MPTokenIssuanceCreate.h:49
ripple::MPTokenIssuanceCreate::create
static Expected< MPTID, TER > create(ApplyView &view, beast::Journal journal, MPTCreateArgs const &args)
Definition
MPTokenIssuanceCreate.cpp:94
ripple::MPTokenIssuanceCreate::doApply
TER doApply() override
Definition
MPTokenIssuanceCreate.cpp:156
ripple::MPTokenIssuanceCreate::preflight
static NotTEC preflight(PreflightContext const &ctx)
Definition
MPTokenIssuanceCreate.cpp:29
ripple::TERSubset
Definition
TER.h:411
ripple::Transactor
Definition
Transactor.h:139
ripple::Transactor::ConsequencesFactoryType
ConsequencesFactoryType
Definition
Transactor.h:155
ripple::Transactor::Normal
@ Normal
Definition
Transactor.h:155
ripple::Transactor::view
ApplyView & view()
Definition
Transactor.h:161
ripple::base_uint< 160, detail::AccountIDTag >
std::uint32_t
ripple
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
Definition
algorithm.h:25
std::optional
ripple::MPTCreateArgs
Definition
MPTokenIssuanceCreate.h:31
ripple::MPTCreateArgs::transferFee
std::optional< std::uint16_t > transferFee
Definition
MPTokenIssuanceCreate.h:38
ripple::MPTCreateArgs::priorBalance
std::optional< XRPAmount > priorBalance
Definition
MPTokenIssuanceCreate.h:32
ripple::MPTCreateArgs::sequence
std::uint32_t sequence
Definition
MPTokenIssuanceCreate.h:34
ripple::MPTCreateArgs::flags
std::uint32_t flags
Definition
MPTokenIssuanceCreate.h:35
ripple::MPTCreateArgs::mutableFlags
std::optional< std::uint32_t > mutableFlags
Definition
MPTokenIssuanceCreate.h:41
ripple::MPTCreateArgs::assetScale
std::optional< std::uint8_t > assetScale
Definition
MPTokenIssuanceCreate.h:37
ripple::MPTCreateArgs::account
AccountID const & account
Definition
MPTokenIssuanceCreate.h:33
ripple::MPTCreateArgs::domainId
std::optional< uint256 > domainId
Definition
MPTokenIssuanceCreate.h:40
ripple::MPTCreateArgs::maxAmount
std::optional< std::uint64_t > maxAmount
Definition
MPTokenIssuanceCreate.h:36
ripple::MPTCreateArgs::metadata
std::optional< Slice > const & metadata
Definition
MPTokenIssuanceCreate.h:39
ripple::PreflightContext
State information when preflighting a tx.
Definition
Transactor.h:35
Generated by
1.9.8