Reputation
Badges 3
Editor Freshman EnthusiastHi, there are a few potential reasons here. Although I spend most of my time coding in Tact (https://tact-lang.org/), the process is nearly the same.
Primarily, it depends on your smart contract code design. But first and foremost, you need to deploy the contract code to the TVM, then trigger the initial parameter settings. This is essential, no matter what.
It seems like you've deployed your contract code and data, but haven't successfully initialized the contract on the blockchain. ...
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.
Calculating the gas price for get/set
operations on a Hashmap in the TON Virtual Machine (TVM) can be a bit challenging, as it is dynamic
and depends on the size of the dictionary
being manipulated.
Although there is no exact formula for determining the gas price, you can estimate it using the following approach:
Gas Price ≈ 600 * log2(SIZE)
Here, SIZE
represents the size of the dictionary. The gas price obtained using this formula is in the gas value unit, which mea...
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...
The error message suggests that there is an issue with the transaction id hash size
. The hash being used in the request might not be the expected size, causing the server to respond with an error.
One possible solution is to encode the parameters in the request, including the transaction hash, to ensure that the values are being properly passed to the server.
Additionally, double-checking the length and format of the transaction hash could also help to identify any issues.
...
Both the source and destination addresses are important in a message for various reasons:
Traceability and Accountability
: The source address indicates the origin of the message, i.e., the account (smart contract) that created the message while processing a transaction. Having a fixed, unchangeable source address ensures that the origin of the message is known and cannot be tampered with. This helps establish a clear chain of actions within the network, making it possible to trace and au...
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();
Good question! Professionals in the industry often discuss wallets in the context of BIP32
(also known as Bitcoin Improvement Proposal), which underlies the process of how wallets are generated from mnemonics.
To put it simply, you can refer to this TypeScript file to understand how we can generate a wallet address:
https://github.com/toncenter/tonweb-mnemonic/blob/master/src/functions/mnemonic-to-seed.ts
As you can see, pbkdf2Sha512
appears to be a combination of PBKDF2 (Passwor...
Good question. Essentially, you cannot do that if you're using another data source to store the metadata outside the TON Blockchain. This is because the metadata, which includes the content of each NFT, can be easily manipulated by the project team.
This repository (https://github.com/disintar/DTN/blob/main/notes/onchain-reveal.md) presents an alternative way to implement an on-chain method for revealing the NFT content, which is more transparent and fair.
You can also refer to the NFT ...
To connect MyLocalTon
using TonWeb, you'll need to follow these steps:
-
Install your own instance of TonCenter by following the instructions in the TonCenter GitHub repository: https://github.com/toncenter/ton-http-api#building-and-running
-
Configure your TonCenter instance to use your local TON network configuration, so it can connect to your
LiteServer (LS)
. You can find the configuration instructions here: https://github.com/toncenter/ton-http-api#Configuration -
Finally,...
Great question. The short answer is no.
Because each NFT owner is locally recorded, it means you need to send a transaction to each NFT.
But luckily, you can still use a series of CLI commands to send multiple transactions to reset each NFT's owner.
Be aware that the difference between EVM and TVM is that the TON network supports sharding your contract in a scalable way. If you launch a collection with a maximum of 10,000 in circulation, then you will have 10,001 contracts: one ...
The discrepancies you are experiencing with the TON API endpoints could be due to querying the incorrect workchain. The address UQCzwxqIw1pt41DND9pgGfAOhJKtQQEgjVcpn0rHxv-4b8Ob
resides in the basechain (workchain=0), but you are looking for transactions in the masterchain (workchain=-1).
To find the correct transaction, follow these steps:
- Query the /getBlockTransactions endpoint with the correct workchain (workchain=0) and shard (-9223372036854775808) values:
https://t...
One possible way to obtain a Wallet V3r2
address from a v4r2 address is to calculate it from the public key.
This can be done through several methods such as using a get-method
, reading from contract persistent data (depending on wallet version and code), or emulating the receipt of an external message and checking what key is used for signature verification.
Yes, you can.
Getgems.io shares a series of NFT contracts for fixed-sale, auction sale, and others, written in FunC code.
https://github.com/getgems-io/nft-contracts/tree/main/packages/contracts/sources
In TVM, memory limitations exist but may not be as strict as in the EVM. This is because the TVM is designed to be more efficient and flexible in terms of resource management. However, developers should still be mindful of resource usage when creating smart contracts for the Free TON platform.
Some considerations for memory usage in TVM:
Memory management: The TVM uses a more sophisticated memory model than the EVM, allowing for more efficient memory management. However, this doesn't me...
There is no one-size-fits-all answer to these questions, as the best approach may vary depending on the specific requirements and constraints of the dApp you are building. However, there are some general guidelines and best practices that can be followed when developing a dApp on TON.
One resource that may be helpful is a series of tutorials that provide step-by-step instructions for deploying contracts and writing FunC code. You can find these tutorials at https://ton-community.github.io/...
The addresses listed in the two sources are different because they are encoded differently. However, they are essentially the same address. To convert the address to a "canonical" non-user-friendly form, you can use the following code in JavaScript:
new TonWeb.Address('kf-kkdY_B7p-77TLn2hUhM6QidWrrsl8FYWCIvBMpZKprBtN').toString(false);
This will convert the address to the canonical form -1:a491d63f07ba7eefb4cb9f685484ce9089d5abaec97c15858222f04ca592a9ac
,
which is...
Hi, so if you like, I highly recommend you using the NFT repo here that using Tact language for the NFT!
- It's more easy to learn.
- There is as simply as just pull the repo and run
yarn
to install library the deploy the contract.
To find information about the fines imposed on validators and the duration of the rounds in the TON blockchain, you can refer to the configuration parameter number 40.
In the Testnet, you can access this parameter through the following link:
https://test-explorer.toncoin.org/config?workchain=-1&shard=8000000000000000&seqno=10476790&roothash=6D2228626EC81D680F9CD0AAC0CDC78B8D0B63A88AAB95395576E46E65F4B5F9&filehash=C4F8F113C7B4F09BBA11D8EBB08E89E11E02172A11D6B5CA74339FFE548D98A5#configpara...
Currently, popular TON wallet applications like TonKeeper
and TONHUB
do not support adding a passphrase to the mnemonic seed phrase when creating or restoring a wallet.
This means that if you develop a wallet application that allows users to generate a wallet using a mnemonic seed phrase and an additional passphrase, users may not be able to restore their wallets in TonKeeper or TONHUB directly.
However, you can still create your wallet application with the seed + passphrase featur...
Hi Emmanuel, maybe you can take a reference here for help. Like it mentioned, maybe you will need a archive node since this might be a heavy seraching for the item_id
and the NFT Item Address
tho
https://docs.ton.org/develop/dapps/asset-processing/nfts#unordered-collection
Yes, there is a concept of epochs in the TON ecosystem as well. An epoch is a period of time during which a specific set of validators are responsible for validating transactions and creating new blocks. In TON, an epoch typically lasts for several hours, during which validators can earn rewards for successfully validating transactions.
Each epoch is composed of a fixed number of blocks, which are validated by a specific group of validators. The validators for each epoch are selected b...
I would suggest using the JavaScript library for this: https://github.com/toncenter/tonweb.
For TON JS examples, please refer to https://github.com/toncenter/examples.
Alternatively, you could try using this Python library: https://github.com/kdimentionaltree/tApi. It is a part of TonCenter for single liteserver, and an example can be found in sandbox.ipynb.
The quoted text is describing the elliptic curve cryptography
(ECC) used in TON, specifically in the TON Blockchain and TON Network. ECC is a cryptographic approach that relies on the mathematics of elliptic curves to create secure key pairs for public-key cryptography.
The passage mentions two specific elliptic curve algorithms used in TON: Ed25519
and Curve25519
.
Ed25519
: This is an elliptic curve digital signature algorithm that provides high-security, fast performance, and ...
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 =...