4#include <xrpl/protocol/STTx.h>
5#include <xrpl/protocol/STParsedJSON.h>
6#include <xrpl/protocol/jss.h>
7#include <xrpl/protocol_autogen/TransactionBase.h>
8#include <xrpl/protocol_autogen/TransactionBuilderBase.h>
9#include <xrpl/json/json_value.h>
44 throw std::runtime_error(
"Invalid transaction type for SetFee");
60 return this->
tx_->at(sfLedgerSequence);
73 return this->
tx_->isFieldPresent(sfLedgerSequence);
86 return this->
tx_->at(sfBaseFee);
99 return this->
tx_->isFieldPresent(sfBaseFee);
112 return this->
tx_->at(sfReferenceFeeUnits);
125 return this->
tx_->isFieldPresent(sfReferenceFeeUnits);
138 return this->
tx_->at(sfReserveBase);
151 return this->
tx_->isFieldPresent(sfReserveBase);
164 return this->
tx_->at(sfReserveIncrement);
177 return this->
tx_->isFieldPresent(sfReserveIncrement);
190 return this->
tx_->at(sfBaseFeeDrops);
203 return this->
tx_->isFieldPresent(sfBaseFeeDrops);
216 return this->
tx_->at(sfReserveBaseDrops);
229 return this->
tx_->isFieldPresent(sfReserveBaseDrops);
242 return this->
tx_->at(sfReserveIncrementDrops);
255 return this->
tx_->isFieldPresent(sfReserveIncrementDrops);
290 if (tx->getTxnType() != ttFEE)
306 object_[sfLedgerSequence] = value;
328 object_[sfReferenceFeeUnits] = value;
339 object_[sfReserveBase] = value;
350 object_[sfReserveIncrement] = value;
361 object_[sfBaseFeeDrops] = value;
372 object_[sfReserveBaseDrops] = value;
383 object_[sfReserveIncrementDrops] = value;
396 sign(publicKey, secretKey);
Builder for SetFee transactions.
SetFeeBuilder & setReserveIncrementDrops(std::decay_t< typename SF_AMOUNT::type::value_type > const &value)
Set sfReserveIncrementDrops (SoeOptional).
SetFeeBuilder & setBaseFeeDrops(std::decay_t< typename SF_AMOUNT::type::value_type > const &value)
Set sfBaseFeeDrops (SoeOptional).
SetFeeBuilder(SF_ACCOUNT::type::value_type account, std::optional< SF_UINT32::type::value_type > sequence=std::nullopt, std::optional< SF_AMOUNT::type::value_type > fee=std::nullopt)
Construct a new SetFeeBuilder with required fields.
SetFeeBuilder & setReserveIncrement(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfReserveIncrement (SoeOptional).
SetFeeBuilder(std::shared_ptr< STTx const > tx)
Construct a SetFeeBuilder from an existing STTx object.
SetFeeBuilder & setReserveBaseDrops(std::decay_t< typename SF_AMOUNT::type::value_type > const &value)
Set sfReserveBaseDrops (SoeOptional).
SetFeeBuilder & setReserveBase(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfReserveBase (SoeOptional).
SetFeeBuilder & setLedgerSequence(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Transaction-specific field setters.
SetFeeBuilder & setReferenceFeeUnits(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfReferenceFeeUnits (SoeOptional).
SetFee build(PublicKey const &publicKey, SecretKey const &secretKey)
Build and return the SetFee wrapper.
SetFeeBuilder & setBaseFee(std::decay_t< typename SF_UINT64::type::value_type > const &value)
Set sfBaseFee (SoeOptional).
protocol_autogen::Optional< SF_AMOUNT::type::value_type > getBaseFeeDrops() const
Get sfBaseFeeDrops (SoeOptional).
bool hasReserveIncrementDrops() const
Check if sfReserveIncrementDrops is present.
bool hasReserveBase() const
Check if sfReserveBase is present.
SetFee(std::shared_ptr< STTx const > tx)
Construct a SetFee transaction wrapper from an existing STTx object.
protocol_autogen::Optional< SF_UINT32::type::value_type > getReserveIncrement() const
Get sfReserveIncrement (SoeOptional).
protocol_autogen::Optional< SF_UINT32::type::value_type > getLedgerSequence() const
Get sfLedgerSequence (SoeOptional).
bool hasReserveBaseDrops() const
Check if sfReserveBaseDrops is present.
protocol_autogen::Optional< SF_UINT32::type::value_type > getReserveBase() const
Get sfReserveBase (SoeOptional).
protocol_autogen::Optional< SF_UINT64::type::value_type > getBaseFee() const
Get sfBaseFee (SoeOptional).
bool hasReserveIncrement() const
Check if sfReserveIncrement is present.
bool hasBaseFeeDrops() const
Check if sfBaseFeeDrops is present.
protocol_autogen::Optional< SF_AMOUNT::type::value_type > getReserveBaseDrops() const
Get sfReserveBaseDrops (SoeOptional).
protocol_autogen::Optional< SF_AMOUNT::type::value_type > getReserveIncrementDrops() const
Get sfReserveIncrementDrops (SoeOptional).
protocol_autogen::Optional< SF_UINT32::type::value_type > getReferenceFeeUnits() const
Get sfReferenceFeeUnits (SoeOptional).
bool hasReferenceFeeUnits() const
Check if sfReferenceFeeUnits is present.
static constexpr xrpl::TxType txType
bool hasBaseFee() const
Check if sfBaseFee is present.
bool hasLedgerSequence() const
Check if sfLedgerSequence is present.
std::shared_ptr< STTx const > tx_
The underlying transaction object being wrapped.
TransactionBase(std::shared_ptr< STTx const > tx)
Construct a transaction wrapper from an existing STTx object.
TransactionBuilderBase()=default
SetFeeBuilder & sign(PublicKey const &publicKey, SecretKey const &secretKey)
std::conditional_t< std::is_reference_v< ValueType >, std::optional< std::reference_wrapper< std::remove_reference_t< ValueType > > >, std::optional< ValueType > > Optional
TxType
Transaction type identifiers.