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);
268 return this->
tx_->at(sfGasLimit);
281 return this->
tx_->isFieldPresent(sfGasLimit);
294 return this->
tx_->at(sfBytecodeSizeLimit);
307 return this->
tx_->isFieldPresent(sfBytecodeSizeLimit);
320 return this->
tx_->at(sfGasPrice);
333 return this->
tx_->isFieldPresent(sfGasPrice);
368 if (tx->getTxnType() != ttFEE)
386 object_[sfLedgerSequence] = value;
408 object_[sfReferenceFeeUnits] = value;
419 object_[sfReserveBase] = value;
430 object_[sfReserveIncrement] = value;
441 object_[sfBaseFeeDrops] = value;
452 object_[sfReserveBaseDrops] = value;
463 object_[sfReserveIncrementDrops] = value;
485 object_[sfBytecodeSizeLimit] = value;
509 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 & setGasPrice(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfGasPrice (SoeOptional).
SetFeeBuilder & setGasLimit(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfGasLimit (SoeOptional).
SetFeeBuilder & setReferenceFeeUnits(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfReferenceFeeUnits (SoeOptional).
SetFeeBuilder & setBytecodeSizeLimit(std::decay_t< typename SF_UINT32::type::value_type > const &value)
Set sfBytecodeSizeLimit (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 hasBytecodeSizeLimit() const
Check if sfBytecodeSizeLimit is present.
bool hasGasLimit() const
Check if sfGasLimit 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 > getGasPrice() const
Get sfGasPrice (SoeOptional).
protocol_autogen::Optional< SF_UINT32::type::value_type > getBytecodeSizeLimit() const
Get sfBytecodeSizeLimit (SoeOptional).
protocol_autogen::Optional< SF_UINT32::type::value_type > getLedgerSequence() const
Get sfLedgerSequence (SoeOptional).
protocol_autogen::Optional< SF_UINT32::type::value_type > getGasLimit() const
Get sfGasLimit (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 hasGasPrice() const
Check if sfGasPrice is present.
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.