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
Daniil Sedov
  Russia
Administrator Moderator
1 Question, 16 Answers
  Active since 28 September 2022
  Last activity 11 months ago

👋

github.com/Gusarich

Reputation

219 + 30 this February 3 5

Badges 6

Editor Eureka! Newbie 2 × Reporter Enthusiast Nice Profile
2 Votes
1 Answers
19K Views
2 Votes 1 Answers 19K Views
I'm writing a simple DApp on TON blockchain and using the tonweb JavaScript library to interact with it. I need to first send a transaction, and then after i...
4 TON Sites

There is an easy-to-use docker container for TON Proxy:
https://github.com/kdimentionaltree/ton-proxy-docker

You can run TON Proxy on your server in a few simple steps below if you already have some website running on port 80.

  1. git clone https://github.com/kdimentionaltree/ton-proxy-docker.git
  2. cd ton-proxy-docker
  3. docker-compose build
  4. ./init.sh
  5. docker-compose up -d

Also note that on 4th step you will get some output in terminal that is important. You will se...

one year ago
3 How can I wait for transaction to confirm using tonweb?

You can save transaction hash before sending it and then query Toncenter API method getTransactionByInMessageHash to check if transaction with such hash was confirmed or not

Example:

// Sleep function:
const sleep = ms => new Promise(r => setTimeout(r, ms))

// `msg` is a Cell containing your external message
// Convert message Cell to BOC String
const boc = await ...
one year ago
2 Can any smart contract be an "NFT owner"?

Any blockchain account can hold NFT items. The NFT item contract just stores the address of its owner in storage, and there are no restrictions on the owner contract.
NFT item source code:

11 months ago
2 Does FunC allow to call functions recursively?

Yes, you can make recursive calls in FunC. And it is basically the same as in other programming languages.
Simple example of recursive pow function:

int pow (int num, int base) {
    if (base == 0) {
		    return 1;
		}
	  if (base % 2 == 1) {
        return pow(num, base - 1) * num;
		}
    int sqr = pow(num, base / 2);
    return sqr * sqr;
}
12 months ago
2 Bitwise operation does not work as expected

That hapepns because of the operation priorities. It executes | at first, and then ==. Add brackets to change it.

7 months ago
1 Build adnl-http-proxy on windows fails

You've made a mistake in the target name. It's RLDP and not ADNL proxy.

Correct command:
cmake --build . --target rldp-http-proxy

one year ago
1 What is the best way to store the "who follows who" data with TON smart contracts?

There may be several ways to implement such logic.
If each subscriber has his own smart contact, you can simply save a list of his subscriptions in the data of this contract. But note that in this case, as the number of subscriptions becomes bigger, all operations with them will become quite expensive.

11 months ago
1 TONCLI Extension on VSCode

There is an extension for FunC and Fift languages that are used in TON.

toncli is just a tool used to develop on TON, you can run it in any terminal (including the VS Code integrated one).

one year ago
1 Metamask Settings

Metamask currently can only work with EVM chains (ethereum, bsc, polygon...). TON is not on EVM, so you can't use it in Metamask.

one year ago
0 Getting an error "PROC:<{:procedure already defined" while running `toncli run_tests` command

You have declared some function which is already declared in toncli libraries. List of these libraries is available in their sources on Github:

Usually it happens when you redeclare some function from stdlib.func or math.func

12 months ago
0 How can the PUSHINT OP code cause a stack underflow error?

PUSHINT is TVM-asm instruction and required for assembling the smart contract. Analogue from Fift is just writing number 1 or any other that you want.

Using TVM opcodes outside of smart contract is not possible.

12 months ago
0 Is there a square root function in FunC?

There is no built-in sqrt() function, but you can use the one from open-contracts repository:

There is also a list of community libraries for FunC in documentation:

11 months ago
0 Is it feasible to sort 50 000 objects on-chain?

Performing complex calculations on-chain can be expensive, so if there is
such an opportunity, it is better to move these calculations to the off-chain backend. Ideally, if complex calculations are performed off-chain, in a smart contract it is enough only to check the correctness of these calculations.

11 months ago
0 toncli installation error

Toncli asks you to enter the path to executables.

one year ago
0 For Sandbox test libraries.....

This is the network config, which contains several parameters (gas price, for example).
In most cases you will be fine with the default, because it's the same as the real one.

Read more about config in documentation:

12 months ago
0 Could TON appear in Metamask?

No. Metamask only works with EVM chains (like Ethereum or Polygon). And TON has completely different architecture and virtual machine called TVM.

11 months ago