Skip to content

Conversation

@Karkarmath
Copy link
Contributor

Closes #668

@github-actions
Copy link

Thanks for the updates to the NFT transfer guide. A few high‑severity fixes are needed before this can merge.

Findings (5)

High (5)

[HIGH] Missing safety callout for keys and fund transfer

Location: https://github.com/tact-lang/mintlify-ton-docs/blob/1fd109a111d856d6e8678e4b0fc5e84a368c698d/standard/tokens/nft/how-to-transfer.mdx?plain=1#L30-L53

Description:
The example handles a private mnemonic and performs a TON value transfer, which requires a visible safety callout per the style guide. The page currently lacks a <Aside> covering risk, scope, rollback, and environment.

Suggestion:

@@
-Or you can do it manually. Below there is an illustrative example:
+Or you can do it manually. Below there is an illustrative example:
+
+import { Aside } from '/snippets/aside.jsx';
+
+<Aside type="danger" title="Funds and keys at risk">
+  Risk: This example uses a private mnemonic and sends TON value.
+  Scope: Affects your wallet and transferred assets.
+  Rollback: Transfers are irreversible. If a mnemonic is exposed, rotate it and move funds immediately.
+  Environment: Use TON Testnet and a disposable test wallet. Do not use real mnemonics on mainnet.
+</Aside>

[HIGH] Inline mnemonic encourages unsafe secret handling

Location: https://github.com/tact-lang/mintlify-ton-docs/blob/1fd109a111d856d6e8678e4b0fc5e84a368c698d/standard/tokens/nft/how-to-transfer.mdx?plain=1#L30-L31

Description:
The snippet inlines a mnemonic and derives a key from it, encouraging unsafe storage of secrets in source code. The style guide requires using environment variables or keystores and avoiding secrets in examples.

Suggestion:

-    const your_mnemonic = "put your mnemonic here, ...";
-    const keyPair = await mnemonicToPrivateKey(your_mnemonic.split(" "));
+    const MNEMONIC = process.env.MNEMONIC as string; // set MNEMONIC in your environment (testnet only)
+    const keyPair = await mnemonicToPrivateKey(MNEMONIC.split(" "));

[HIGH] Invalid placeholder format and undefined placeholders in code

Location: https://github.com/tact-lang/mintlify-ton-docs/blob/1fd109a111d856d6e8678e4b0fc5e84a368c698d/standard/tokens/nft/how-to-transfer.mdx?plain=1#L49-L53

Description:
The example uses ad‑hoc prompts inside strings rather than required <ANGLE_CASE> placeholders, and it does not define them on first use. This creates copy/paste hazards and ambiguity.

Suggestion:

-    const NFT_ADDRESS = Address.parse("put your NFT item address");
+    const NFT_ADDRESS = Address.parse("<NFT_ITEM_ADDR>");
@@
-    const RECEIVER_ADDRESS = Address.parse("put receiver address");
+    const RECEIVER_ADDRESS = Address.parse("<RECEIVER_ADDR>");

Define placeholders (first use) below the code:

  • <NFT_ITEM_ADDR> — NFT item address on testnet.
  • <RECEIVER_ADDR> — destination wallet address on testnet.

[HIGH] Incorrect field name for NFT transfer condition

Location: https://github.com/tact-lang/mintlify-ton-docs/blob/1fd109a111d856d6e8678e4b0fc5e84a368c698d/standard/tokens/nft/how-to-transfer.mdx?plain=1#L13-L13

Description:
The text uses forward_ton_amount, which is not part of the NFT transfer signature. For NFTs, the correct field is forward_amount. Using the jetton-style field name can mislead readers.

Suggestion:

-If `forward_ton_amount > 0`, then `forward_payload` must comply with one of the [standard formats](https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md#forward_payload-format).
+If `forward_amount > 0`, then `forward_payload` must comply with one of the [standard formats](https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md#forward_payload-format).

[HIGH] TEP links use moving “master” branch instead of stable permalinks

Location: https://github.com/tact-lang/mintlify-ton-docs/blob/1fd109a111d856d6e8678e4b0fc5e84a368c698d/standard/tokens/nft/how-to-transfer.mdx?plain=1#L6-L13

Description:
Both references to TEP‑62 point to the moving master branch. Normative references must use stable permalinks (specific commit) to avoid drift and preserve reproducibility.

Suggestion:

- NFT transfer is an operation specified in [TEP 0062](https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md). Its implementation must comply with this standard,
+ NFT transfer is an operation specified in [TEP‑62](https://github.com/ton-blockchain/TEPs/blob/1fbc23cac69723c53251f686ec90d81bf0e83443/text/0062-nft-standard.md). Its implementation must comply with this standard,
@@
- If `forward_ton_amount > 0`, then `forward_payload` must comply with one of the [standard formats](https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md#forward_payload-format).
+ If `forward_ton_amount > 0`, then `forward_payload` must comply with one of the [standard formats](https://github.com/ton-blockchain/TEPs/blob/1fbc23cac69723c53251f686ec90d81bf0e83443/text/0062-nft-standard.md#forward_payload-format).

Copy link
Collaborator

@anton-trunov anton-trunov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix the merge conflicts

@anton-trunov anton-trunov marked this pull request as draft October 22, 2025 21:36
@Karkarmath Karkarmath marked this pull request as ready for review October 27, 2025 13:14
@skywardboundd skywardboundd marked this pull request as draft November 5, 2025 09:50
@Karkarmath
Copy link
Contributor Author

Karkarmath commented Nov 5, 2025

Can we add manually building transfer Cell? Because for now we have no SDKs in Tolk, so users can easily build by own in contracts

This manually creation was there! But then Philip decided to exclude that from the arcticle for some reasons.

@Karkarmath Karkarmath marked this pull request as ready for review November 5, 2025 10:45
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. I left several suggestions in standard/tokens/nft/how-to-transfer.mdx:; please apply the inline suggestions.

Comment on lines 6 to 11
NFT transfer is an operation specified in [TEP 0062](https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md), see also [here](/standard/tokens/nft/how-it-works#transfer-nft-item). Its implementation must comply with this standard, and NFT item contracts must support the logic described there. The NFT transfer message is also specified and must comply with the corresponding TL-B scheme. This scheme involves, among other things,

<Stub issue="668" />
- `forward_amount`: the amount of nanotons to be sent to the destination address;
- `forward_payload`: optional custom data that should be sent to the destination address.

`forward_payload` must comply with one of the [standard formats](https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md#forward_payload-format).
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[HIGH] External spec links use moving target instead of a stable permalink

The references to the NFT TEP use links pinned to the repository’s master branch (L6 and L11). Normative references must use a versioned or permanent URL (e.g., a specific commit) to avoid drift and preserve reproducibility.

Please leave a reaction 👍/👎 to this suggestion to improve future reviews for everyone!

@skywardboundd
Copy link
Collaborator

add Tolk and tl-b after it

@skywardboundd skywardboundd marked this pull request as draft November 5, 2025 15:11
@Karkarmath Karkarmath marked this pull request as ready for review November 5, 2025 16:32
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No documentation issues detected.

@Karkarmath
Copy link
Contributor Author

add Tolk and tl-b after it

There will be a separate issue for that. Please, remove the Request changes.

Copy link
Collaborator

@anton-trunov anton-trunov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve the merge conflicts and AI review issues

@anton-trunov anton-trunov marked this pull request as draft November 11, 2025 20:15
@Karkarmath Karkarmath marked this pull request as ready for review November 12, 2025 12:29
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update. In standard/tokens/nft/transfer.mdx I left several suggestions; please apply the inline suggestions.

@Karkarmath Karkarmath marked this pull request as draft November 12, 2025 13:46
@Karkarmath Karkarmath marked this pull request as ready for review November 12, 2025 13:47
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update—there’s one inline suggestion in standard/tokens/nft/transfer.mdx: please apply it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Standards > NFT > How to transfer]

6 participants