Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce MPT support (XLS-33d): #5143

Merged
merged 61 commits into from
Oct 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
6d6fda2
Introduce MPT support (XLS-33d):
gregtatcam Jun 28, 2024
aaf7fe5
Merge branch 'develop' into feature/mpt-v1-var-issues
gregtatcam Sep 30, 2024
f84e9ea
Apply suggestions from code review
gregtatcam Oct 1, 2024
18515dd
Address reviewer's feedback
gregtatcam Oct 1, 2024
aef1426
Allow MPT SendMax in Payment tx.
gregtatcam Oct 1, 2024
9136a89
Apply suggestions from code review
gregtatcam Oct 2, 2024
16a029a
Address reviewer's feedback
gregtatcam Oct 2, 2024
2beb2d9
Manually align jss and disable clang-format
gregtatcam Oct 3, 2024
3cc7003
Apply suggestions from code review
gregtatcam Oct 3, 2024
069273c
Fix clang format
gregtatcam Oct 3, 2024
86bcebd
Apply suggestions from code review
gregtatcam Oct 3, 2024
b9cb9ca
Address reviewer's feedback
gregtatcam Oct 3, 2024
8af452e
remove unneeded fields (#36)
shawnxie999 Oct 3, 2024
fab0c78
rename codes (#37)
shawnxie999 Oct 3, 2024
ea887bf
Address reviewer feedback
gregtatcam Oct 3, 2024
d9fc97f
Check Payment's sendMax and amount have the same issue
gregtatcam Oct 4, 2024
98d419f
Apply suggestions from code review
gregtatcam Oct 4, 2024
3b7861d
Address reviewer's feedback
gregtatcam Oct 7, 2024
93c545d
Fix static_assert in STVar and other changes
gregtatcam Oct 7, 2024
aacb1c8
comment (#38)
shawnxie999 Oct 7, 2024
560cf91
Fix SendMax with no transfer fee
gregtatcam Oct 7, 2024
6a7a8c2
Combine Issue/MPTIssue handling in Payment transactor plus other changes
gregtatcam Oct 9, 2024
8796641
Fix non-unity build
gregtatcam Oct 9, 2024
757b55a
Update src/libxrpl/protocol/TxFormats.cpp
gregtatcam Oct 9, 2024
11aa41c
New SField flag to override hex input/output formatting to use decima…
ximinez Oct 10, 2024
eac438c
Change maxAmount in the test to uint64 for better visualization
gregtatcam Oct 10, 2024
9d51389
Refactor Clawback plus other minor refactoring
gregtatcam Oct 10, 2024
8774b90
Fix requireAuth (#40)
shawnxie999 Oct 11, 2024
4bcf463
Address reviewer's feedback
gregtatcam Oct 11, 2024
9b8564e
Fix metadata and add metadata unit-test
gregtatcam Oct 12, 2024
ac45342
Address reviewer's feedback:
gregtatcam Oct 14, 2024
af29f41
use mptJson
shawnxie999 Oct 15, 2024
9e3cfef
Add += and -= operators to ValueProxy
gregtatcam Oct 15, 2024
4bbf613
ledger_entry test (#41)
shawnxie999 Oct 15, 2024
3bb44c2
Simplify constraint for +=, -= of ValueProxy
gregtatcam Oct 16, 2024
0bf5b42
Address reviewer's feedback on mpt uni-test helper
gregtatcam Oct 16, 2024
924dd9c
refactor mpt_issuance_id into SLE::getJson (#42)
shawnxie999 Oct 16, 2024
31b3be3
Merge branch 'develop' into feature/mpt-v1-var-issues
gregtatcam Oct 16, 2024
c3f2bd4
Fix clang-format
gregtatcam Oct 16, 2024
29c6f5d
Merge with the latest develop
gregtatcam Oct 17, 2024
bd97cc9
Address reviewer's feedback
gregtatcam Oct 17, 2024
38781df
Fix inline isFrozen definition
gregtatcam Oct 17, 2024
e239fcb
Address reviewer feedback
gregtatcam Oct 17, 2024
fe6fa60
Fix clang-format
gregtatcam Oct 18, 2024
f4bc120
Address reviewer's feedback
gregtatcam Oct 18, 2024
780af7a
removed mptHolders (#43)
shawnxie999 Oct 18, 2024
e4009c8
address comments (#44)
shawnxie999 Oct 18, 2024
5f33c80
move flags (#45)
shawnxie999 Oct 21, 2024
e8c8329
Address reviewer's feedback - refactor mpt.[h,cpp]
gregtatcam Oct 21, 2024
c53df59
Apply suggestions from code review - update MPT unit-tests
gregtatcam Oct 21, 2024
b8f3b83
Fix clang-format
gregtatcam Oct 21, 2024
5349827
Address reviewer's feedback - add MPT unit-tests
gregtatcam Oct 21, 2024
0905e37
Apply suggestions from code review
gregtatcam Oct 22, 2024
9d84f3b
Address reviewer's feedback
gregtatcam Oct 22, 2024
e8201f3
address comments (#46)
shawnxie999 Oct 23, 2024
5aa36e4
Apply suggestions from code review
gregtatcam Oct 24, 2024
7a6272e
Address reviewer's feedback
gregtatcam Oct 24, 2024
3439bfa
comments (#48)
shawnxie999 Oct 25, 2024
b636836
Rename mpt holder (#49)
shawnxie999 Oct 28, 2024
7c08b58
Address reviewer's feedback
gregtatcam Oct 29, 2024
9ce2061
Ed's comments (#50)
shawnxie999 Oct 29, 2024
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
Prev Previous commit
Next Next commit
Fix clang-format
gregtatcam committed Oct 16, 2024
commit c3f2bd4ffca63aab8eabc94c49d01255eb469146
6 changes: 4 additions & 2 deletions include/xrpl/basics/MPTAmount.h
Original file line number Diff line number Diff line change
@@ -75,7 +75,8 @@ class MPTAmount : private boost::totally_ordered<MPTAmount>,
operator<(MPTAmount const& other) const;

/** Returns true if the amount is not zero */
explicit constexpr operator bool() const noexcept;
explicit constexpr
operator bool() const noexcept;

/** Return the sign of the amount */
constexpr int
@@ -96,7 +97,8 @@ constexpr MPTAmount::MPTAmount(value_type value) : value_(value)
{
}

constexpr MPTAmount& MPTAmount::operator=(beast::Zero)
constexpr MPTAmount&
MPTAmount::operator=(beast::Zero)
{
value_ = 0;
return *this;
9 changes: 6 additions & 3 deletions include/xrpl/basics/Number.h
Original file line number Diff line number Diff line change
@@ -95,9 +95,12 @@ class Number
* as the preferred type for floating point arithmetic as it makes
* "mixed mode" more convenient, e.g. MPTAmount + Number.
*/
explicit operator XRPAmount() const; // round to nearest, even on tie
explicit operator MPTAmount() const; // round to nearest, even on tie
explicit operator rep() const; // round to nearest, even on tie
explicit
operator XRPAmount() const; // round to nearest, even on tie
explicit
operator MPTAmount() const; // round to nearest, even on tie
explicit
operator rep() const; // round to nearest, even on tie

friend constexpr bool
operator==(Number const& x, Number const& y) noexcept
3 changes: 2 additions & 1 deletion include/xrpl/protocol/detail/STVar.h
Original file line number Diff line number Diff line change
@@ -151,7 +151,8 @@ class STVar
* depth is ignored in former case.
*/
template <typename... Args>
requires ValidConstructSTArgs<Args...> void
requires ValidConstructSTArgs<Args...>
void
constructST(SerializedTypeID id, int depth, Args&&... arg);

bool
3 changes: 2 additions & 1 deletion src/libxrpl/protocol/STVar.cpp
Original file line number Diff line number Diff line change
@@ -136,7 +136,8 @@ STVar::destroy()
}

template <typename... Args>
requires ValidConstructSTArgs<Args...> void
requires ValidConstructSTArgs<Args...>
void
STVar::constructST(SerializedTypeID id, int depth, Args&&... args)
{
auto constructWithDepth = [&]<typename T>() {
9 changes: 6 additions & 3 deletions src/test/jtx/amount.h
Original file line number Diff line number Diff line change
@@ -394,14 +394,17 @@ class MPT
}

template <class T>
requires(sizeof(T) >= sizeof(int) && std::is_arithmetic_v<T>) PrettyAmount
requires(sizeof(T) >= sizeof(int) && std::is_arithmetic_v<T>)
PrettyAmount
operator()(T v) const
{
return {amountFromString(mpt(), std::to_string(v)), name};
}

PrettyAmount operator()(epsilon_t) const;
PrettyAmount operator()(detail::epsilon_multiple) const;
PrettyAmount
operator()(epsilon_t) const;
PrettyAmount
operator()(detail::epsilon_multiple) const;

friend BookSpec
operator~(MPT const& mpt)
Loading