Skip to content

Conversation

Karkarmath
Copy link
Contributor

@Karkarmath Karkarmath commented Oct 7, 2025

Closes #216

Copy link

github-actions bot commented Oct 7, 2025

Thanks for the update to the jetton burning how‑to. I reviewed the changes in standard/tokens/jettons/how-to-burning.mdx; a few blocking doc/style fixes are needed before merge.

Findings (5)

High (5)

[HIGH] Missing safety callout for funds and keys

Location:

```typescript
import { Address, beginCell, internal, toNano } from "@ton/core";
import { TonClient, WalletContractV4 } from "@ton/ton";
import { mnemonicToPrivateKey } from "@ton/crypto";
async function main() {

Description:
This guide performs chain‑affecting operations (burning jettons and sending a wallet message) and uses wallet credentials but lacks the required safety callout before the actionable code. Per the style guide, steps that move funds or perform on‑chain operations must include a Warning/Caution covering risk, scope, rollback, and testnet‑first guidance (see https://github.com/tact-lang/mintlify-ton-docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L465-L470 and https://github.com/tact-lang/mintlify-ton-docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L472-L479).

Suggestion:
Add a Warning callout immediately before the code block clarifying risk, scope, rollback, and to use Testnet first.

 It is possible to do it manually via your favorite IDE:
+
+> [!WARNING] Funds and keys at risk — use Testnet first
+> This example moves value on-chain and uses a mnemonic/private key.
+> Risk: irreversible transactions; Rollback: none; Scope: your wallet and jetton wallet.
+> Use TON Testnet first and label environments explicitly. Never paste real mnemonics; use secure storage.
+
 ```typescript

[HIGH] Inlined mnemonic in code (unsafe secret handling)

Location:

const your_mnemonic = 'put your mnemonic here, ...';
const keyPair = await mnemonicToPrivateKey(your_mnemonic.split(" "));
const walletContract = WalletContractV4.create({
workchain: 0,
publicKey: keyPair.publicKey,

Description:
The example inlines a mnemonic as a string literal, normalizing unsafe handling of secrets. This risks accidental leaks via source control, logs, or screenshots and violates the rule to never inline secrets in guides (see https://github.com/tact-lang/mintlify-ton-docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L498-L500).

Suggestion:
Replace the inline mnemonic with an environment variable and validate its presence.

-    const your_mnemonic = 'put your mnemonic here, ...';
-    const keyPair = await mnemonicToPrivateKey(your_mnemonic.split(" "));
+    const MNEMONIC = process.env.MNEMONIC;
+    if (!MNEMONIC) throw new Error("Set MNEMONIC env var with a test mnemonic.");
+    const keyPair = await mnemonicToPrivateKey(MNEMONIC.split(" "));

[HIGH] Undefined placeholders in example (copy/paste hazard)

Location:

.parse('put your Jetton wallet address');
const destinationAddress = Address
.parse('put your regular wallet address');

Description:
The snippet uses free‑form text placeholders like “put your … address” that are not defined on first use and do not follow the required placeholder formats. Undefined placeholders increase copy/paste errors and violate the placeholder convention (see https://github.com/tact-lang/mintlify-ton-docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L392-L400).

Suggestion:
Use <ANGLE_CASE> placeholders and define them after the code block.

-    const jettonWalletAddress = Address
-                                .parse('put your Jetton wallet address');
-    const destinationAddress = Address
-                                .parse('put your regular wallet address');
+    const jettonWalletAddress = Address.parse('<JETTON_WALLET_ADDR>');
+    const destinationAddress = Address.parse('<WALLET_ADDR>');

Add after the code block:

Define placeholders (first use):
`<JETTON_WALLET_ADDR>` — your jetton wallet address.
`<WALLET_ADDR>` — your wallet address to receive responses.
`<RPC_URL_TESTNET>` — HTTPS endpoint of your TON testnet RPC provider.
`<MNEMONIC>` — your 24‑word seed phrase (set via `MNEMONIC` environment variable).

[HIGH] UI strings formatted as code instead of quotation marks

Location:

Or via web services as [TON MINTER](https://minter.ton.org/). Connect your wallet via Ton connect.
Insert the Jetton master contract address in the `Jetton address` field. Next, click the `Burn` button in the balance field of your wallet
and enter the amount to burn.

Description:
UI labels (“Jetton address”, “Burn”) are wrapped in code backticks instead of double quotation marks. UI strings must appear verbatim in double quotes for accurate copying and translation (see https://github.com/tact-lang/mintlify-ton-docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L262-L266).

Suggestion:
Replace backticks with double quotation marks for UI labels.

-Or via web services as [TON MINTER](https://minter.ton.org/). Connect your wallet via Ton connect.
-Insert the Jetton master contract address in the `Jetton address` field. Next, click the `Burn` button in the balance field of your wallet
+Or via web services as [TON MINTER](https://minter.ton.org/). Connect your wallet via Ton connect.
+Insert the Jetton master contract address in the "Jetton address" field. Next, click the "Burn" button in the balance field of your wallet
 and enter the amount to burn.

[HIGH] Unlabeled non‑runnable snippet

Location:

```typescript
import { Address, beginCell, internal, toNano } from "@ton/core";
import { TonClient, WalletContractV4 } from "@ton/ton";
import { mnemonicToPrivateKey } from "@ton/crypto";
async function main() {

Description:
The code block requires real addresses, a mnemonic, and network setup, and cannot run as shown. Partial snippets must be clearly labeled as “Not runnable” to prevent copy/paste failures (see https://github.com/tact-lang/mintlify-ton-docs/blob/main/contribute/style-guide-extended.mdx?plain=1#L430-L434).

Suggestion:
Label the snippet as not runnable.

 It is possible to do it manually via your favorite IDE:
 
+Not runnable
+
 ```typescript

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.

[Jetton > How to: burning]
1 participant