-
Notifications
You must be signed in to change notification settings - Fork 0
Add how to burn page #609
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
base: main
Are you sure you want to change the base?
Add how to burn page #609
Conversation
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 keysLocation: mintlify-ton-docs/standard/tokens/jettons/how-to-burning.mdx Lines 11 to 16 in 70a4115
Description: Suggestion: 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: mintlify-ton-docs/standard/tokens/jettons/how-to-burning.mdx Lines 45 to 49 in 70a4115
Description: Suggestion: - 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: mintlify-ton-docs/standard/tokens/jettons/how-to-burning.mdx Lines 20 to 22 in 70a4115
Description: Suggestion: - 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 marksLocation: mintlify-ton-docs/standard/tokens/jettons/how-to-burning.mdx Lines 67 to 69 in 70a4115
Description: Suggestion: -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 snippetLocation: mintlify-ton-docs/standard/tokens/jettons/how-to-burning.mdx Lines 11 to 16 in 70a4115
Description: Suggestion: It is possible to do it manually via your favorite IDE:
+Not runnable
+
```typescript |
…n-docs into add-how-to-burning
import { Aside } from '/snippets/aside.jsx'; | ||
|
||
<Aside type="danger" title="Warning — funds at risk"> | ||
Burning can move funds. Scope: your wallet and the target jetton contracts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't understand this whole paragraph.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was advice from AI. I think I will just remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Jettons burning is primarily intended to get rid of unnecessary jettons (those with low liquidity or a zero price) and | ||
to influence the market (burning a large number of jettons could increase its liquidity). | ||
|
||
It is possible to do it manually via your favorite IDE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't really matter if IDE is favorite.
The intent of the sentence should've been "here is the code for that".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
const jettonWalletAddress = Address.parse('<JETTON_WALLET_ADDR>'); | ||
const destinationAddress = Address.parse('<WALLET_ADDR>'); | ||
|
||
const messageBody = beginCell() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have bindings for that?
@ton/ton
or @ton-community/assets-sdk
should have constructors for all these Jetton messages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we have. I added a full construction of message just as illustrative example. I will add after that the code used assets-sdk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
||
// connect to your regular wallet | ||
const client = new TonClient({ | ||
endpoint: 'https://toncenter.com/api/v2/jsonRPC', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using prettier
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
void main(); | ||
``` | ||
|
||
Or via web services as [TON MINTER](https://minter.ton.org/). Connect your wallet via Ton connect. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Alternative approach should go under separate
##
; - Grammar;
- Lists should be formatted as
-
lists, not paragraphs; - Need a screenshot here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. On TON MINTER there is no dark theme, so there will be only one screenshot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
To fix the formatting issues:
npx remark -o --silent --silently-ignore standard/tokens/jettons/how-to-burning.mdx |
We can burn some asset just send it to null account: |
Thanks for the improvements to the jetton burning guide. A couple of high‑impact fixes are needed before merge. Findings (2)High (2)[HIGH] Missing safety callout for funds and keysLocation: mintlify-ton-docs/standard/tokens/jettons/how-to-burning.mdx Lines 53 to 59 in e5958a9
Description: Suggestion: --- a/standard/tokens/jettons/how-to-burning.mdx
+++ b/standard/tokens/jettons/how-to-burning.mdx
@@
Jettons burning is primarily intended to get rid of unnecessary jettons (those with low liquidity or a zero price) and
to influence the market (burning a large number of jettons could increase its liquidity).
+Warning — funds at risk
+Burning jettons transfers assets and requires your private key/mnemonic. Scope: your wallet’s jetton balance. Rollback: none—on‑chain burns are final. Do first (testnet): set `NETWORK="testnet"` (for SDK) and use a testnet RPC endpoint.
+
Here is the code for that: [HIGH] Placeholders not defined on first useLocation: mintlify-ton-docs/standard/tokens/jettons/how-to-burning.mdx Lines 20 to 21 in e5958a9
Description: Suggestion: --- a/standard/tokens/jettons/how-to-burning.mdx
+++ b/standard/tokens/jettons/how-to-burning.mdx
@@
void main(); +Define placeholders (first use):
|
Closes #216