Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions include/xrpl/ledger/ApplyViewImpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ class ApplyViewImpl final : public detail::ApplyViewBase
}

void
setWasmReturnCode(std::int32_t const wasmReturnCode)
setVMReturnCode(std::int32_t const vmReturnCode)
{
wasmReturnCode_ = wasmReturnCode;
vmReturnCode_ = vmReturnCode;
}

/** Get the number of modified entries
Expand All @@ -85,7 +85,7 @@ class ApplyViewImpl final : public detail::ApplyViewBase
private:
std::optional<STAmount> deliver_;
std::optional<std::uint32_t> gasUsed_;
std::optional<std::int32_t> wasmReturnCode_;
std::optional<std::int32_t> vmReturnCode_;
};

} // namespace xrpl
2 changes: 1 addition & 1 deletion include/xrpl/ledger/detail/ApplyStateTable.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ApplyStateTable
std::optional<STAmount> const& deliver,
std::optional<uint256 const> const& parentBatchId,
std::optional<std::uint32_t> const& gasUsed,
std::optional<std::int32_t> const& wasmReturnCode,
std::optional<std::int32_t> const& vmReturnCode,
bool isDryRun,
beast::Journal j);

Expand Down
14 changes: 7 additions & 7 deletions include/xrpl/protocol/TxMeta.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,8 @@ class TxMeta
if (obj.isFieldPresent(sfGasUsed))
gasUsed_ = obj.getFieldU32(sfGasUsed);

if (obj.isFieldPresent(sfWasmReturnCode))
wasmReturnCode_ = obj.getFieldI32(sfWasmReturnCode);
if (obj.isFieldPresent(sfVMReturnCode))
vmReturnCode_ = obj.getFieldI32(sfVMReturnCode);
}

[[nodiscard]] std::optional<STAmount> const&
Expand Down Expand Up @@ -123,15 +123,15 @@ class TxMeta
}

void
setWasmReturnCode(std::optional<std::int32_t> const wasmReturnCode)
setVMReturnCode(std::optional<std::int32_t> const vmReturnCode)
{
wasmReturnCode_ = wasmReturnCode;
vmReturnCode_ = vmReturnCode;
}

[[nodiscard]] std::optional<std::int32_t> const&
getWasmReturnCode() const
getVMReturnCode() const
{
return wasmReturnCode_;
return vmReturnCode_;
}

private:
Expand All @@ -143,7 +143,7 @@ class TxMeta
std::optional<STAmount> deliveredAmount_;
std::optional<uint256> parentBatchID_;
std::optional<std::uint32_t> gasUsed_;
std::optional<std::int32_t> wasmReturnCode_;
std::optional<std::int32_t> vmReturnCode_;

STArray nodes_;
};
Expand Down
6 changes: 3 additions & 3 deletions include/xrpl/protocol/detail/ledger_entries.macro
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,8 @@ LEDGER_ENTRY(ltFEE_SETTINGS, 0x0073, FeeSettings, fee, ({
{sfReserveBaseDrops, SoeOptional},
{sfReserveIncrementDrops, SoeOptional},
// Smart Escrow fields
{sfExtensionComputeLimit, SoeOptional},
{sfExtensionSizeLimit, SoeOptional},
Comment on lines -308 to -309

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes should be in the fees branch

{sfGasLimit, SoeOptional},
{sfBytecodeSizeLimit, SoeOptional},
{sfGasPrice, SoeOptional},

{sfPreviousTxnID, SoeOptional},
Expand Down Expand Up @@ -339,7 +339,7 @@ LEDGER_ENTRY(ltESCROW, 0x0075, Escrow, escrow, ({
{sfCondition, SoeOptional},
{sfCancelAfter, SoeOptional},
{sfFinishAfter, SoeOptional},
{sfFinishFunction, SoeOptional},
{sfBytecode, SoeOptional},
{sfData, SoeOptional},
{sfSourceTag, SoeOptional},
{sfDestinationTag, SoeOptional},
Expand Down
10 changes: 5 additions & 5 deletions include/xrpl/protocol/detail/sfields.macro
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ TYPED_SFIELD(sfInterestRate, UINT32, 65) // 1/10 basis points (bi
TYPED_SFIELD(sfLateInterestRate, UINT32, 66) // 1/10 basis points (bips)
TYPED_SFIELD(sfCloseInterestRate, UINT32, 67) // 1/10 basis points (bips)
TYPED_SFIELD(sfOverpaymentInterestRate, UINT32, 68) // 1/10 basis points (bips)
TYPED_SFIELD(sfExtensionComputeLimit, UINT32, 69)
TYPED_SFIELD(sfExtensionSizeLimit, UINT32, 70)
TYPED_SFIELD(sfGasLimit, UINT32, 69)
TYPED_SFIELD(sfBytecodeSizeLimit, UINT32, 70)
TYPED_SFIELD(sfGasPrice, UINT32, 71)
TYPED_SFIELD(sfComputationAllowance, UINT32, 72)
TYPED_SFIELD(sfGas, UINT32, 72)
TYPED_SFIELD(sfGasUsed, UINT32, 73)

// 64-bit integers (common)
Expand Down Expand Up @@ -232,7 +232,7 @@ TYPED_SFIELD(sfManagementFeeOutstanding, NUMBER, 17, SField::kSmdNeedsAsset

// 32-bit signed (common)
TYPED_SFIELD(sfLoanScale, INT32, 1)
TYPED_SFIELD(sfWasmReturnCode, INT32, 2)
TYPED_SFIELD(sfVMReturnCode, INT32, 2)

// currency amount (common)
TYPED_SFIELD(sfAmount, AMOUNT, 1)
Expand Down Expand Up @@ -304,7 +304,7 @@ TYPED_SFIELD(sfAssetClass, VL, 28)
TYPED_SFIELD(sfProvider, VL, 29)
TYPED_SFIELD(sfMPTokenMetadata, VL, 30)
TYPED_SFIELD(sfCredentialType, VL, 31)
TYPED_SFIELD(sfFinishFunction, VL, 32)
TYPED_SFIELD(sfBytecode, VL, 32)

// account (common)
TYPED_SFIELD(sfAccount, ACCOUNT, 1)
Expand Down
8 changes: 4 additions & 4 deletions include/xrpl/protocol/detail/transactions.macro
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ TRANSACTION(ttESCROW_CREATE, 1, EscrowCreate,
{sfCondition, SoeOptional},
{sfCancelAfter, SoeOptional},
{sfFinishAfter, SoeOptional},
{sfFinishFunction, SoeOptional},
{sfBytecode, SoeOptional},
{sfData, SoeOptional},
}))

Expand All @@ -73,7 +73,7 @@ TRANSACTION(ttESCROW_FINISH, 2, EscrowFinish,
{sfFulfillment, SoeOptional},
{sfCondition, SoeOptional},
{sfCredentialIDs, SoeOptional},
{sfComputationAllowance, SoeOptional},
{sfGas, SoeOptional},
}))


Expand Down Expand Up @@ -1114,8 +1114,8 @@ TRANSACTION(ttFEE, 101, SetFee,
{sfReserveBaseDrops, SoeOptional},
{sfReserveIncrementDrops, SoeOptional},
// Smart Escrow fields
{sfExtensionComputeLimit, SoeOptional},
{sfExtensionSizeLimit, SoeOptional},
{sfGasLimit, SoeOptional},
{sfBytecodeSizeLimit, SoeOptional},
{sfGasPrice, SoeOptional},
}))

Expand Down
20 changes: 10 additions & 10 deletions include/xrpl/protocol_autogen/ledger_entries/Escrow.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,27 +175,27 @@ class Escrow : public LedgerEntryBase
}

/**
* @brief Get sfFinishFunction (SoeOptional)
* @brief Get sfBytecode (SoeOptional)
* @return The field value, or std::nullopt if not present.
*/
[[nodiscard]]
protocol_autogen::Optional<SF_VL::type::value_type>
getFinishFunction() const
getBytecode() const
{
if (hasFinishFunction())
return this->sle_->at(sfFinishFunction);
if (hasBytecode())
return this->sle_->at(sfBytecode);
return std::nullopt;
}

/**
* @brief Check if sfFinishFunction is present.
* @brief Check if sfBytecode is present.
* @return True if the field is present, false otherwise.
*/
[[nodiscard]]
bool
hasFinishFunction() const
hasBytecode() const
{
return this->sle_->isFieldPresent(sfFinishFunction);
return this->sle_->isFieldPresent(sfBytecode);
}

/**
Expand Down Expand Up @@ -500,13 +500,13 @@ class EscrowBuilder : public LedgerEntryBuilderBase<EscrowBuilder>
}

/**
* @brief Set sfFinishFunction (SoeOptional)
* @brief Set sfBytecode (SoeOptional)
* @return Reference to this builder for method chaining.
*/
EscrowBuilder&
setFinishFunction(std::decay_t<typename SF_VL::type::value_type> const& value)
setBytecode(std::decay_t<typename SF_VL::type::value_type> const& value)
{
object_[sfFinishFunction] = value;
object_[sfBytecode] = value;
return *this;
}

Expand Down
40 changes: 20 additions & 20 deletions include/xrpl/protocol_autogen/ledger_entries/FeeSettings.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,51 +214,51 @@ class FeeSettings : public LedgerEntryBase
}

/**
* @brief Get sfExtensionComputeLimit (SoeOptional)
* @brief Get sfGasLimit (SoeOptional)
* @return The field value, or std::nullopt if not present.
*/
[[nodiscard]]
protocol_autogen::Optional<SF_UINT32::type::value_type>
getExtensionComputeLimit() const
getGasLimit() const
{
if (hasExtensionComputeLimit())
return this->sle_->at(sfExtensionComputeLimit);
if (hasGasLimit())
return this->sle_->at(sfGasLimit);
return std::nullopt;
}

/**
* @brief Check if sfExtensionComputeLimit is present.
* @brief Check if sfGasLimit is present.
* @return True if the field is present, false otherwise.
*/
[[nodiscard]]
bool
hasExtensionComputeLimit() const
hasGasLimit() const
{
return this->sle_->isFieldPresent(sfExtensionComputeLimit);
return this->sle_->isFieldPresent(sfGasLimit);
}

/**
* @brief Get sfExtensionSizeLimit (SoeOptional)
* @brief Get sfBytecodeSizeLimit (SoeOptional)
* @return The field value, or std::nullopt if not present.
*/
[[nodiscard]]
protocol_autogen::Optional<SF_UINT32::type::value_type>
getExtensionSizeLimit() const
getBytecodeSizeLimit() const
{
if (hasExtensionSizeLimit())
return this->sle_->at(sfExtensionSizeLimit);
if (hasBytecodeSizeLimit())
return this->sle_->at(sfBytecodeSizeLimit);
return std::nullopt;
}

/**
* @brief Check if sfExtensionSizeLimit is present.
* @brief Check if sfBytecodeSizeLimit is present.
* @return True if the field is present, false otherwise.
*/
[[nodiscard]]
bool
hasExtensionSizeLimit() const
hasBytecodeSizeLimit() const
{
return this->sle_->isFieldPresent(sfExtensionSizeLimit);
return this->sle_->isFieldPresent(sfBytecodeSizeLimit);
}

/**
Expand Down Expand Up @@ -446,24 +446,24 @@ class FeeSettingsBuilder : public LedgerEntryBuilderBase<FeeSettingsBuilder>
}

/**
* @brief Set sfExtensionComputeLimit (SoeOptional)
* @brief Set sfGasLimit (SoeOptional)
* @return Reference to this builder for method chaining.
*/
FeeSettingsBuilder&
setExtensionComputeLimit(std::decay_t<typename SF_UINT32::type::value_type> const& value)
setGasLimit(std::decay_t<typename SF_UINT32::type::value_type> const& value)
{
object_[sfExtensionComputeLimit] = value;
object_[sfGasLimit] = value;
return *this;
}

/**
* @brief Set sfExtensionSizeLimit (SoeOptional)
* @brief Set sfBytecodeSizeLimit (SoeOptional)
* @return Reference to this builder for method chaining.
*/
FeeSettingsBuilder&
setExtensionSizeLimit(std::decay_t<typename SF_UINT32::type::value_type> const& value)
setBytecodeSizeLimit(std::decay_t<typename SF_UINT32::type::value_type> const& value)
{
object_[sfExtensionSizeLimit] = value;
object_[sfBytecodeSizeLimit] = value;
return *this;
}

Expand Down
20 changes: 10 additions & 10 deletions include/xrpl/protocol_autogen/transactions/EscrowCreate.h
Original file line number Diff line number Diff line change
Expand Up @@ -175,29 +175,29 @@ class EscrowCreate : public TransactionBase
}

/**
* @brief Get sfFinishFunction (SoeOptional)
* @brief Get sfBytecode (SoeOptional)
* @return The field value, or std::nullopt if not present.
*/
[[nodiscard]]
protocol_autogen::Optional<SF_VL::type::value_type>
getFinishFunction() const
getBytecode() const
{
if (hasFinishFunction())
if (hasBytecode())
{
return this->tx_->at(sfFinishFunction);
return this->tx_->at(sfBytecode);
}
return std::nullopt;
}

/**
* @brief Check if sfFinishFunction is present.
* @brief Check if sfBytecode is present.
* @return True if the field is present, false otherwise.
*/
[[nodiscard]]
bool
hasFinishFunction() const
hasBytecode() const
{
return this->tx_->isFieldPresent(sfFinishFunction);
return this->tx_->isFieldPresent(sfBytecode);
}

/**
Expand Down Expand Up @@ -339,13 +339,13 @@ class EscrowCreateBuilder : public TransactionBuilderBase<EscrowCreateBuilder>
}

/**
* @brief Set sfFinishFunction (SoeOptional)
* @brief Set sfBytecode (SoeOptional)
* @return Reference to this builder for method chaining.
*/
EscrowCreateBuilder&
setFinishFunction(std::decay_t<typename SF_VL::type::value_type> const& value)
setBytecode(std::decay_t<typename SF_VL::type::value_type> const& value)
{
object_[sfFinishFunction] = value;
object_[sfBytecode] = value;
return *this;
}

Expand Down
Loading
Loading