Reputation
Badges 6
Editor Freshman 3 × Eureka! Newbie Enthusiast ScholarTo call a function from a smart contract using Python, you can use the tonsdk package available on PyPI.
This package provides a convenient way to interact with TON smart contracts using Python.
You can find more information and installation instructions on the package's official PyPI page: https://pypi.org/project/tonsdk/
Unfortunately, no.
But the best way for me is to open more Telegram accounts and call the bot from each account.
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.
**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...
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.
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...
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.
...
Generally speaking, TON Storage is offline and its cost depends on the provider. On the other hand, for TON Cell, you should check the TON Storage fee.
It's important to note that TON Storage only ensures that storage providers don't receive payment if they don't store the file, but it doesn't guarantee that files are actually stored. TON Storage is more about availability than actual storage.
**As for the cost of storing data on TON, saving 1 MB of data for one year will cost approxima...
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...
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.
...
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 ...
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
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...
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 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...
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.
In FunC world, you can type this to get the result:
var e = 123;
e~dump();
1/ Is it realy so complicated to get parent message, or I missed some method or something else?
=> This is out of my knowledge.
2/ How much can I trust method getBlockByUtime? Is it possible that for some unix time I will (not get block)/(get next block)/(any options)?
=> getBlockByUtime
is a method used to fetch a block that was produced closest to a given Unix time. It's not 100% precise due to the fact that block times are not strictly enforced in the protocol, and there's...
I think you can check in detail of this collection here in getgems and using the TonAPI to fetch all the NFT item in this collection tho.
https://getgems.io/collection/EQCA14o1-VWhS2efqoh_9M1b_A9DtKTuoqfmkn83AbJzwnPi#stats
- "store_uint" is presumably a function or method that takes two parameters.
- The first parameter, "0x18", is a hexadecimal representation of a number. In decimal form, "0x18" equals 24.
- The second parameter, "6", could be the size or length of the data that's being stored, often referring to the number of bits. In this case, the integer 24 is being stored in a 6-bit format.
In general, serialization is the process of converting data structures or object states into a format that can ...
Hi, I think the burn address for each block is not the same as the address you've pasted here. That might be the reason.
Yes, that's correct.
You can take a look at the document here: https://docs.ton.org/participate/wallets/contracts
Basically, the difference in wallets lies in whether it's a high-load wallet, whether it supports NFTs, subscriptions, etc.
The short answer is through Interface
.
But also you can take reference in TEP62(NFT Standard) https://github.com/ton-blockchain/TEPs/blob/master/text/0062-nft-standard.md
And also check my Tact code https://github.com/howardpen9/nft-template-in-tact
You can using Buffer.from
to solve this.
Follow some understanding and exploring, I think you can take a look in this:
Hey, in general, there is no TEP (TON Enhancement Proposal) defined for what constitutes "Standard Staking for NFT."
As the contributor who implemented the NFT standard in the Tact language, you can easily set the status on your stake by creating a new contract and designating it as the new owner of the NFT.
Alternatively, you can change the status within the NFT item itself, and then add a require
statement to limit the Transfer
method for the NFT item.
In summary, the way to im...
For Slice reading , you can using load_uint(8)
in FunC.
More detail can check with example like here:
https://docs.ton.org/develop/smart-contracts/guidelines/tips#spend-less-gas-on-large-smart-contracts
() recv_external(slice in_msg) impure {
var signature = in_msg~load_bits(512);
var cs = in_msg;
var (subwallet_id, valid_until, msg_seqno) = (cs~load_uint(32), cs~load_uint(32), cs~load_uint(32));
throw_if(36, valid_until <= now());
var ds ...