Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Profile picture
Administrator Moderator
1 Question, 84 Answers
  Active since 27 January 2023
  Last activity 6 months ago


384 + 10 this December 3 53

Badges 5

Editor Freshman Enthusiast Supporter Newbie
0 Votes
1 Answers
0 Votes 1 Answers 2K Views
One of the primary differentiators of TON is the fact that it is an asynchronous block chain. This introduces concepts such as lamport time and crazy orderin...
6 months ago
2 How do you send jettons programmatically?

The following is from a test file in tonweb. Here's the entire file. https://github.com/toncenter/tonweb/blob/master/src/test-jetton.js

It should be enough for your needs!

    const transfer = async () => {
        const seqno = (await wallet.methods.seqno().call()) || 0;

            await wallet.methods.transfer({
                secretKey: keyPair.secretKey,
                toAddress: JETTON_WALLET_ADDRESS,
9 months ago
2 Can't deploy a FunC smart contract: failing with exit code 34.

Two issues:

  1. You should read address from slice via load_msg_addr, not load_bits
  2. Store address to builder via Addr, not addr

addr, is an alias for 256uint. Meanwhile full address serialization with Addr also includes address format tag, workchain, 256bit part and some additional fields.

9 months ago
1 How much logic can be feasibly put on-chain?

It is definitely feasible to implement the logic of your game as a smart contact and then it’s guaranteed to be secure for all users.

Each transaction to change the game state will cost a few cents as gas. If this cost is an issue (for example your game has tens of thousands of transactions per player), then you can use payment channels to reduce this cost.

One of the interesting things mentioned is randomness, which is difficult in the Web3 space. A verifiable randomness function (VRF)...

9 months ago
1 I've heard about "Ten Lessons" for learning FunC, where can I find them?

I haven't heard of 10 video lessons, but I do know of the Ten Lessons GitHub repository for FunC. They have since then grown to 19 lessons.

9 months ago
1 Is it possible to delete an NFT?

It really depends on the smart contract code. The standard for NFTs (TEP-62) does not include deletion, however.


You could always just transfer it to the null address, or if that doesn't work, some other random address.

9 months ago
1 What would be a good basic pet project to learn FunC with?

There are plenty of projects out there to try. Here are 3 suggestions:

  • Rock paper scissors game that require deposits to play (think about how to keep data private in between moves)
  • Try deploying a custom Jetton (token)
  • Try making a basic swap/IDO contract
9 months ago
1 Is it possible to manage files on a server with a TON smart contract?

The answer is likely "no". Smart contracts are for on-chain logic, and the server is off-chain. The actions taking place on a smart contract will not be determined solely by the TVM.

You could have a smart contract act as an interface for the server to listen to: for example, account A communicates with smart contract B, and sends an event to delete a file of ID C on server D. But there is nothing that guarantees that file C exists, or that the server D's logic will listen to B.

9 months ago
1 What specifies the price of a jetton?

When added to a liquidity pool protocol, a jetton is defined by supply and demand. If you are looking for a way to sell a jetton at a single fixed price, then you're likely looking for an ICO smart contract:


Where the amount of TON sent with the transaction is multiplied by some value of jetton to mint to the sender.

int jetton_amount = buy_amount; ;; rate 1 jetton = 1 toncoin; multiply...
9 months ago
1 How do you generate the public address of a TON wallet from its mnemonic?

This post has JS code that does it as well as explanations how it all works: https://ton-community.github.io/tutorials/01-wallet/

You should be able to get the wallet address like so:

import { mnemonicToWalletKey } from "ton-crypto";
import { WalletContractV4 } from "ton";

async function main() {
  // open wallet v4 (notice the correct wallet version here)
  const mnemonic = "unfold sugar water ..."; // your 24 secret words (replace ... with the rest of the words)
9 months ago
1 Can anyone create a Jetton?

Yes, anyone can deploy a Jetton. Jettons are just smart contracts, similar to ERC-20s on Ethereum. The network wouldn't be very decentralized if that wasn't the case!

Technically, there is no "official" deployment of ETH because anyone can create their own bridge and their own ETH token. So it's up to you to do the research to figure out which Jetton smart contract is the best to use as your ETH representation. That being said, ton.org currently uses the [TON Bridge](https://bridge.ton.org...

7 months ago
1 Are there any tools to make a DAO on TON?

As far as I am aware, there are no complete user-friendly interfaces to create a DAO on TON. That being said, there are smart contract and repositories examples for you to potentially work off of.

Probably the closest to what you want:

Fift implementation of a multisig wallet:

9 months ago
1 Is there a tutorial anywhere on creating an NFT on TON?

This is a good suggestion for a dedicated step-by-step tutorial. I imagine that the TON community will focus on this in the coming months.

Here are some resources to help with creating NFTs:

  • TON-NFT-deployer: created by TON Diamonds, this is a complete project that can help the technically minded developer deploy an NFT
  • Disintar: an NFT marketplace for TON. You might want to look into here if you want...
9 months ago
1 It there a way to create a "pretty" wallet address?

It is possible to do this, but you would have to generate thousands of different private and public key pairs. I have yet to see one configured specifically for TON, though.

Essentially, you would generate thousands of random mnemonics and filter for ones that are like the parameters that you want.

You can generate key pairs with TonWeb:

        const nacl = TonWeb.utils.nacl; // use nacl library for key pairs
        const tonweb = new TonWeb();

        const key...
8 months ago
1 How can I use *.ton as a domain?

The documentation surrounding TON DNS is here:

Its official site is here:

I must stress that this is not the same DNS as what you would find when registering a .com domain address on a typical domain registrar. There is currently no ".ton" nameserver that can be connected to the rest of the world wide web. Instead, these are essentially nicknames for addresses. This is helpful because addresses are hard to memorize, bu...

9 months ago
1 How do you develop a lottery contract?

A source of randomness is required, and there are plenty of ways to do it: https://docs.ton.org/ko/develop/smart-contracts/guidelines/random-number-generation

A basic version of a lottery script exists here, which uses the randomize_lt function:

6 months ago
1 What's the best way to debug unexpected test failures in FunC?

You're looking for the dump_stack() function.


It dumps the last 255 values in the stack and shows the total stack depth.

() dump_stack() impure asm "DUMPSTK";

There's also the ~dump and ~strdump built-ins.


9 months ago
1 How can you use the TON payment via a Telegram bot?

There is a Telegram payments bot, but it has yet to integrate TON:

There are some community example projects of TON bots that accept TON payments:

But if you want something better, you'll have to develop one yourself. You can try starting here:

8 months ago
1 How do you create a new TON wallet programmatically?

In JavaScript, you can use the ton package. I have adapted an example from a community-led TON tutorial. Please use at your own risk.

What it does is:

  1. Generate multiple mnemonics
  2. Find the addresses of the generated mnemonics
  3. Fund the addresses of these mnemonics with a pre-funded wallet
  4. Send a transaction out of these mnemonnics to automatically deploy the contract
10 months ago
1 Is there a way to make a local network like Ganache for TON?

The best solution is likely the TON Contract Executor. It allows you to run the TON Virtual Machine locally, and thus execute smart contracts. You should be able to debug and fully test contracts before launching them to the network. I don't believe it forks networks like HardHat can, however.

There is also MyLocalTON which is a community led solution that runs not only the virtual machine b...

9 months ago
1 How to check what an account balance was at a specific unixtime?

Unfortunately, the TON http-api does not allow you to specify a block when using getAddressBalance.


I suppose one way you could go about it is reconstructing the balance over time. Get all of the transactions until the block you're looking at is surpased:


You can try this with the getTransactions endpoint, just make sure t...

8 months ago
1 Is there a ternary operator in FunC?

There is such an operator; the documentation calls ita "conditional operator".


This is the example provided:

;; <condition> ? <consequence> : <alternative>
x > 0 ? x * fac(x - 1) : 1;
10 months ago
1 Is there a privacy layer for dApps on TON that obscures both the dApps and the code for it?

There is no such layer or toolkit. You would have to build such primitives yourself using the TON virtual machine and potentially FunC.

9 months ago
1 How do I store a string in FunC?

Slices are the way to store strings. At the end of the day, strings are just a bunch of bytes that are interpreted in an ASCII format. You'll have to interpret strings as such when working with them in the smart contract.


You can define strings with quotation marks like in other languages, but they are stored in such a way that they become a slice of bytes.

9 months ago
0 What is the utility of internal non-bounceable messages?

Non-bounceable messages will allow coins to stay on the contract's side. This is used on a wallet's deploy, when passing state initialization.

7 months ago
0 Does TON have a Remix equivalent?

Unfortunately, there currently isn't something like the Remix IDE for TON. The best alternative would likely to load up a generic online IDE to play with smart contracts based on Glitch.

As always, I would recommend simply developing smart contracts on a local machine.

9 months ago
0 Where do I get resources to understand TON's architecture as a Solidity developer?

As a Solidity developer, one of the best articles for you to understand the differences between the EVM and the TVM is:


This is a very good introduction. Afterwards, the whitepaper is where you will have to go along with the developer documentation.


7 months ago
0 Is there a developer console or any API keys that I need to create a wallet for TON?

TON is a decentralized blockchain, and rarely is there a developer console for blockchains like there is in Web2 (private blockchains might have these sorts of features). Some blockchains might have third party deployment tools for smart contracts that act as infrastructure, but that's not necessary for creating a wallet. What you're likely looking for is a way to query information off of the blockchain and to send transactions, which will require an http-api endpoint. Some of these endpoints...

9 months ago
0 Can I use pytonlib with an AMD CPU on Linux?

You likely can. Just use:

pip install pytonlib

If that doesn't work, you can try a community member's python version of tonsdk.

9 months ago
0 Are there any libraries that implement the TON standards (TIPs) similar to OpenZeppelin?

Standard token contracts can be found on the main GitHub profile of the TON blockchain. You can generally look for FunC smart contracts on the TON blockchain and TON foundation profiles.

There are also some snippets that users provide, such as the FunC snippets provided by TonoxDeFi on GitHub.

9 months ago
Show more results compactanswers
0 Votes
1 Answers
0 Votes 1 Answers 8K Views
How do I send jettons with TonWeb? Is there any other way to do it programmatically? --- > This question was imported from Telegram Chat: https://t.me/tondev...
9 months ago