From 9d25fd99b423aefb8bdb3d15b6a6621d0d30b0b1 Mon Sep 17 00:00:00 2001 From: Dennis Dawson Date: Tue, 22 Mar 2022 11:18:36 -0700 Subject: [PATCH 1/5] Add clarification for NFTokenOfferID response Per TOK-52, providing a value with a valid format can result in a success response, even though no NFTokenOffer has been removed. --- .../transactions/transaction-types/nftokencanceloffer.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md b/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md index 6b875ee52a..aa650e8ae9 100644 --- a/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md +++ b/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md @@ -41,8 +41,11 @@ This transaction removes the listed `NFTokenOffer` object from the ledger, if pr | `TransactionType` | String | UInt16 | NFTokenCancelOffer transaction type. The integer identifier is 28. | | `TokenOffers` | Array | VECTOR256 | An array of IDs of the `NFTokenOffer` objects to cancel (not the IDs of `NFToken` objects, but the IDs of the `NFTokenOffer` objects). Each entry must be a different [object ID](ledger-object-ids.html) of an [NFTokenOffer](nftokenoffer.html) object; the transaction is invalid if the array contains duplicate entries. | -The transaction can succeed even if one or more of the IDs in the `TokenOffers` field do not refer to objects that currently exist in the ledger. (For example, those token offers might already have been taken.) The transaction fails with an error if one of the IDs points to an object that does exist, but is not a [NFTokenOffer](nftokenoffer.html) object. +The transaction can succeed even if one or more of the IDs in the `TokenOffers` field do not refer to objects that currently exist in the ledger. (For example, those token offers might already have been taken.) +It is important to note that if you inadvertently provide a `NFTokenID` rather than a `NFTokenOfferID`, you might receive a `tesSuccess` response. The reason is that when passed a properly formatted VECTOR256 value that is not found, the system assumes that the NFTokenOffer has already been deleted. + +The transaction fails with an error if one of the IDs points to an object that does exist, but is not a [NFTokenOffer](nftokenoffer.html) object. {% include '_snippets/rippled-api-links.md' %} From 1f8dbda01230ee2853cd0dccc86f3ae28a57766f Mon Sep 17 00:00:00 2001 From: Dennis Dawson Date: Tue, 22 Mar 2022 12:27:00 -0700 Subject: [PATCH 2/5] remove reference to lsfIssuerCanCancelOffers This feature has been removed. --- .../transactions/transaction-types/nftokencanceloffer.md | 1 - 1 file changed, 1 deletion(-) diff --git a/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md b/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md index aa650e8ae9..b2de205981 100644 --- a/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md +++ b/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md @@ -29,7 +29,6 @@ An existing offer, represented by an `NFTokenOffer` object, can be cancelled by: * The account that originally created the `NFTokenOffer`. * The account in the `Destination` field of the `NFTokenOffer`, if one is present. -* The issuer of the token identified by the `TokenUID` field in the `NFTokenOffer` object, if the token has the `lsfIssuerCanCancelOffers` flag set. * Any account, if the `NFTokenOffer` specifies an expiration time and the close time of the parent ledger in which the `NFTokenCancelOffer` is included is greater than the expiration time. This transaction removes the listed `NFTokenOffer` object from the ledger, if present, and adjusts the reserve requirements accordingly. It is not an error if the `NFTokenOffer` cannot be found: if that is the case, the transaction should complete successfully. From d90a86337d32334e8432f468972cb8d29d7ef547 Mon Sep 17 00:00:00 2001 From: Dennis Dawson Date: Tue, 22 Mar 2022 13:03:58 -0700 Subject: [PATCH 3/5] Add owner field description Per https://ripplelabs.atlassian.net/browse/RIPD-1800, when the issuer burns a NFToken with tfBurnable set the burn request must include the Owner field. --- .../transactions/transaction-types/nftokenburn.md | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/content/references/protocol-reference/transactions/transaction-types/nftokenburn.md b/content/references/protocol-reference/transactions/transaction-types/nftokenburn.md index 150b0d909c..9b145397c5 100644 --- a/content/references/protocol-reference/transactions/transaction-types/nftokenburn.md +++ b/content/references/protocol-reference/transactions/transaction-types/nftokenburn.md @@ -20,7 +20,8 @@ If this operation succeeds, the corresponding `NFToken` is removed. If this oper ``` { "TransactionType": "NFTokenBurn", - "Account": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B", + "Account": "rNCFjv8Ek5oDrNiMJ3pw6eLLFtMjZLJnf2", + "Owner": "rvYAfWj5gh67oV6fW32ZzP3Aw4Eubs59B", "Fee": 10, "TokenID": "000B013A95F14B0044F78A264E41713C64B5F89242540EE208C3098E00000D65" } @@ -65,6 +66,18 @@ If this operation succeeds, the corresponding `NFToken` is removed. If this oper The AccountID that submitted this transaction. The account must be either the present owner of the token or, if the lsfBurnable flag is set in the NFToken, the issuer account or an account authorized by the issuer, (that is, the MintAccount). + + Owner + + No + + string + + AccountID + + The account that owns the NFToken to be destroyed. This field is required when an issuer burns a NFToken minted using the `tfBurnable` flag that is owned by another account. + + TokenID From cd1977b271a308ecba8a5858bf6ed3226e420214 Mon Sep 17 00:00:00 2001 From: Dennis Dawson Date: Tue, 22 Mar 2022 13:33:44 -0700 Subject: [PATCH 4/5] Update TransferFee per spec change Per https://ripplelabs.atlassian.net/browse/RIPD-1799, the spec changed to allow for a range of 0-50,000. --- .../transactions/transaction-types/nftokenmint.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/references/protocol-reference/transactions/transaction-types/nftokenmint.md b/content/references/protocol-reference/transactions/transaction-types/nftokenmint.md index 843b457d4e..ad54829022 100644 --- a/content/references/protocol-reference/transactions/transaction-types/nftokenmint.md +++ b/content/references/protocol-reference/transactions/transaction-types/nftokenmint.md @@ -51,7 +51,7 @@ This transaction assumes that the issuer, `rNCFjv8Ek5oDrNiMJ3pw6eLLFtMjZLJnf2`, |:--------------|:--------------------|:------------------|:-------------------| | `TokenTaxon` | Number | UInt32 | The taxon associated with the token. The taxon is generally a value chosen by the minter of the token. A given taxon can be used for multiple tokens. Taxon identifiers greater than `0xFFFF'FFFF` are disallowed. | | `Issuer` | String | AccountID | _(Optional)_ The issuer of the token, if the sender of the account is issuing it on behalf of another account. This field must be omitted if the account sending the transaction is the issuer of the `NFToken`. If provided, the issuer's [AccountRoot object][] must have the `Minter` field set to sender of this transaction (this transaction's `Account` field). | -| `TransferFee` | Number | UInt16 | _(Optional)_ The value specifies the fee charged by the issuer for secondary sales of the Token, if such sales are allowed. Valid values for this field are between 0 and 9999 inclusive, allowing transfer rates of between 0.00% and 99.99% in increments of 0.01. If this field is provided, the transaction MUST have the [`tfTransferable` flag](#nftokenmint-flags) enabled. | +| `TransferFee` | Number | UInt16 | _(Optional)_ The value specifies the fee charged by the issuer for secondary sales of the Token, if such sales are allowed. Valid values for this field are between 0 and 50,000 inclusive and a value of 1 is equivalent to 1/10 of a basis point or 0.001%, allowing transfer rates between 0% and 50%. A TransferFee of 50,000 corresponds to 50%. If this field is provided, the transaction MUST have the [`tfTransferable` flag](#nftokenmint-flags) enabled. | | `URI` | String | Blob | _(Optional)_ Up to 256 bytes of arbitrary data. In JSON, this should be encoded as a string of hexadecimal. You can use the [`xrpl.convertStringToHex`](https://js.xrpl.org/modules.html#convertStringToHex) utility to convert a URI to its hexadecimal equivalent. This is intended to be a URI that points to the data or metadata associated with the NFT. The contents could decode to an HTTP or HTTPS URL, an IPFS URI, a magnet link, immediate data encoded as an [RFC2379 "data" URL](https://datatracker.ietf.org/doc/html/rfc2397), or even an issuer-specific encoding. The URI is NOT checked for validity. @@ -73,7 +73,7 @@ If you need to specify additional information during minting (for example, detai ## Error Cases -- If the `TransferFee` field is not within the acceptable range (0 to 9999 inclusive) the transaction fails with `temBAD_TRANSFER_RATE`. +- If the `TransferFee` field is not within the acceptable range (0 to 50,000 inclusive) the transaction fails with `temBAD_TRANSFER_RATE`. - If the `URI` field is longer than 256 bytes, the transaction fails with `temMALFORMED`. - If the `Issuer` field refers to an account that does not exist, the transaction fails with `tecNO_ISSUER`. - If account referenced by the `Issuer` field has not authorized this transaction's sender (using the `Minter` setting) to mint `NFToken`s on their behalf, the transaction fails with `tecNO_PERMISSION`. From 953f0ba387a1aa91176298799c7abf560684a121 Mon Sep 17 00:00:00 2001 From: Dennis Dawson Date: Thu, 7 Apr 2022 10:47:40 -0700 Subject: [PATCH 5/5] Update variable names in TokenOffers note. Renaming the variable to nft_offer_index makes the distinction less critical. Ultimately we'll probably remove the note on line 45 entirely. --- .../transactions/transaction-types/nftokencanceloffer.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md b/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md index b2de205981..805077b8b4 100644 --- a/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md +++ b/content/references/protocol-reference/transactions/transaction-types/nftokencanceloffer.md @@ -38,11 +38,11 @@ This transaction removes the listed `NFTokenOffer` object from the ledger, if pr | Field | JSON Type | [Internal Type][] | Description | |:------------------|:----------|:------------------|:-------------------------| | `TransactionType` | String | UInt16 | NFTokenCancelOffer transaction type. The integer identifier is 28. | -| `TokenOffers` | Array | VECTOR256 | An array of IDs of the `NFTokenOffer` objects to cancel (not the IDs of `NFToken` objects, but the IDs of the `NFTokenOffer` objects). Each entry must be a different [object ID](ledger-object-ids.html) of an [NFTokenOffer](nftokenoffer.html) object; the transaction is invalid if the array contains duplicate entries. | +| `TokenOffers` | Array | VECTOR256 | An array of IDs of the `NFTokenOffer` objects to cancel (not the `nft_id` values of `NFToken` objects, but the `nft_offer_index` values of `NFTokenOffer` objects). Each entry must be a different [object ID](ledger-object-ids.html) of an [NFTokenOffer](nftokenoffer.html) object; the transaction is invalid if the array contains duplicate entries. | -The transaction can succeed even if one or more of the IDs in the `TokenOffers` field do not refer to objects that currently exist in the ledger. (For example, those token offers might already have been taken.) +The transaction can succeed even if one or more of the IDs in the `TokenOffers` field do not refer to objects that currently exist in the ledger. (For example, those token offers might already have been deleted.) -It is important to note that if you inadvertently provide a `NFTokenID` rather than a `NFTokenOfferID`, you might receive a `tesSuccess` response. The reason is that when passed a properly formatted VECTOR256 value that is not found, the system assumes that the NFTokenOffer has already been deleted. +It is important to note that if you inadvertently provide a `nft_id` rather than a `nft_offer_index`, you might receive a `tesSuccess` response. The reason is that when passed a properly formatted ID value that is not found, the system assumes that the `NFTokenOffer` has already been deleted. The transaction fails with an error if one of the IDs points to an object that does exist, but is not a [NFTokenOffer](nftokenoffer.html) object.