Skip to content
Merged
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
2 changes: 1 addition & 1 deletion content/applications/payments/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -456,4 +456,4 @@ docker compose up -d payment-processor
- [Guide for running a liteserver](/nodes/cpp/run-liteserver)
- [Liteserver proof verification](/foundations/proofs/verifying-liteserver-proofs)

[usdt]: https://tonscan.org/jetton/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs
[usdt]: https://actonscan.com/address/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs?network=mainnet
2 changes: 1 addition & 1 deletion content/contracts/standard/tokens/jettons/burn.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ To burn Jettons manually, use a web service, for example [TON Minter](https://mi

## Another approach

An alternative way to burn tokens is to send them to a ["zero" account](https://tonscan.org/UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ), see [How to transfer](/contracts/standard/tokens/jettons/transfer) page. A wallet app can be used for this.
An alternative way to burn tokens is to send them to a ["zero" account](https://actonscan.com/address/UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ?network=mainnet), see [How to transfer](/contracts/standard/tokens/jettons/transfer) page. A wallet app can be used for this.

## Programmatically

Expand Down
2 changes: 1 addition & 1 deletion content/contracts/standard/tokens/jettons/comparison.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ With the USDT release on TON, an advanced version of the Jetton contract was dev
Another noticeable advantage of this implementation is extensive testing. All previous versions did not test edge cases of config changes that will affect storage or forward fees. This test suite became the foundation for all future Jetton versions.

<Callout type="caution">
On TON, multiple jettons can share the same name — a counterfeit jetton may look identical to the real USDT but have no value. Verify legitimacy by confirming [USDT's jetton master address](https://tonscan.org/jetton/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs).
On TON, multiple jettons can share the same name — a counterfeit jetton may look identical to the real USDT but have no value. Verify legitimacy by confirming [USDT's jetton master address](https://actonscan.com/address/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs?network=mainnet).

See important [recommendations when processing jettons](/applications/payments/jettons#security-considerations).
</Callout>
Expand Down
6 changes: 3 additions & 3 deletions content/contracts/standard/tokens/jettons/create.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Jettons (Fungible Tokens, FTs) serve as TON's counterpart to Ethereum's ERC-20 t

Unlike ERC-20 tokens, jettons use the [contract sharding](/contracts/techniques/contract-sharding) approach and are split into two contracts: a master (minter) contract and a wallet contract. The jetton minter stores key jetton data, such as the owner's address and total supply, while provisioning jetton wallets for each TON wallet holder. Deploying a new jetton means deploying the jetton minter contract.

For example, USDT on TON is implemented as a jetton, and its minter contract address is [`EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs`](https://tonscan.org/jetton/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs).
For example, USDT on TON is implemented as a jetton, and its minter contract address is [`EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs`](https://actonscan.com/address/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs?network=mainnet).

This guide creates a jetton project from the Acton `jetton` template, edits the metadata, deploys the jetton minter, and runs common post-deployment operations.

Expand Down Expand Up @@ -236,7 +236,7 @@ acton run jetton-info --fork-net testnet

The expected output includes total supply, admin address, metadata fields, and the owner (admin) jetton wallet address.

Alternatively, enter the `JETTON_MINTER_ADDRESS` value to any of the [TON explorers](/onboarding/explorers).
Alternatively, enter the `JETTON_MINTER_ADDRESS` value to a [TON explorer](/onboarding/explorers).

#### Mint jettons

Expand Down Expand Up @@ -292,7 +292,7 @@ Use the following script aliases to run optional follow-up actions after the ini
| (dangerous) `jetton-claim-admin` | Claim pending admin status from the new admin wallet. | `JETTON_MINTER_ADDRESS` |
| (dangerous) `jetton-change-metadata` | Update jetton metadata. | `JETTON_MINTER_ADDRESS` and [metadata variables](#3-configure-metadata) |

Once the jetton is deployed to mainnet, its metadata is correct, and its supply is capped, it is good practice to revoke ownership, i.e., transfer the admin rights to the so-called [_burn address_ on mainnet](https://tonscan.org/address/UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ). It is one of the requirements for listing on some popular [DEXes](/foundations/glossary#decentralized-exchange-dex).
Once the jetton is deployed to mainnet, its metadata is correct, and its supply is capped, it is good practice to revoke ownership, i.e., transfer the admin rights to the so-called [_burn address_ (or _zero address_) on mainnet](https://actonscan.com/address/UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ?network=mainnet). It is one of the requirements for listing on some popular [DEXes](/foundations/glossary#decentralized-exchange-dex).

```bash
JETTON_NEW_ADMIN_ADDRESS=UQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJKZ \
Expand Down
16 changes: 5 additions & 11 deletions content/contracts/standard/tokens/jettons/find.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -81,18 +81,12 @@ const jettonWalletAddress = contractAddress(BASECHAIN, jettonWalletStateInit);
console.log(jettonWalletAddress.toString());
```

{/* TODO(an explorer that supports calling get methods):
Additionally, one can use [blockchain explorers](/onboarding/explorers) to call a contract's get methods without writing any code. For example, inspect the [Tether USD (USDT)](https://actonscan.com/address/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs?network=mainnet#get-methods) master (minter) contract page: calling `get_wallet_address()` with the owner's TON wallet address yields the USDT jetton wallet address for that owner.

There are also various web services that allow you to call contract's get methods without writing any code.
For example, let's inspect the [Tether USD](https://tonviewer.com/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs?section=method) master
contract page on Tonviewer. Inserting the owner's address in any format and executing the get method, you obtain the Jetton wallet address.

<Image
<Image
src="/images/methods.png"
darkSrc="/images/methods.png"
alt="Tether USDT master contract"
/>

*/}
alt="Tether USDT master contract get-methods list"
/>

Finally, you can use [API v3 endpoints](/api/v3/overview#endpoints).
Finally, one can use [API v3 endpoints](/api/v3/overview#endpoints).
50 changes: 25 additions & 25 deletions content/contracts/standard/tokens/jettons/supply-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "How to get jetton supply data"
sidebarTitle: "Get jetton supply data"
---

To retrieve specific Jetton data, use the Jetton master contract's `get_jetton_data()` method.
To retrieve jetton-specific data, use the jetton master contract's `get_jetton_data()` method.

This method returns the following data:

Expand All @@ -15,45 +15,45 @@ This method returns the following data:
| `jetton_content` | `Cell` | data formatted according to [TEP-64](https://github.com/ton-blockchain/TEPs/blob/master/text/0064-token-data-standard.md) |
| `jetton_wallet_code` | `Cell` | a code of the corresponding Jetton wallet |

You can call the `get_jetton_data()` method from your favorite IDE:
Call the `get_jetton_data()` method from TypeScript by using an API wrapper in `@ton/ton`:

```javascript
import { TonClient, Address } from "@ton/ton"
```ts
import { TonClient, Address } from "@ton/ton";

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

const JettonMasterAddress = Address
});
const JettonMasterAddress = Address
.parse('0:b113a994b5024a16719f69139328eb759596c38a25f59028b146fecdc3621dfe');

const data = await client.runMethod(JettonMasterAddress,
'get_jetton_data');

const Stack = data.stack;
const data = await client.runMethod(JettonMasterAddress, 'get_jetton_data');
const Stack = data.stack;

console.log(Stack.readNumber()); // Total supply
// Total supply
console.log(Stack.readNumber());

console.log(Stack.readNumber()); // mintable
// Mintable flag
console.log(Stack.readNumber());

console.log(Stack.readAddress().toString()); // Admin address
// Admin address
console.log(Stack.readAddress().toString());

console.log(Stack.readCell()); // jetton_content
// jetton_content
console.log(Stack.readCell());

console.log(Stack.readCell()) // jetton_wallet_code
// jetton_wallet_code
console.log(Stack.readCell());
}

void main();
```

{/* TODO(an explorer that supports calling get methods):

Or call it through an [explorer](https://tonviewer.com/EQDmVdCZ2SALvyfCDVlPLr0hoPhUxgjNFtTAxemz9V_C5wbN?section=method):
Or [call it](https://actonscan.com/address/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs?network=mainnet#get-methods) through a [blockchain explorer](/onboarding/explorers):

<Image
src="/images/tonviewer/jetton-data.png"
darkSrc="/images/tonviewer/jetton-data-dark.png"
/> */}
<Image
src="/images/actonscan/usdt-get-jetton-data.png"
darkSrc="/images/actonscan/usdt-get-jetton-data.png"
/>

Finally, you can get this information using the [API](/api/overview).
Finally, one can obtain this information by directly using the [APIs](/api/overview).
39 changes: 18 additions & 21 deletions content/contracts/standard/tokens/jettons/wallet-data.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: "How to get jetton wallet data"
sidebarTitle: "Get jetton wallet data"
---

To retrieve the Jetton wallet's account jetton amount, owner identification information, and other details related to a specific Jetton wallet contract, use the `get_wallet_data()` [get method](/foundations/messages/overview) within the Jetton wallet contract.
To retrieve the jetton wallet's account jetton amount, owner identification information, and other details related to a specific Jetton wallet contract, use the `get_wallet_data()` [get method](/foundations/messages/overview) on the jetton wallet contract.

This method returns the following data:

Expand All @@ -14,7 +14,7 @@ This method returns the following data:
| `jetton_master_address` | `MsgAddress` | the address of the Jetton master contract |
| `jetton_wallet_code` | `Cell` | a code of the Jetton wallet |

You can call the `get_wallet_data()` method from your favorite IDE:
Call the `get_wallet_data()` method from TypeScript by using an API wrapper in `@ton/ton`:

```javascript
import { Address, TonClient } from "@ton/ton";
Expand All @@ -23,36 +23,33 @@ async function main() {
const client = new TonClient({
endpoint: "https://toncenter.com/api/v2/jsonRPC",
});

const JettonwalletAddress = Address.parse(
"EQDmVdCZ2SALvyfCDVlPLr0hoPhUxgjNFtTAxemz9V_C5wbN",
);
const JettonwalletAddress = Address
.parse("EQDmVdCZ2SALvyfCDVlPLr0hoPhUxgjNFtTAxemz9V_C5wbN");

const data = await client.runMethod(JettonwalletAddress, "get_wallet_data");

const Stack = data.stack;

console.log("Balance in nano tokens: ", Stack.readNumber());
// Balance
console.log("Balance in nano tokens: ", Stack.readNumber());

// wallet address
console.log("Owner: ", Stack.readAddress().toString({ bounceable: false }));
// TON wallet's address of the owner of this jetton wallet
console.log("Owner: ", Stack.readAddress().toString({ bounceable: false }));

console.log("Jetton Master address: ", Stack.readAddress().toString());
// Jetton master (minter) address
console.log("Jetton master address: ", Stack.readAddress().toString());

// default BoC encoding in viewers
console.log("Jetton Wallet code: ", Stack.readCell().toBoc().toString('hex'));
// jetton_wallet_code
console.log("Jetton wallet code: ", Stack.readCell().toBoc().toString('hex'));
}

void main();
```

{/* TODO(an explorer that supports calling get methods):

Or call it through an [explorer](https://tonviewer.com/EQDmVdCZ2SALvyfCDVlPLr0hoPhUxgjNFtTAxemz9V_C5wbN?section=method):
Or [call it](https://actonscan.com/address/EQDmVdCZ2SALvyfCDVlPLr0hoPhUxgjNFtTAxemz9V_C5wbN?network=mainnet#get-methods) through a [blockchain explorer](/onboarding/explorers):

<Image
src="/images/tonviewer/get-wallet-data.png"
darkSrc="/images/tonviewer/get-wallet-data-dark.png"
/> */}
<Image
src="/images/actonscan/usdt-get-wallet-data.png"
darkSrc="/images/actonscan/usdt-get-wallet-data.png"
/>

Finally, you can get this information using the [API](https://toncenter.com/api/v3/jetton/wallets).
Finally, one can obtain this information by directly using the [APIs](/api/overview).
6 changes: 3 additions & 3 deletions content/contracts/standard/tokens/metadata.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -217,11 +217,11 @@ Read known attributes such as `uri`, `name`, `image`, `description`, and `image_

Examples:

On-chain NFT: [`EQBq5z4N_GeJyBdvNh4tPjMpSkA08p8vWyiAX6LNbr3aLjI0`](https://tonscan.org/EQBq5z4N_GeJyBdvNh4tPjMpSkA08p8vWyiAX6LNbr3aLjI0)
On-chain NFT: [`EQBq5z4N_GeJyBdvNh4tPjMpSkA08p8vWyiAX6LNbr3aLjI0`](https://actonscan.com/address/EQBq5z4N_GeJyBdvNh4tPjMpSkA08p8vWyiAX6LNbr3aLjI0?network=mainnet)

Semi-chain NFT: [`EQB2NJFK0H5OxJTgyQbej0fy5zuicZAXk2vFZEDrqbQ_n5YW`](https://tonscan.org/EQB2NJFK0H5OxJTgyQbej0fy5zuicZAXk2vFZEDrqbQ_n5YW)
Semi-chain NFT: [`EQB2NJFK0H5OxJTgyQbej0fy5zuicZAXk2vFZEDrqbQ_n5YW`](https://actonscan.com/address/EQB2NJFK0H5OxJTgyQbej0fy5zuicZAXk2vFZEDrqbQ_n5YW?network=mainnet)

On-chain jetton master: [`EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs`](https://tonscan.org/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs)
On-chain jetton master: [`EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs`](https://actonscan.com/address/EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs?network=mainnet)

## How to parse

Expand Down
11 changes: 5 additions & 6 deletions content/contracts/standard/vesting.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -395,11 +395,10 @@ To verify:

## See also

- [Vesting contract source code](https://github.com/ton-blockchain/vesting-contract)
- [Vesting contract technical documentation](https://github.com/ton-blockchain/vesting-contract/blob/main/README.md)
- [Vesting contract instruction (old and low level)](https://github.com/ton-blockchain/vesting-contract/blob/main/instruction.md)
single-nominator-pool#run-a-single-nominator-pool-with-a-vesting-contract)
- [Standard wallets documentation](/contracts/standard/wallets/history)
- [Staking organization scenarios on TON](/nodes/staking/overview)
- [Vesting contract source code, GitHub](https://github.com/ton-blockchain/vesting-contract)
- [Vesting contract technical documentation, GitHub](https://github.com/ton-blockchain/vesting-contract/blob/main/README.md)
- [Vesting contract instruction (old and low level), GitHub](https://github.com/ton-blockchain/vesting-contract/blob/main/instruction.md)
- [History of standard wallets](/contracts/standard/wallets/history)
- [Staking scenarios on TON](/nodes/staking/overview)

[block explorer]: /onboarding/explorers
Loading
Loading