Configuration reference
Every environment variable, token field, endpoint and timing constant the TON integration reads — and the ones it deliberately does not.
Everything on this page is read by the running platform. Where a value has a default, the default is what happens when the key is absent — TON has no "required" environment variable that halts anything, which is precisely why a misconfigured install runs happily against the wrong network.
Environment variables
None of these are in .env.example. Add them by hand to the project root
.env, and restart the backend afterwards — the TON service captures its
endpoint and key once, at construction.
Two shared Ecosystem keys change TON's behaviour as well:
Keys that do not exist for TON
Operators coming from the EVM chains reach for these. None of them are read:
| Key you might expect | Reality |
|---|---|
TON_MAINNET_RPC_WSS |
There is no WebSocket path. Deposit detection is HTTP polling only. |
TON_EXPLORER_API_KEY |
TON has no explorer integration. The admin overview reports TON as having no explorer API. |
ETHERSCAN_API_KEY |
EVM only. It has no effect on TON. |
TON_NODE / TON_NODE_HOST |
No provider-abstraction layer. Point TON_MAINNET_RPC at your own node instead. |
Transaction history for a TON address comes from the chain service reading Toncenter directly, not from the generic explorer fetcher the EVM chains use.
The Toncoin token row
The seeder creates a single TON entry with status: false. Enable it and check
the fields below.
| Field | Seeded value | What to do |
|---|---|---|
chain |
TON |
Leave it |
currency |
TON |
Leave it |
contractType |
NATIVE |
Leave it — see the warning below |
contract |
0x0000000 |
The native sentinel. Leave it |
decimals |
18 |
Wrong for TON, which is 9. Harmless for crediting, but it is the fallback for precision |
precision |
unset | Set it to 9. It caps decimal places on withdrawals and rounds the debit |
network |
mainnet |
Leave it, even on testnet — see below |
fee |
unset | Set percentage and min; the platform charges max(amount × percentage, min) in TON |
limits |
unset | Optional per-transaction minimum and maximum |
There is no jetton support in the deposit or withdrawal path. A TON token row
with PERMIT or NO_PERMIT falls through to the EVM address derivation and
issues an Ethereum-style 0x… address as a TON deposit address. Funds sent
there are unrecoverable.
Why network: mainnet is correct on testnet. The token eligibility rule
compares a token's network column against {CHAIN}_NETWORK and hides rows
that disagree — but TON is on the network-agnostic list, alongside Monero,
Solana, Tron and the UTXO chains, so the comparison is skipped entirely.
Editing the row to testnet changes nothing; leaving it as mainnet breaks
nothing.
Endpoints
Admin, all under Ecosystem's permission scheme:
User-facing, authenticated but with no admin permission:
Timing and limits
Every number here is compiled in. None of them is configurable except where an environment variable is named above.
| Behaviour | Value |
|---|---|
| Deposit poll interval, session monitor | 60 seconds |
| Transactions fetched per poll | 10 most recent |
| Poll back-off on consecutive errors | Interval doubles, capped at 16× (16 minutes) |
| Consecutive errors before the monitor stops | 10 |
| Processed-hash memory, for de-duplication | 30 minutes |
| Background scan rate for TON | 0.5 per second |
| Background scan working-set lifetime | 72 hours from the last deposit-page visit |
| Withdrawal confirmation attempts | 10, ten seconds apart (about 100 seconds) |
| Transactions scanned per confirmation attempt | 5 most recent |
| Cooldown between withdrawals on the same chain | 5 seconds |
Stale PROCESSING threshold before manual review |
5 minutes |
| Internal RPC call spacing in the service queue | 1 second |
| Licence result cache | 5 minutes |
The service also runs an internal one-call-per-second queue for wallet operations, which is a second reason TON throughput is bounded regardless of how fast your endpoint is.
Chain facts the platform hard-codes
| Property | Value |
|---|---|
| Symbol and currency | TON |
| Decimals | 9 (amounts are converted from nanotons) |
| Precision used for balance rounding | 9 |
| Explorer shown in the chain registry | https://tonscan.io |
| Wallet contract version created | v3R1 |
| Deposit address form | User-friendly, non-bounceable (UQ…) |
| Custodial contracts | Not supported — TON is on the exclusion list |
| Confirmation depth required for deposits | None; credited on detection |
What requires a restart
| Change | Restart needed |
|---|---|
TON_NETWORK, either RPC URL, either API key |
Yes — the service reads them once |
| Enabling the chain row | No — the active state is re-checked while the chain is inactive |
| Disabling the chain row | Yes, both processes — the flag is never re-read once the service is active, so deposits, balances and withdrawal signing keep running |
| Activating the licence | No, but allow up to five minutes for the cache |
| Enabling the token row, editing fee or precision | No |
| Creating the master wallet | No |