feat: Native Feature RPC (#1526)

This commit is contained in:
Alex Kremer
2024-07-11 12:18:13 +01:00
committed by GitHub
parent 6e606cb7d8
commit f771478da0
15 changed files with 715 additions and 80 deletions

View File

@@ -46,6 +46,13 @@ struct MockAmendmentCenter : public data::AmendmentCenterInterface {
MOCK_METHOD(bool, isEnabled, (boost::asio::yield_context, data::AmendmentKey const&, uint32_t), (const, override));
MOCK_METHOD(
std::vector<bool>,
isEnabled,
(boost::asio::yield_context, std::vector<data::AmendmentKey> const&, uint32_t),
(const, override)
);
MOCK_METHOD(data::Amendment const&, getAmendment, (data::AmendmentKey const&), (const, override));
MOCK_METHOD(data::Amendment const&, IndexOperator, (data::AmendmentKey const&), (const));

View File

@@ -902,6 +902,16 @@ CreateAmendmentsObject(std::vector<ripple::uint256> const& enabledAmendments)
return amendments;
}
ripple::STObject
CreateBrokenAmendmentsObject()
{
auto amendments = ripple::STObject(ripple::sfLedgerEntry);
amendments.setFieldU16(ripple::sfLedgerEntryType, ripple::ltAMENDMENTS);
amendments.setFieldU32(ripple::sfFlags, 0);
// Note: no sfAmendments present
return amendments;
}
ripple::STObject
CreateAMMObject(
std::string_view accountId,

View File

@@ -330,6 +330,9 @@ CreateCreateNFTOfferTxWithMetadata(
[[nodiscard]] ripple::STObject
CreateAmendmentsObject(std::vector<ripple::uint256> const& enabledAmendments);
[[nodiscard]] ripple::STObject
CreateBrokenAmendmentsObject();
[[nodiscard]] ripple::STObject
CreateAMMObject(
std::string_view accountId,