Reputation
Badges 6
Editor Freshman 3 × Eureka! Newbie Enthusiast ScholarGreat question!
So community member Danni has build the example code for this:
https://github.com/Gusarich/ton-mass-sender/tree/main
each of the following recv_internal declarations is correct, but those with fewer variables will spend slightly less gas (each unused argument adds additional DROP instructions).
() recv_internal(int balance, int msg_value, cell in_msg_cell, slice in_msg) {}
() recv_internal(int msg_value, cell in_msg_cell, slice in_msg) {}
() recv_internal(cell in_msg_cell, slice in_msg) {}
() recv_internal(slice in_msg) {}
You have to parse in_msg_body to retrieve the op code based on h...
Hi, basically you can still can transfer the NFT out, go to https://getgems.io to log in your wallet then execute the Transfer
method.
quick answer, there is no test-net environment for @wallet at this moment.
But if you want you can use @CryptoBOT / https://t.me/CryptoTestnetBot to test out.
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 ...
Based on the Whitepaper found here, logical time is described as:
For this purpose, the creation of an outbound message is considered an atomic event, logically dependent on the previous message created by the same transaction, as well as on the previous transaction of the same account, on the inbound message processed by the same transaction, and on all events contained in the blocks referred to by hashes contained in the block with the same transactio...
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...
First of all, LT (Logical Time) is unique for each smart contract in TON. This means that different addresses produce different hashes for transactions, and each will be tagged with a different Logical Time inside the block.
In an** asynchronous system **like TON, you can't get a response from the destination smart contract in the same transaction. A contract call may take a few blocks to be processed, depending on the length of the route between the source and destination.
The asynchro...
Overall
In big endian byte order, the **most significant byte (MSB) is stored at the lowest memory address, and the least significant byte (LSB) is stored at the highest memory address.
This is also known as network byte order, because it is the format used in internet protocols like TCP/IP in general.
Big-Endian in TVM
In TVM, integers within cells are serialized using the big-endian format by default. This means that when an integer is converted into a sequence of bytes t...
You can sign a Cell with ton-crypto
or ton-core, and later verify it using check_signature
or check_data_signature
from stdlib.fc
in FunC.
Here's an approximate code snippet that you should review:
sign(yourCell.hash(), keypair.secretKey);
## And in the FunC contract, check like this:
check_signature(cell_hash(your_cell), signature, public_key)
For more details, you can refer to the [TON documentation on signature checks](https://docs.ton.org/develop/fun...
I don't have any experience dealing with Validator configuration, but I can share with you the idea for the Public Key we use in TON and how it interacts with smart contracts.
import { randomBytes } from "crypto";
import { keyPairFromSeed } from "ton-crypto";
let keypair = keyPairFromSeed(randomBytes(32));
let public_key_hex = keypair.publicKey.toString("hex");
let public_key_int = BigInt("0x" + public_key_hex);
let public_key_cell = beginCell().storeU...
That is correct; you need to use Snake Data Encoding if you want to store more than 1023 bits in a Smart Contract (TVM).
You have no other option.
The short answer is to use the method that Arter provided by checking the snake encoding example code here:
Snake Encoding Example Code
Also, for a more comprehensive understanding of how to incorporate this process into your work, you can refer ...
You can using Buffer.from
to solve this.
Unfortunately, the answer is no.
Because the cells are immutable, and partially because you can cheaply calculate the cell hash.
Generally speaking, the FunC code op::increase = "op::increase"c
first converts this into a uint
(unsigned integer), since in TVM (Turing Virtual Machine), communication is done only in unsigned integers to distinguish the unlimited
functions that you build.
On the other hand, the uint
can be converted into hex
code to save space when storing it in a Smart Contract.
**Here's an example in TypeScript to finalize the op-code into uint and hex data. It uses the CRC32 method to...
Follow some understanding and exploring, I think you can take a look in this:
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
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.
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.
Generally speaking, you can use https://testnet.toncenter.com/api/v2/#/accounts/get_address_information_getAddressInformation_get to acquire all formats of a single address.
However, in practice, you can also utilize libraries to generate these. Below are a few snippets of code:
import { mnemonicToPrivateKey } from "ton-crypto";
let mnemonics = "YOUR_MNEMONICS";
let keyPair = await mnemonicToPrivateKey([mnemonics]);
// ✨ 🟡 Test-net:
const client = new TonClient4(...
Yes, gas consumption does increase with the size of the dictionary. This is due to how the dictionary is packed.
Specifically, it's packaged as a compressed prefix tree into a cell tree. When you perform a read operation, all the cells on the path to your value are read, with each cell reading costing 25/100 of the gas.
Thus, larger dictionaries, which have more cells to read, will consume more gas.
It's important to understand that the discrepancy you're encountering is not necessarily due to an issue with the 24-word mnemonic seed phrase system, but could be linked to changes in the wallet software itself.
Different wallet versions might generate distinct addresses using the same public key, which doesn't imply that the underlying cryptographic security system - in this case, elliptic curve digital signature algorithm*** (ECDSA)*** - is compromised or not "future-proof".
Th...
Blockchain networks often consist of various nodes (computers) that communicate with each other. They send and receive messages containing transactions, blocks, and other data. This communication is typically categorized into internal and external messages:
Internal Messages: These are usually transactions or messages sent between smart contracts within the blockchain network. They are also known as "internal transactions".
External Messages: These are messages sent to the block...
- "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 ...
Certainly, the EVM ecosystem is indeed known for its robust block explorers, and there are similar tools available in the TON ecosystem as well. These explorers provide detailed insights into blocks, transactions, and events happening on the TON network:
Explorer.toncoin.org - A comprehensive block explorer that provides detailed information about the FreeTON blockchain, including blocks, transactions, and account details.
DTON.io - This is another popular TON block explorer that provid...
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