In TON software development, everything is a cell. Every cell can reference up to 4 other cells, creating a parent-child relationship. What if I have a speci...
Do I get it right that FunC treats int and (int) (a tuple with only one integer in it) as two different types even though they both are really integers? I ha...
one year ago
I've previously seen tilde symbol used for bitwise NOT in other programming languages, so placing ~ before some X means "not X". But it seems in FunC it work...
one year ago
Is there any specific reason why single line comments in FunC start with ;; and not something more common like //? It feels very odd. --- > This question was...
one year ago
Suppose we check for two conditions at the same time: if( (a == b) & (b == c) ). If a is not equal to b, that makes the first condition false. And that means...
one year ago
We have a project written in Solidity. How much effort would it take to move such a project to TON? Does it mean a total rewrite from scratch in FunC, or is ...
Is there a built-in way to exponentiate numbers in FunC? If there isn't and it is up to developer to write a function, probably the community has already wri...
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...
What would be your suggestions on some basic pet projects for studying main concepts of ton? These would be smart contracts to write immidiately after doing ...
Case 1: () recv_internal(int my_balance, int msg_value, cell in_msg_full, slice in_msg_body) impure { slice cs = in_msg_full.begin_parse(); int flags = cs~lo...
one year ago
Suppose there is a web3 blog platform where people follow specific writers. Each follower has its own smart contract. Usually data such as "X follows Y" woul...
one year ago
According to the documentation, we find the commit() FunC code described as follows: Commits the current state of registers c4 (“persistent data”) and c5 (“a...
one year ago
On TON, everything is a cell, and a slice is a cell opened up for reading. But can a slice contain another slice inside? --- > This question was imported fro...
one year ago
How do you hardcode an address in a smart contract? An example in both FunC would be helpful. https://t.me/tondev_eng/4099
one year ago
It is probably a silly question, but it is confusing for a newcomer. What is the difference between msg and msg_body, aside from the type difference? --- > T...
one year ago
As far as I understand, code in FunC language compiles to Fift, and then from Fift code the resulting bag of cells is generated. Could I make my code more co...
Hi, I transferred my TG NFT username to another wallet, but the transfer has not happened yet. The transaction generated exit code 206. Is this normal? Can s...
one year ago
I found a strange behavior in func bitwise operation. I don't understand why. slice slice0 = begin_cell().store_coins(123).end_cell().begin_parse(); int resu...
Does anyone know or have an example how can I store a static address in FunC? I'm thinking about using the asm command, but I'm not sure what the syntax is f...
I would like to take a look at the source code of wallet contracts (wallet v3 and v4). As far as I understand, both these contracts are open source, but wher...
Is it possible to call a function in a recursive way in FunC? If so, how exactly should I do it? I haven't found it in the FunC documentation, is it covered ...
How do you access individual elements of a tuple in FunC using a while loop? As in, say there are 5 values in a tuple. How do I access the "nth" value in my ...
one year ago
here is my FunC code: C-like forall X -> int is_null (X x) asm "ISNULL"; forall X -> (tuple, ()) push_back (tuple tail, X head) asm "CONS"; forall X -> (tupl...
What is the right way to concatenate strings? I've tried this but didn't succeed: .store_slice("start test " + VAR1 + " finish text") --- > This question was...
In the Ston.fi core contract GitHub repository (https://github.com/ston-fi/dex-core), there is a line of FunC code as shown below: force_chain(WORKCHAIN, sen...
one year ago
In TON, messages are used to send data and instructions to smart contracts. Sometimes, these messages can contain large amounts of data such as media files, ...
one year ago
How do we save an ordinary string in FunC? For example, how do you store the text "A" without making it a slice? --- > This question was imported from Telegr...
What determines the purity of a function? A) It must only read the function parameters. B) It can read values outside of the function parameters and return a...
one year ago
Some programming languages have built-in functions like is_int() helping to check quickly if a specific variable is of type integer or not. Is there somethin...
one year ago
Is my understanding correct that smart contracts are written in FunC, then compiled into Fift, and deployed on the blockchain, and they can later be interact...
one year ago