Frequently Asked Questions
This section covers the most popular questions about TON Blockchain.
Overview
Could you share a brief overview of TON?
Similarities and differences versus EVM chains?
Does TON have a test environment?
Block
What is the RPC method used to retrieve block information?
Blocks produced by Validators. Existing blocks available via Liteservers. Liteservers accessible via Liteclients. On top of Liteclient built 3rd-party tools like wallets, explorers, dapps, etc.
- Liteclient core: ton-blockchain/tonlib
3rd-party high-level block explorers:
Block time
2-5s
Read more at ton.org/analysis.
Time-to-finality
Under 6 sec.
Read more at ton.org/analysis.
Average block size
max block size param 29
max_block_bytes:2097152
Find more actual params in Network Configs.
What is the schema of a block?
- Block layout, TON Blockchain, p.96
Transactions
RPC method to get transactions data
Is it async or synchronous? If async, any documentation on how it works?
TON Blockchain is async:
- sender prepare tx body and broadcast it via liteclient (or higher-level tool)
- liteclient return status of broadcast, not tx result
- sender check desired result
Example for Wallet contract transfer (high-level):
Example for Wallet contract transfer (low-level):
How do we determine if a transaction is truly successful? Is querying the transaction level status enough?
Short answer: check receiver's account state until it changed, see examples:
- Go: Wallet example
- Python: Storefront bot with payments in TON
- JavaScript: Bot for sales of dumplings
What is the schema of a transaction?
Fundamentals:
Example from explorers (transfer tx):
- https://tonscan.org/tx/FiR7bn5LuBO0FYjx7Fst9kuwnXs128NVFA9YYniKG-A=
- https://ton.cx/tx/33513508000001:FiR7bn5LuBO0FYjx7Fst9kuwnXs128NVFA9YYniKG+A=:EQBfAN7LfaUYgXZNw5Wc7GBgkEX2yhuJ5ka95J1JJwXXf4a8
Is batching transactions possible?
Yes, this is possible in two ways:
- utilization of async nature of TON, i.e. sending independed transactions to the network
- using smartcontract which receive a task and then execute it as a batch
Example of using batch-featured contract (high-load wallet):
Standards
What accuracy of currencies is available for TON?
9 digits
Number of decimal places supported by mainnet : 9 digits.
Is there a standard for tokens and NFTs? i.e. a standard way to parse mint, burn, transfer fungible and non-fungible tokens from a transaction
NFTs:
Jettons (tokens):
Other standards:
Are there examples of parsing these events
Everything in TON is a boc-message, so using NFT isn't a special event, it's a regular message from/to contract as a regular let's say wallet.
However, some indexed API allows you see all messages from/to contract, so you can filter them by your needs:
Please also share how we can get the schema for these events.
https://ton.org/docs/tblkch.pdf#page=53&zoom=100,148,172 p.53
Account Structure
What is the address format?
Is it possible to have a named account similar to ENS
Yes, using TON DNS:
How to distinguish between a normal account and a smart contract?
How to tell if the address is a token address?
For a Jettons contract must implement standard's interface and return data on get_wallet_data() or get_jetton_data() methods.
Are there any special accounts (e.g. accounts owned by the network) that have different rules or methods from the rest?
There is a special blockchain inside a TON called masterchain. It consists of network-wide contracts with network configuration, validator-related contracts, etc:
Read more about masterchain, workchains and shardchains in TON Blockchain overview article: Blockchain of Blockchains.
Good example is smart governance contract, which is a part of masterchain:
Smart Contracts
How do we detect contract deployment events?
Everything in TON is a smart contract.
Account address generated from private key, contract code, and it's initial state.
If any component changed - address changed accordingly. Smart contract code itself can be sent to the network later.
To protect sending messages to non-existing contracts TON use "bounce" feature. Read more in these articles:
- Deploying wallet via TonLib
- Paying for processing queries and sending responses
- Tips & Tricks: bounce TON back
Is it possible to re-deploy code to an existing address or do we have to deploy it as a new contract?
Yes, this is possible. If smartcontract implements method ... it's code can be updated and address will remain same.
It's possible to deploy many contracts with different addresses with same private key.
Are smart contract addresses case sensitive?
Yes, smart contract addresses are case sensitive because they are generated using the base64 algorithm. You can learn more about smart contract addresses here.
RPC
Provide a list of recommended node providers for data extraction
API types:
- Read more about different API Types (Indexed, HTTP, and ADNL)
Node providers partners:
TON directory with projects from TON Community: