mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 02:55:50 +00:00
Add single asset vault (XLS-65d) (#5224)
- Specification: XRPLF/XRPL-Standards#239 - Amendment: `SingleAssetVault` - Implements a vault feature used to store a fungible asset (XRP, IOU, or MPT, but not NFT) and to receive shares in the vault (an MPT) in exchange. - A vault can be private or public. - A private vault can use permissioned domains, subject to the `PermissionedDomains` amendment. - Shares can be exchanged back into asset with `VaultWithdraw`. - Permissions on the asset in the vault are transitively applied on shares in the vault. - Issuer of the asset in the vault can clawback with `VaultClawback`. - Extended `MPTokenIssuance` with `DomainID`, used by the permissioned domain on the vault shares. Co-authored-by: John Freeman <jfreeman08@gmail.com>
This commit is contained in:
@@ -63,6 +63,13 @@ public:
|
||||
void
|
||||
setValue(Number const& v);
|
||||
|
||||
STNumber&
|
||||
operator=(Number const& rhs)
|
||||
{
|
||||
setValue(rhs);
|
||||
return *this;
|
||||
}
|
||||
|
||||
bool
|
||||
isEquivalent(STBase const& t) const override;
|
||||
bool
|
||||
@@ -83,6 +90,19 @@ private:
|
||||
std::ostream&
|
||||
operator<<(std::ostream& out, STNumber const& rhs);
|
||||
|
||||
struct NumberParts
|
||||
{
|
||||
std::uint64_t mantissa = 0;
|
||||
int exponent = 0;
|
||||
bool negative = false;
|
||||
};
|
||||
|
||||
NumberParts
|
||||
partsFromString(std::string const& number);
|
||||
|
||||
STNumber
|
||||
numberFromJson(SField const& field, Json::Value const& value);
|
||||
|
||||
} // namespace ripple
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user