-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Single Asset Vault #5224
base: develop
Are you sure you want to change the base?
Single Asset Vault #5224
Changes from 21 commits
1a032f0
ff8c649
a8ec8e7
d09e74e
1680477
ebc97ae
286612c
6046fa2
1255216
1ff1274
ea6c040
ea30f44
12646cb
54d511b
b5619fb
ad58166
ecec6e5
eae2cd3
526f715
b9f1200
241429b
8d5cfb9
bf8bbff
375614d
c325b6c
dbaa12a
580a85f
c08f86d
25a20ad
2c4a224
9bf9a1e
86d249a
65d6c48
02dec4f
3eebdae
ad68074
06a8a61
a98e59a
21e0e7e
eed18d1
c3f9a4c
d1c7d1a
8baadd5
9decc05
6765c10
1884ec5
acaed58
ffaa8bd
b7c9577
87d8881
c1d8bc4
e9ed800
9d619b9
3f5df80
a0632a0
04503c9
6370448
152da6e
ac6d26a
1756fa7
fc2e1a2
4dc2025
1589498
b0c2b97
1441c91
65fdac0
8ca6a62
7b4e901
90fef02
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,13 +20,15 @@ | |
#ifndef RIPPLE_PROTOCOL_ASSET_H_INCLUDED | ||
#define RIPPLE_PROTOCOL_ASSET_H_INCLUDED | ||
|
||
#include <xrpl/basics/Number.h> | ||
#include <xrpl/basics/base_uint.h> | ||
#include <xrpl/protocol/Issue.h> | ||
#include <xrpl/protocol/MPTIssue.h> | ||
|
||
namespace ripple { | ||
|
||
class Asset; | ||
class STAmount; | ||
|
||
template <typename TIss> | ||
concept ValidIssueType = | ||
|
@@ -92,6 +94,9 @@ class Asset | |
void | ||
setJson(Json::Value& jv) const; | ||
|
||
STAmount | ||
operator()(Number const&) const; | ||
|
||
bool | ||
native() const | ||
{ | ||
|
@@ -114,6 +119,14 @@ class Asset | |
equalTokens(Asset const& lhs, Asset const& rhs); | ||
}; | ||
|
||
inline Json::Value | ||
to_json(Asset const& asset) | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this function implementation changed? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I suppose to give the equivalent output to both |
||
Json::Value jv; | ||
asset.setJson(jv); | ||
return jv; | ||
} | ||
|
||
template <ValidIssueType TIss> | ||
constexpr bool | ||
Asset::holds() const | ||
|
@@ -219,9 +232,6 @@ validJSONAsset(Json::Value const& jv); | |
Asset | ||
assetFromJson(Json::Value const& jv); | ||
|
||
Json::Value | ||
to_json(Asset const& asset); | ||
|
||
} // namespace ripple | ||
|
||
#endif // RIPPLE_PROTOCOL_ASSET_H_INCLUDED |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -111,6 +111,9 @@ std::size_t constexpr maxMPTokenMetadataLength = 1024; | |
/** The maximum amount of MPTokenIssuance */ | ||
std::uint64_t constexpr maxMPTokenAmount = 0x7FFF'FFFF'FFFF'FFFFull; | ||
|
||
/** The maximum length of MPTokenMetadata */ | ||
std::size_t constexpr maxVaultDataLength = 256; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I want to suggest renaming this to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think maybe |
||
|
||
/** A ledger index. */ | ||
using LedgerIndex = std::uint32_t; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ | |
|
||
#include <cstdint> | ||
#include <map> | ||
#include <utility> | ||
|
||
namespace ripple { | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not used and should be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, done
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done