-
Notifications
You must be signed in to change notification settings - Fork 601
XLS-0046d-dynamic-non-fungible-tokens #205
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
Merged
Merged
Changes from 7 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
d1ec4f3
XLS-0046d-dynamic-non-fungible-tokens/README.md
xVet 498b4f7
Update XLS-0046d-dynamic-non-fungible-tokens/README.md
xVet 5ce56a0
Update XLS-0046d-dynamic-non-fungible-tokens/README.md
xVet 4ef7de4
Update XLS-0046d-dynamic-non-fungible-tokens/README.md
xVet 8e31731
Update XLS-0046d-dynamic-non-fungible-tokens/README.md
xVet 2f62488
Update README.md
xVet 44e9195
Update README.md
xVet 3a9a93d
Update README.md
xVet File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,104 @@ | ||
<pre> | ||
title: Dynamic Non Fungible Tokens (dNFTs) | ||
type: Spec | ||
author: Vet | ||
co-author: Mayukha Vadari, TeQu | ||
</pre> | ||
|
||
## Abstract | ||
|
||
This proposal aims to provide support for XLS-20 NFTs to modify/upgrade token properties. | ||
|
||
XLS-20 provides -Non-Fungible Token- support, these tokens are immutable and don’t allow any changes. Currently NFTs can’t be modified, resulting often in new mints, which leads to ledger bloat that eat valuable resources as well as experimental approaches to use website endpoints to mimic dynamic abilities. | ||
|
||
Apart from the use of immutable NFTs, there is a wide range of use cases around dNFTs (Dynamic Non-Fungible Tokens) which are considered mutable NFTs. The goal is to provide both options to developers and users to cover all aspects of non fungibility, while choosing the least invasive approach to achieve this functionality. | ||
|
||
## Motivation | ||
|
||
Usually, NFTs are typically static in nature. A static NFT refers to an NFT that possesses unchanging and immutable characteristics stored on the blockchain, rendering them unmodifiable. These static NFTs encompass various forms like images, videos, GIF files, music, and unlockable components. For instance, an illustration of a basketball player making a shot into a hoop serves as an example of a static NFT. | ||
|
||
On the other hand, `dynamic NFTs`, often abbreviated as dNFTs, represent the next phase in the evolution of the NFT landscape. These `dynamic NFTs` seamlessly integrate the inherent uniqueness of NFTs with the inclusion of dynamic data inputs. These inputs can arise from calculations conducted either on the blockchain or off-chain. | ||
|
||
Oracles could supply dynamic real-world data to NFTs. To illustrate, a `dynamic NFT` might showcase real-time updates of a basketball player's performance statistics as they actively play. | ||
|
||
|
||
|
||
## Specification | ||
|
||
### 3. New Transactors and Flags | ||
|
||
### We will specify the following: | ||
|
||
New Transactor | ||
- NFTokenModify | ||
|
||
New Flags | ||
- tfMutable | ||
|
||
### 3.1 tfMutable | ||
|
||
New flags for `NFTokenMint`: | ||
|
||
|
||
| Flag Name | Flag Value | Description | | ||
|-------------------|:----------------:|:-------------------------------------------------------------------------------------:| | ||
| `tfMutable` | `0x00000010` | `Allow issuer (or an entity authorized by the issuer) to modify “URI”.` | | ||
|
||
|
||
|
||
### 3.2 NFTokenModify | ||
|
||
|
||
`NFTokenModify` is used to modify the URI property of a NFT: | ||
|
||
Transaction-specific Fields | ||
|
||
| Field Name | Required? | JSON Type | Internal Type | | ||
|-------------------|:----------------:|:---------------:|:---------------:| | ||
| `TransactionType` | `✔️` | `string` | `UINT16` | | ||
|
||
Indicates the `account` which is owning the NFT, in case of `Owner` not specified, it's implied that the submitting `account` is also the `Owner` of the NFT. | ||
|
||
| Field Name | Required? | JSON Type | Internal Type | | ||
|-------------------|:----------------:|:---------------:|:---------------:| | ||
| `Owner` | | `string` | `ACCOUNT ID` | | ||
|
||
Indicates the `NFToken` object to be modified. | ||
|
||
| Field Name | Required? | JSON Type | Internal Type | | ||
|-------------------|:----------------:|:---------------:|:---------------:| | ||
| `NFTokenID` | `✔️` | `string` | `UINT256` | | ||
|
||
The new `URI` that points to data and/or metadata associated with the NFT. | ||
If a `URI` is omitted then the corresponding `URI` record in the XRP ledger, if present, is removed. | ||
|
||
| Field Name | Required? | JSON Type | Internal Type | | ||
|-------------------|:----------------:|:---------------:|:---------------:| | ||
| `URI` | | `string` | `BLOB` | | ||
|
||
|
||
|
||
|
||
|
||
Example (modify URI): | ||
|
||
|
||
{ | ||
"TransactionType": "NFTokenModify", | ||
"Account": "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", | ||
"Owner": "rogue5HnPRSszD9CWGSUz8UGHMVwSSKF6", | ||
"Fee": "10", | ||
"Sequence": 33, | ||
“NFTokenID”: “0008C350C182B4F213B82CCFA4C6F59AD76F0AFCFBDF04D5A048C0A300000007", | ||
"URI": "697066733A2F2F62616679626569636D6E73347A736F6C686C6976346C746D6E356B697062776373637134616C70736D6C6179696970666B73746B736D3472746B652F5665742E706E67", | ||
|
||
... | ||
|
||
} | ||
|
||
|
||
If `tfMutable` is not set, executing NFTokenModify should fail! | ||
|
||
If `tfMutable` is set, executing NFTokenModify should fail when neither `Issuer` or an `account` authorized via `NFTokenMinter`, according to the specific flag, is executing the transaction. | ||
|
||
This approach takes into consideration that `NFToken Flags` are part of the `NFTokenID`, mutating anything that is part of the `NFTokenID` must be avoided. |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.