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

XLS-46: DynamicNFT #5048

Open
wants to merge 37 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
598a0e3
XLS-46 dNFTs PR first
Nov 27, 2023
d851678
dNFTs initial
xVet Nov 27, 2023
e30addc
added dnft amendment and placed guards
xVet Nov 28, 2023
0848a98
Merge branch 'XRPLF:develop' into dNFTs-XLS-46
xVet Nov 28, 2023
624e11e
added featureDNFT in Feature.h
xVet Nov 28, 2023
4cbde96
Merge branch 'dNFTs-XLS-46' of https://github.com/xVet/rippled into d…
xVet Nov 28, 2023
afaa675
Merge remote-tracking branch 'upstream/develop' into dNFTs-XLS-46
tequdev Feb 16, 2024
f6418aa
dNFTs
tequdev Feb 16, 2024
44790ab
rename dNFT to DynamicNFT
tequdev Feb 16, 2024
ef6ba44
clang-format
tequdev Feb 16, 2024
b9becc4
fix flag test
tequdev Feb 16, 2024
8fd988d
add standard license/disclaimer text
tequdev Feb 16, 2024
68a51e1
Merge remote-tracking branch 'upstream/develop' into dNFTs-XLS-46
tequdev May 31, 2024
750adda
chore
tequdev Jun 18, 2024
4b3480c
fix tests
tequdev Jun 18, 2024
f4ab8c6
Merge remote-tracking branch 'upstream/develop' into featureDynamicNFT
tequdev Jun 18, 2024
47106cc
Merge branch 'develop' into featureDynamicNFT
tequdev Jun 18, 2024
4ca5105
Merge branch 'develop' into featureDynamicNFT
tequdev Jun 21, 2024
579dc25
[FOLD] An incremental approach to the tfNFTokenMintMask variants
scottschurr Jun 27, 2024
cae9b62
[FOLD] Extend testNFTokenModify unit test
scottschurr Jun 27, 2024
23ecb99
[FOLD] Avoid NFTPage coalescing and splitting when URI changes
scottschurr Jun 27, 2024
2eb7559
fix sorting testcase
tequdev Jun 29, 2024
e9dd06c
Merge branch 'develop' into featureDynamicNFT
tequdev Jun 29, 2024
c89f41d
Merge branch 'develop' into featureDynamicNFT
tequdev Jul 3, 2024
1b2cf6d
Merge branch 'develop' into featureDynamicNFT
tequdev Jul 9, 2024
d52b659
Merge branch 'develop' into featureDynamicNFT
tequdev Jul 12, 2024
90aeef9
fix testcase name
tequdev Jul 12, 2024
4eea716
chore: fix typo
tequdev Jul 12, 2024
321459d
Merge branch 'develop' into featureDynamicNFT
tequdev Sep 23, 2024
b41b98a
Merge branch 'develop' into featureDynamicNFT
tequdev Sep 23, 2024
fc81bcc
clang-format
tequdev Sep 23, 2024
0f02668
Merge branch 'develop' into featureDynamicNFT
tequdev Sep 28, 2024
fa732bf
Merge branch 'develop' into featureDynamicNFT
tequdev Nov 1, 2024
16541e2
fix bad merge
tequdev Nov 1, 2024
a76809a
clang-format
tequdev Nov 1, 2024
e3f6542
Merge branch 'develop' into featureDynamicNFT
tequdev Nov 7, 2024
29e7d4d
fix merge
tequdev Nov 7, 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
2 changes: 1 addition & 1 deletion include/xrpl/protocol/Feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace detail {
// Feature.cpp. Because it's only used to reserve storage, and determine how
// large to make the FeatureBitset, it MAY be larger. It MUST NOT be less than
// the actual number of amendments. A LogicError on startup will verify this.
static constexpr std::size_t numFeatures = 83;
static constexpr std::size_t numFeatures = 84;

/** Amendments that this server supports and the default voting behavior.
Whether they are enabled depends on the Rules defined in the validated
Expand Down
32 changes: 20 additions & 12 deletions include/xrpl/protocol/TxFlags.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ constexpr std::uint32_t const tfBurnable = 0x00000001;
constexpr std::uint32_t const tfOnlyXRP = 0x00000002;
constexpr std::uint32_t const tfTrustLine = 0x00000004;
constexpr std::uint32_t const tfTransferable = 0x00000008;
constexpr std::uint32_t const tfMutable = 0x00000010;

// MPTokenIssuanceCreate flags:
// NOTE - there is intentionally no flag here for lsfMPTLocked, which this transaction cannot mutate.
Expand Down Expand Up @@ -169,12 +170,19 @@ constexpr std::uint32_t const tfMPTokenIssuanceDestroyMask = ~tfUniversal;
// The fixRemoveNFTokenAutoTrustLine amendment disables minting with the
// tfTrustLine flag as a way to prevent the attack. But until the
// amendment passes we still need to keep the old behavior available.
constexpr std::uint32_t const tfNFTokenMintOldMask =
~(tfUniversal | tfBurnable | tfOnlyXRP | tfTrustLine | tfTransferable);

constexpr std::uint32_t const tfNFTokenMintMask =
~(tfUniversal | tfBurnable | tfOnlyXRP | tfTransferable);

constexpr std::uint32_t const tfNFTokenMintOldMask =
~( ~tfNFTokenMintMask | tfTrustLine);

// if featureDynamicNFT enabled then new flag allowing mutable URI available.
constexpr std::uint32_t const tfNFTokenMintOldMaskWithMutable =
~( ~tfNFTokenMintOldMask | tfMutable);

constexpr std::uint32_t const tfNFTokenMintMaskWithMutable =
~( ~tfNFTokenMintMask | tfMutable);

// NFTokenCreateOffer flags:
constexpr std::uint32_t const tfSellNFToken = 0x00000001;
constexpr std::uint32_t const tfNFTokenCreateOfferMask =
Expand All @@ -187,17 +195,17 @@ constexpr std::uint32_t const tfNFTokenCancelOfferMask = ~(tfUniversal);
constexpr std::uint32_t const tfNFTokenAcceptOfferMask = ~tfUniversal;

// Clawback flags:
constexpr std::uint32_t const tfClawbackMask = ~tfUniversal;
constexpr std::uint32_t const tfClawbackMask = ~tfUniversal;

// AMM Flags:
constexpr std::uint32_t tfLPToken = 0x00010000;
constexpr std::uint32_t tfWithdrawAll = 0x00020000;
constexpr std::uint32_t tfOneAssetWithdrawAll = 0x00040000;
constexpr std::uint32_t tfSingleAsset = 0x00080000;
constexpr std::uint32_t tfTwoAsset = 0x00100000;
constexpr std::uint32_t tfOneAssetLPToken = 0x00200000;
constexpr std::uint32_t tfLimitLPToken = 0x00400000;
constexpr std::uint32_t tfTwoAssetIfEmpty = 0x00800000;
constexpr std::uint32_t tfLPToken = 0x00010000;
constexpr std::uint32_t tfWithdrawAll = 0x00020000;
constexpr std::uint32_t tfOneAssetWithdrawAll = 0x00040000;
constexpr std::uint32_t tfSingleAsset = 0x00080000;
constexpr std::uint32_t tfTwoAsset = 0x00100000;
constexpr std::uint32_t tfOneAssetLPToken = 0x00200000;
constexpr std::uint32_t tfLimitLPToken = 0x00400000;
constexpr std::uint32_t tfTwoAssetIfEmpty = 0x00800000;
constexpr std::uint32_t tfWithdrawSubTx =
tfLPToken | tfSingleAsset | tfTwoAsset | tfOneAssetLPToken |
tfLimitLPToken | tfWithdrawAll | tfOneAssetWithdrawAll;
Expand Down
1 change: 1 addition & 0 deletions include/xrpl/protocol/detail/features.macro
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
// If you add an amendment here, then do not forget to increment `numFeatures`
// in include/xrpl/protocol/Feature.h.

XRPL_FEATURE(DynamicNFT, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(Credentials, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FEATURE(AMMClawback, Supported::yes, VoteBehavior::DefaultNo)
XRPL_FIX (AMMv1_2, Supported::yes, VoteBehavior::DefaultNo)
Expand Down
8 changes: 7 additions & 1 deletion include/xrpl/protocol/detail/transactions.macro
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,13 @@ TRANSACTION(ttCREDENTIAL_DELETE, 60, CredentialDelete, ({
{sfCredentialType, soeREQUIRED},
}))

/** This transaction type modify a NFToken */
TRANSACTION(ttNFTokenModify, 61, NFTokenModify, ({
{sfNFTokenID, soeREQUIRED},
{sfOwner, soeOPTIONAL},
{sfURI, soeOPTIONAL},
}))


/** This system-generated transaction type is used to update the status of the various amendments.

Expand All @@ -458,7 +465,6 @@ TRANSACTION(ttAMENDMENT, 100, EnableAmendment, ({
}))

/** This system-generated transaction type is used to update the network's fee settings.

For details, see: https://xrpl.org/fee-voting.html
*/
TRANSACTION(ttFEE, 101, SetFee, ({
Expand Down
1 change: 1 addition & 0 deletions include/xrpl/protocol/nft.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ constexpr std::uint16_t const flagBurnable = 0x0001;
constexpr std::uint16_t const flagOnlyXRP = 0x0002;
constexpr std::uint16_t const flagCreateTrustLines = 0x0004;
constexpr std::uint16_t const flagTransferable = 0x0008;
constexpr std::uint16_t const flagMutable = 0x0010;

inline std::uint16_t
getFlags(uint256 const& id)
Expand Down
Loading
Loading