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
Unanswered
Can you explain the purpose of the "recv_internal" function in FunC? And what is the connection between FunC and Fift?


In TON, smart contracts are executed inside TVM (TON Virtual Machine). TVM expects instructions in a specific binary format, available here:

https://ton.org/docs/learn/tvm-instructions/instructions

These binary instructions are like assembly code, and writing them by hand is very hard. At the beginning Fift was created as a scripting language to make it easier to write smart contract codes. It has a special syntax and working with it is easier than TVM instructions, but it's still very low level and hard to use, but it's doable.

After a while, FunC was developed which is like the C language. A lot easier than assembly and very powerful, yet still considered a low level language.

There are higher level languages being developed like Tact (https://tact-lang.org/) or Rift (https://rift.skyring.io/), which will ultimately produce those TVM instructions.

You can interact with smart contracts by sending them messages encoded in the binary format expected by those smart contracts.

recv_internal is the main entry function in FunC, which expects to receive internal messages generated inside the blockchain. It expects four arguments, as TVM puts those 4 args on the stack. In FunC, you may omit any of the previous args if you are not using them.

1
1
Posted one year ago
77 Views
0 Answers
one year ago
one year ago