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
Tal Kol
Administrator Moderator
8 Questions, 12 Answers
  Active since 27 September 2022
  Last activity one year ago

Reputation

359 + 25 this December 0 1

Badges 3

Editor Enthusiast Newbie
5 Votes
2 Answers
23K Views
5 Votes 2 Answers 23K Views
There's a lot of setup for a project to implement a smart contract in FunC for TON blockchain (ton.org). Is there a good practice setup project that provides...
2 years ago
1 Votes
1 Answers
23K Views
1 Votes 1 Answers 23K Views
I want to use TON blockchain (ton.org) to receive payments. What does that involve? What components do I need to implement?
2 Votes
1 Answers
24K Views
2 Votes 1 Answers 24K Views
There's an existing contract that was deployed by somebody else, for example a token, that has getter methods like get_balance(address) or get_total_supply()...
2 years ago
1 Votes
1 Answers
23K Views
1 Votes 1 Answers 23K Views
In order to compile smart contracts in the FunC language I need the executables named func and fift. They are used to compile my FunC source code to TVM byte...
2 Votes
1 Answers
23K Views
2 Votes 1 Answers 23K Views
According to TON whitepaper, the TON blockchain network supports multiple chains. What's the differences between these and which workchain should I use when ...
2 Votes
2 Answers
24K Views
2 Votes 2 Answers 24K Views
In TON blockchain, when implementing my dapp smart contract in FunC, my contract can accept both internal messages handled by recv_internal() and external me...
7 Votes
2 Answers
25K Views
7 Votes 2 Answers 25K Views
I'm developing a smart contract for TON blockchain in FunC and I'm trying to find a bug in my code. I'm trying to debug the issue and will appreciate somethi...
2 years ago
2 Votes
2 Answers
11K Views
2 Votes 2 Answers 11K Views
I found online mentions of projects using Solidity to build for TON instead of using FunC and Fift. Is this really possible to do? I already know Solidity an...
0 What is the best block explorer for the TON network?

Unlike Ethereum where https://etherscan.io is the only dominant explorer, TON is a more decentralized ecosystem with different explorers that excel in different things. The full list is on https://ton.app/explorers

Some interesting ones:

  • https://tonscan.org - Great for simple things, polished UI. Excellent for users, less for developers.

  • https://tonwhales.com/explorer - Good for developers since it shows much more low level information if you need to debug transactions that faile...

one year ago
5 How do I get an RPC endpoint for TON?

TLDR

For most cases https://www.orbs.com/ton-access is a good solution for getting unthrottled and decentralized RPC access

It also has convenient JS API:

import { getHttpEndpoint } from "@orbs-network/ton-access";
import { TonClient } from "ton";

// get the decentralized RPC endpoint
const endpoint = await getHttpEndpoint(); 

// initialize ton library
const client = new TonClient({ endpoint });

Longer answer

It depends on your use-case. There are thr...

one year ago
1 How can I use TON coin with Ledger hardware wallet?

Unfortunately, since the TON ecosystem is still early, there's no official support for TON in the leading hardware wallets (as of October 2022). But hopefully official support is coming soon.

Unofficial support for Ledger is available from two places:

The downside of this approach is that support is not official b...

2 years ago
4 What are the various ways of holding and storing Ton coin securely - particularly large amounts and cold storage?

Holding crypto is normally a tradeoff between security and convenience. There is no one right way - so here's a quick overview of various strategies in TON. I'll focus on strategies for holding large amounts (normally by an institution like an exchange or a big whale).

Cold storage / hot storage is a method where you keep a small amount that is used frequently in a hot wallet - a wallet that is convenient but less secure - and the large amount that is used infrequently in a cold wallet - a...

2 years ago
2 Where can I find a good starter project for a smart contract in FunC for TON blockchain?

I created a template repo to fullfil the above requirements:

https://github.com/ton-defi-org/tonstarter-contracts

Simply clone this repo and rename the directory and you can start working. The README has a very thorough explanation how everything works.


There is no one official way to develop smart contracts for TON. Every developer has their own best practices. This setup is definitely opinionated and some developers may not appreciate the choices made. Nevertheless, I stand ...

2 years ago
1 How does TON Payments work? What's the difference between them and Payment Channels?

When discussing payments on TON, there are two methods you should be aware of:

1. Payment Channels

This method is useful when you have many small payments between several parties and gas cost (transaction fee) is an issue. This method will eliminate the blockchain fees and make them constant and independent on the number of payments.

The method works by using a template standard smart contract called PaymentChannel that the two parties deploy an instance of. Then the two parties ...

2 years ago
1 How can one smart contract on TON Blockchain call a method on another smart contract?

It is not possible for one contract on TON to call a method on another smart contract on TON.

The pattern of contracts calling contracts synchronously (within the flow of the same transaction) originates from Solidity and the EVM but this pattern is not applicable to all blockchains. There are several conceptual differences between TON and the EVM - you can read more about them here.

I...

2 years ago
1 Where can I find the "func" and "fift" command-line executables that are required to compile FunC smart contracts?

Option 1 - download pre-compiled TON binaries

You can find pre-compiled binaries for func, fift and lite-client in the repo https://github.com/ton-defi-org/ton-binaries

  1. Download the binaries from the Releases page of this repo - make sure to select the correct version according to the operating system you're using and install the additional dependencies

  2. After download, make sure the downloaded binaries are execu...

2 years ago
3 TON supports multiple workchains - which one should I use in my code?

TLDR

For regular user work, always use workchain 0 - which is the workchain with workchain_id = 0

What are the different chains in TON?

  • One master chain - the special unique workchain with workchain_id = -1

    Mostly used by network validators for running the PoS elections contracts, regular users don't normally send transactions on this chain.

  • Up to 2^32 workchains - today there's only one with workchain_id = 0 but possibly more in the future
    ...

2 years ago
2 What's the difference between internal and external messages in TON smart contracts?

TLDR

When implementing dapps - always use internal messages only.

Never use external messages. You can safely ignore the fact that external messages exist.

Wallets on TON are smart contracts too

Unlike most blockchains, Ethereum included, when a user on TON downloads a wallet app, this wallet app will deploy a wallet smart contract for the user. This wallet smart contract holds the user's TON coin balance.

Every interaction that the user does takes place through this ...

2 years ago
6 How can you debug a TON smart contract in FunC and print logs or dump variables?

The TVM has a special function for dumping variables in debug - ~dump

Run ~dump(variable_name); to print a variable's contents.

Run ~dump(12345); to print the number 12345.

Example:

() recv_internal(int msg_value, cell in_msg, slice in_msg_body) impure {

  ;; let's say I want to print the value of the variable msg_value
  
  ~dump(msg_value);
}

Please note that this command will not run on mai...

2 years ago
4 Can you use Solidity to write contracts for TON blockchain? (ton.org)

TLDR

No. Not at this point.

Is this good idea?

The TON (ton.org) core team is against using Solidity. TON and its TVM are very different from Ethereum and its EVM. For example, you can't make synchronous calls to other contracts, you can only send an asynchronous message. You can read more about the other differences here. Using Solidity would force EVM state of mind on the ...

2 years ago