Reputation
Badges 3
Editor Freshman EnthusiastIn my personal experience, I would use code like this to track the result of a transaction:
=== Your Code Parameters ===
.....
console.log("============================");
console.log("Interacting with Collection Contract: \n" + contract_address);
let seqno: number = await wallet_address.getSeqno();
let transfer = await wallet_address.sendTransfer({
seqno: seqno,
secretKey: keyPair.secretKey,
messages: [
internal({
value: toNano("...
When you verify a smart contract's source code on a blockchain explorer or website, the page generates a unique code hash for the contract. This code hash is essentially a digital fingerprint of the contract's bytecode. When someone views the verified source code on the explorer, the explorer looks up the code hash and retrieves the corresponding source code.
However, if the contract's bytecode is updated using the set_code()
instruction, the code hash will change. **This means that the ...
Yes, this is a great question!
TON DNS is a decentralized domain name system that lets you assign a human-readable name to crypto wallets, smart contracts, and websites.
Domain names are NFTs that can be stored, gifted, or sold. Auctions for domain names last for one week, and bids must be at least 5% higher than the previous bid. The highest bidder at the end of the auction period wins the domain name.
In addition, the .ton domain can be used as a multi-support gate to ...
The maximum size of a smart contract deployed on the TON Network depends on the complexity of the contract and the number of cells it utilizes. In general, the size of a smart contract's Bag-of-Cells (BoC) representation should not exceed the size limit of a single shardchain block, which is 2 MB
. However, practical limits for smart contracts are much smaller.
A single cell in the TON Network can store up to 1023 data
bits and has 4 references to other cells
. The more complex the sma...
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...
compute_gas_fees
and other_fee
are fees charged by the TON network for processing smart contract transactions.
compute_gas_fees
are the fees charged for the computation required to execute the smart contract code. This includes the cost of processing instructions, reading and writing data to the blockchain, and validating transactions. The amount of compute_gas_fees charged depends on the complexity of the smart contract code and the amount of resources required to execute it.
`ot...
Before we start, you need to know the message itself is sending on Cell
data type in TON. Which means, each cell has a limit of 1023 bits
for storing data. This limit includes the data stored within the cell and any necessary headers or metadata.
Suppose you have a message body that is 900 bits long, and you want to store it in a cell along with its message header. The message header itself will also take up some bits for storing its fields, such as message type, address information,...
The reason for the different addresses generated by TonHub, TonKeeper, and wallet.ton.org when using the same mnemonic phrase is because the address depends on the wallet contract version being used.
It is important to note that v4 of the wallet contract allows for the installation of plugins, which could potentially introduce security vulnerabilities if used improperly. If you do not require the advanced features provided by v4, it is recommended that you use v3 ins...
That's a great question. If you check the repository URL for this NFT, which is the code in FunC
, Telemint, you'll see a line of code that reads throw_unless(err::not_enough_funds, bid >= initial_min_bid);
*1.
This line means that you need more funds in the NFT itself to trigger this kind of transaction in practice. In other words, "not enough funds" means that you should replenish the balance of the NFT smart contract so that there is more than 💎1.
*1: https://github.com/T...
Good question. As a community contributor, I share this concern. The information I can provide is sourced from tonscan.org.
- TonFoundation Address (approx. $62M): https://tonscan.org/address/EQCD39VS5jcptHL8vMjEXrzGaRcCVYto7HUn4bpAOg8xqB2N
- TON DNS Address (approx. $7.6M): https://tonscan.org/address/EQC3dNlesgVD8YbAazcauIrXBPfiVhMMr5YYk2in0Mtsz0Bz
- TON Ecosystem reserve (approx. $947M): https://tonscan.org/address/EQAhE3sLxHZpsyZ_HecMuwzvXHKLjYx4kEUehhOy2JmCcHCT#transactions
I w...
This is a great question! (Took me a long time to understand as well)
So basically, you are asking:
- Why do we store the uint(....) there?
- And why do we deal with int_msg_info over there?
1/ The message structure
To understand why we store the uint(...) in the message, you need to understand how TVM works for Message. In practice, the Message Layout shows that to "compress" the message we want to store, we must store it into a "Cell" and upload it to the smart contract a...
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 ...
Yes, you can find the latest Blocknumber in a series of API suppliers.
Or using the follow of code from orbs network
// copy paste the following snippet into your dapp client code
// to initialize your favorite TON API library and make blockchain queries
import { getHttpEndpoint } from "@orbs-network/ton-access";
import { TonClient } from "ton";
// g...
In the TON blockchain, once a transaction is included in the blockchain, it is considered "confirmed" and cannot be undone. Therefore, the speed at which transactions are included in the blockchain is critical for many use cases, particularly for decentralized applications that rely on fast and efficient transaction processing.
Unlike some other blockchains, such as Ethereum, the TON blockchain does not allow for dynamic adjustment of gas fees based on market demand
. Gas prices are t...
The Election contract is responsible for managing the validator elections on the TON blockchain.
The reason why the contract's balance may be greater than the total stake of all validators combined is because the stake of each validator is divided into two halves, and only one half is used during the current validation round.
In order to participate in the next round, validators must make a new stake before it begins, while their previous stake is still locked.
**As a result, ...
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...
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!
- 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 order to ensure that the first transaction has been processed and the wallet has received the TON coins before attempting to send the jetton, you should wait for a confirmation of the first transaction.
The amount of time it takes for a transaction to be confirmed can vary depending on factors such as network congestion and transaction fees. Generally, you should wait for at least one confirmation, which typically takes around 1-2 minutes on the TON network.
When sending the TON ...
The inflation rate for TON is not fixed and may vary depending on various factors such as network activity and the number of validators.
According to the TON whitepaper, the initial inflation rate was set at 0.6% per year
, which is distributed among the validators as a reward for validating transactions and maintaining the network.
However, it's important to note that the inflation rate for TON may not be directly tied to the circulating supply or the initialized account balances. Ins...
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 ...
Using the **'getTransactions' **method would be a recommended approach for checking if a specific message was received by a particular address.
The TON JS Examples repository on Github offers helpful resources, including a JavaScript code snippet that can be used to retrieve a list of transactions for a specific address.
The code example can be found at
https://github.com/toncenter/examples
https://gist.github.com/slavafomin/1bcb401b5dc336bb4f9a2005b1660cbd.
Yes, any randomly generated 256 bits can be used as a seed to generate an Ed25519 private key. One possible method for generating a private key from such a seed is by using a cryptographic hash function such as SHA256.
The function run_ticktock
only operates in the masterchain and it's exclusive to the smart contracts whose addresses are specified in the corresponding config parameter.
Therefore, such smart contracts cannot work on a basechain.
It seems that the Jetton contracts are functioning correctly on TonWeb
, so the issue is likely due to an error in the code deployed by the person asking the question.
Perhaps they made a mistake during the deployment process, or there could be an issue with their code. To resolve the problem, it's recommended that they carefully review their code and study the official Jetton contracts on TonWeb to identify any differences.
Through a thorough debugging process, they can identify the...
Theoretically, the TON blockchain can process over 15,000+ transactions per second
and more, thanks to its high transaction throughput design and potential to scale to millions of transactions per second through multi-chain support for scalability.
The TON network enables sharding based on the ChainID naturally, with a large number of workchains available for use, as described in the Parameters that validators are running. You can check the following link for more details: https://to...
It looks like the initial transaction requested through /getTransactions
is not in the masterchain (workchain=-1). You can try using /getBlockTransactions
to look for the transaction in the basechain (workchain=0).
First, use /lookupBlock
to find the block number corresponding to the transaction's Unix time, and then use /getBlockTransactions
to search for the transaction in the block with the corresponding sequence number in each shard.
In the specific case mentioned, the tran...
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/
In FunC world, you can type this to get the result:
var e = 123;
e~dump();