Reputation
Badges 6
Editor Freshman 3 × Eureka! Newbie Enthusiast ScholarThe error message you are receiving suggests that the serializedBoc variable you are passing to the oneFromBoc method is not a string. The slice method can only be called on a string, so if serializedBoc is not a string, the method will throw an error.
In particular, it's possible that the jettonWalletCodeHex
variable you are passing to the new TonWeb.token.ft.JettonMinter()
method is not a string, but instead a parsed boc. Make sure that jettonWalletCodeHex
is a string before ...
**Yes, it is possible for a 24-word mnemonic phrase to correspond to an unlimited number of addresses. ** ⭕️
This phrase is generated using a deterministic wallet seed and is used to derive multiple public and private key pairs following the BIP32 hierarchical deterministic wallet (HD wallet) standard.
**❗️It is important to note that the relationship between the mnemonic phrase and its corresponding key pairs is one-to-many, rather than many-to-many. **
In other words, each uniqu...
To activate your wallet on the TON network, you will need to follow the activation process specific to the wallet you are using. The exact steps may vary depending on the wallet and the version of the TON network you are using.
It's worth noting that most wallets on the TON network, such as TonKeeper and TonHub, are now using the Wallet V4 smart contract. This is a new and updated version of the smart con...
Sequence numbers are used to ensure that blockchain transactions are processed in the correct order and that no duplicates are executed. When crafting a Tonweb transaction, it's important to include the recipient's sequence number in the data to prevent errors or delays in processing.
By properly managing sequence numbers and including the recipient's sequence number in transaction data, you can help ensure that your transactions are executed accurately and smoothly.
The short answer is no. EVM and TVM are fundamentally different, so it's not possible to directly transfer your Solidity code to TVM. However, it's possible that in the future, tools will be developed to enable the compilation of ABI bytecode to TL-B based on TVM.
For more information on the basic concepts and a comparison of the two blockchains, you can find additional details here: https://blog.ton.org/six-unique-aspects-of-ton-blockchain-that-will-surprise-solidity-developers.
For a ...
Need more information to troubleshoot the issue.
At this moment, you can choose FunC and Tact as the programming languages in TVM (TON Network Virtual Machine).
For FunC, here is an overview tutorial you should check out:
https://ton-community.github.io/tutorials/01-wallet/
https://ton.org/docs/develop/func/overview
On the other hand, Tact has an easier syntax to learn compared w...
Yes, I am guessing you are looking for this.
https://github.com/romanovichim/TonFunClessons_Eng
On the other hand, I think
https://ton-community.github.io/tutorials/01-wallet/
is the latest, easy, multi-platform, user-friendly tutorial by the community member, go try it!
You can using something like:
const a = "Ef8zMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzM0vF"a
You need to create a function which returns a splice. Something like this
slice fun_name() asm “x{0055bb} PUSHSLICE”
and then execute a function when you need a slice:
.store_slice(fun_name())
For more information, can check here
https://ton.org/docs/develop/func/literals_identifiers
There are always 4 arguments on stack when recv_internal
is called.
By declaring recv_internal
with less than 4 arguments you force FunC to ignore most deep variables (they still will be there, but your code will be unaware for the whole TVM execution).
in_msg_full - cell with raw message cell that contains all the flags and additional fields
in_msg_body - slice that only contain body of the message
Please check https://ton.org/docs/learn/tvm-instruction...
You can use the Visual Studio plug-in built by the community.
https://ton.org/docs/develop/smart-contracts/environment/ide-plugins
Intellij's plugin has much more functionality besides syntax highlighting: https://plugins.jetbrains.com/plugin/18541-ton-development
There is a version for Vim as well.
https://github.com/app/func.vim
The return type can be any atomic or composite type, as described in the Types section above. For example, the following are valid function declarations:
int foo();
(int, int) foo'();
[int, int] foo''();
(int -> int) foo'''();
() foo''''();
Note that from a low-level perspective, value (2, (3, 9)) of type (int, (int, int)) and value (2, 3, 9) of type** (int, int, int)**, are represented in the same way as three stack entries 2, 3 and 9.
For the short answer, yes. Smart contracts are written in FunC, then compiled into Fift, and deployed on the blockchain. They can later be interacted with using either Fift or a wrapper SDK.
On the other hand, there are always 4 arguments on stack when recv_internal
is called.
By declaring recv_internal with less than 4 arguments you force FunC to ignore most deep variables (they still will be there, but your code will be unaware for the whole TVM execution).
here are the ...
With TON and TVM, you can't obtain the hash immediately. The hash and the "lt"(Logical Time) value will only be available once the transaction has been added to a block by validators.
There are two ways to verify if a transaction has been successfully sent:
-
Check the sequence number (seqno) of the wallet. If it has increased, the transaction has likely been sent.
-
Check the address for the transaction. This will confirm if the transaction has been recorded on the blockch...
I assume you are inquiring about the programming language for Smart Contracts. Currently, you can opt for either FunC (https://ton.org/docs/develop/func) or Tact (https://docs.tact-lang.org/), both of which are human-readable languages used to build Smart Contracts.
Both of these languages offer a plugin module to display your current address, similar to address(this)
in Solidity.
In FunC, you can use:
slice my_address...
First, shards are used for network scalability, the network is using one shard at the moment.
Furthermore, there is about 2 tx per second in TON currently. (In mid 2022)
One shard is able to process around 100 tps and start to split to subshards around this value. So there is not enough load for many shards. There were actually 16 shards prior 9m blocks (due to global split params) and also some spam events as well.
More detail about Share Chain can take a reference in ...
The forward fee is paid by the sending party, even if the message contains 0 TON.
Furthermore, if there is no gas credit in the internal message(the message with 0 grams arrives), you can't call accept_message
in the end.
In the context of the FunC language, the three options define the concept of a pure function.
A pure function is a function that:
A) Only reads the values passed to it as parameters and does not access any external state. This means that its output is solely determined by its input parameters.
B) Can read values outside of the function parameters, but its output still depends only on the values passed to it as parameters. It does not rely on any external state or global data....
Great question, seqno
is an interesting concept on TVM that will be highlight
Which is more like the the transaction number of the wallet sending the Tx. Like the nonce
on EVM world.
For more example, if you want to send the Txs through SDK to the blockchain, will use the code like this:
// (=== more codes === ) //
console.log("Interacting with Collection Contract: \n" + contract_address);
let seqno: number = await wallet_address.getSeqno();
let transfer =...
Yes, you can use many SDK/open source project shared with related way to acheive that.
-
https://github.com/ton-foundation/ton-x
This lib can give you a connect via qr code option support with tonhub mobile wallet -
More recently, TON community just launched the TON Connect 2.0, you can connect more better UX and working with the real-time performance of it.
Nonetheless, you can find the example with github online p...
The contract address is a hash of the code's **stateInit**
.
If you change the initial storage of the contract, you are changing the future address of the contract. However, the future contract address is deterministic (known before you deploy), so you can pass the address to the storage, as part of the initializations of the contract.
For example, the Tact language down below shows how I can create a stateInit code to get Smart Contract address:
contract Example {
...
- https://testnet.dton.io/ - My first choice. GraphQL based, update with instantly without need refresh the page.
- https://testnet.ton.cx/ - shows full of important informations, more specifically, it shows the NFT Index ID, helps me a lot in many cases.
- https://testnet.tonscan.org/ - Obviously, the standard classic explorer UI. Very reliable as well.
- https://test-explorer.toncoin.org/ - High-skill usage explorer. I am not expert at TVM at this moment, but it looks cool.
- https://te...
In FunC world, you can type this to get the result:
var e = 123;
e~dump();
addr
, is alias for 256u
,: write 256uint
.
Meanwhile full address serialization also include address format tag, workchain, 256bit
part ans some additional fields.
Addr, consume from stack two elements: workchain and hash-part and handle this.
All account IDs have 256-bit address in the MasterChain and BaseChain (basic workchain).
Nowadays, only the Masterchain (workchain_id=-1) and occasionally the basic workchain (workchain_id=0) are running in the TON Blockchain.
...
Yes, test cases are important in coding as they help validate code correctness, identify and fix errors, serve as documentation, facilitate maintenance, and increase confidence in code quality and reliability.
There are a few articles wrote by @KAL
https://blog.ton.org/step-by-step-guide-for-writing-your-first-smart-contract-in-func-2
It's a overview tutorial that brings you from zero to end writing the smart contract in FunC and also with testinYes, test cases are important in coding ...
First of all, what is your usage for the RPC endpoint you want?
To obtain an RPC endpoint for the TON network, you can either run your own node or use a public node run by a third party. To run your own node, you will need to download and set up the TON software, which can be obtained from the official TON GitHub repository. For public nodes, you can check websites such as TON Labs or search for TON nodes on popular forums.
Documentation for the TON network, including information on the...
for fetching data, you can use those API /RPC methods.
But on the other hand, I will like to recoomend using:
https://testnet.dton.io/
https://dton.io/