Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added resources/images/burning-ton-minter.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 63 additions & 2 deletions standard/tokens/jettons/how-to-burning.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,68 @@
---
title: "How to burn"
sidebarTitle: "Burning Jettons"
---

import { Stub } from '/snippets/stub.jsx';
import { Image } from '/snippets/image.jsx';

<Stub issue="216" />
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).

Here is the code for that:

```typescript
import { Address, toNano, WalletContractV5R1, TonClient } from "@ton/ton";

import { mnemonicToPrivateKey } from "@ton/crypto";

import {
AssetsSDK,
createApi,
} from "@ton-community/assets-sdk";

async function main() {
const client = new TonClient({
endpoint: "https://toncenter.com/api/v2/jsonRPC",
});

const your_mnemonic = "put your mnemonic here, ...";
const keyPair = await mnemonicToPrivateKey(your_mnemonic.split(" "));

const wallet = WalletContractV5R1.create({
workchain: 0,
publicKey: keyPair.publicKey,
});

const provider = client.provider(wallet.address);
const sender = wallet.sender(provider, keyPair.secretKey);

const NETWORK = "testnet";
const api = await createApi(NETWORK);

const sdk = AssetsSDK.create({
api,
sender,
});

const JETTON_ADDRESS = Address.parse("put youe Jetton wallet address");
const jetton = sdk.openJettonWallet(JETTON_ADDRESS);

const RECEIVER_ADDRESS = Address.parse("put receiver address");
await jetton.sendBurn(sender, 1200000n);
}

void main();
```

An alternative way to burn tokens is to send them to a ["zero" account](https://tonviewer.com/UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ), see [How to transfer](/standard/tokens/jettons/how-to-transfer).

## Web services

You can also burn tokens without having to write code. Let's consider [TON MINTER](https://minter.ton.org/) as an example.

- Connect your wallet using TON Connect.
- Enter the Jetton master contract address into the "Jetton address" field.
- Click the "Burn" button in your wallet's balance field and enter the amount you want to burn.
- Confirm burning in your wallet application.

![Burning](/resources/images/burning-ton-minter.png)