Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Profile picture
Howard Peng
Administrator Moderator
2 Questions, 17 Answers
  Active since 19 December 2022
  Last activity 6 months ago

Reputation

10

Badges 1

Editor
0 Votes
1 Answers
4K Views
0 Votes 1 Answers 4K Views
In the Ston.fi core contract GitHub repository (https://github.com/ston-fi/dex-core), there is a line of FunC code as shown below: force_chain(WORKCHAIN, sen...
9 months ago
0 Votes
1 Answers
6K Views
0 Votes 1 Answers 6K Views
What is the byte size of a smart contract that can be deployed on TON? --------- > This question was imported from Telegram Chat: https://t.me/tondev_eng/26332
1 Where can I read details about BOC flags, including CRC ?

To better understand the role of CRC-32 in the TON network and its relation to Bag of Cells (BOCs), it is essential to first learn about the concept of Cyclic Redundancy Check (CRC) and its primary purpose.

CRC is a widely employed method for verifying the integrity of digital data. As an error-detecting algorithm, it checks for errors in digital data during transmission or storage.

A CRC generates a short checksum or hash of the data being transmitted or stored, which is...

10 months ago
1 Querying the Total List of Items in a Collection

To retrieve a list of NFT addresses within a collection, you can follow a two-step process.

Firstly, you need to download the state of the collection contract and then invoke a specific get-method that returns the address of each item based on its index. This allows you to gather all the relevant NFT addresses associated with the collection.

Once you have obtained the list of NFT addresses, the next step is to retrieve the respective owners of these NFTs. This can be accomplished...

9 months ago
1 How to convert TON Address Formats Using js-sdk Method?

I believe all SDKs have a method to cast RAW/Friendly form addresses. For example, in tonweb (https://github.com/toncenter/tonweb/blob/master/src/utils/README.md), you can use address.wc and address.hashPart to get the RAW address as wc:hashPart.

Although I have never used this in my projects, the documentation seems to be accurate.

It should be similar for any SDK - you need to find the Address entity and check its methods and properties to see how to retrieve the RAW address.

10 months ago
1 Approach to adopt when coming from chain supporting dApp to dApp calls/communications?

First of all, messages in TVM (TON Network) don't allow us to access the state data of other contracts in the same way we do in Solidity (EVM).

This is because the data for a contract can change dynamically in an asynchronous chain. The only way to access data from a smart contract is through message calls, which means asking the contract to send the data through itself.

More information here:

10 months ago
1 Where can I get TON coins for testnet?

The CryptoBot test-net is works properly for me:

https://t.me/testgiver_ton_bot

one year ago
0 How to sign a string and get the result through @tonconnectSDK?

Here's a revised version with improved grammar:

I have followed up with Jerry and the TonKeeper team regarding your question. It seems that at this time, TonKeeper does not support signing data yet. Jerry received this response from the TonKeeper team.

10 months ago
0 Understanding the Purpose of the "force_chain" Function in Ston.fi's Core Contract

In general, if we follow the code in common/utils.func (https://github.com/ston-fi/dex-core/blob/main/contracts/common/utils.func), we will get the following code:

() force_chain(int workchain, slice address, int error_code) impure inline {
  (int wc) = get_workchain(address);
  throw_unless(error_code, wc == workchain);
}

As far as my knowledge goes, this function ensures that the contract code executes only in a specific workchain. Since TVM is a multi-chain-based d...

9 months ago
0 How to estimate NFT minting fees on TON?

Good question! In TON, the gas cost of minting an NFT is the same, whether it's the first or the last minting in the series. This is different from Solidity in the EVM world, where the cost can vary depending on the specific implementation.

As for calculating the cost, it will depend on the specific details of your deployment, such as the gas price and the complexity of your smart contract code. You can use the TON Gas Calculator (https://ton.live/gas) to estimate the gas cost for your ...

10 months ago
0 Is it possible to import a function from another file in FunC?

Yes, you can do that.

Besides using the include statement, you can also add the files to the project.yml in the source section.

**However, make sure that the functions do not overlap as there is no function overloading in FunC. **

You can simply put the file in the same folder and use the #include "imports/stdlib.fc"; command.

For more examples, please refer to the Smart Contract Examples section in the TON documentation at https://docs.ton.org/develop/smart-contracts/#smar...

10 months ago
0 Is it possible to implement anonymous voting on TON?

That's a great question. To put it simply, we can't.

I'm guessing you're referring to ton.vote, the smart contract that we can verify based on the Orb Network's documentation here: https://github.com/orbs-network/dao-vote.

If you check the code, you will notice that it's based on the wallet address with the voting function message receivers. This means that we cannot anonymously vote in TON.

10 months ago
0 Is it possible to calculate input and output message hash before sending a transaction in TON?

Excellent question! Predicting the input and output message hash before transmitting a transaction is not feasible.

The underlying reason is the dynamic nature of contract data, which can be altered by any previous transactions. Consequently, the current state of the contract remains unpredictable until the transaction is processed.

Hence, the exact input and output message hash values cannot be determined ahead of time. A more effective approach is to validate the input and out...

9 months ago
0 TypeError: Do not know how to serialize a BigInt

General speaking, from the Error message that for BigInt

You should notice that your line of code is incorrect:
.storeUint(0,1) // forward_payload:(Either Cell ^Cell)

It should be the Cell not using Uint I think.

6 months ago
0 How to get all the active TON wallets addresses?

Good question. While it may be a large dataset, you could just focus on tracking the wallet smart contract if that's what you're interested in.

However, if you're looking for a general-purpose source of data, you could try using the reports available on https://m3talab.io/reports/ton-telegram-open-network.

10 months ago
0 Is there NFT burning on TON?

So basically you can't burn the NFT.

It is not possible to completely erase an NFT from the blockchain. This is true for both Ethereum and TON, as data stored on the blockchain cannot be deleted. The only available option is to transfer the NFT to a "black hole" address or a specific inactive contract, which essentially locks the NFT away indefinitely.

Can take a look about my NFT implement in Tact lang:
https://github.com/howardpen9/nft-standard-template

9 months ago
0 Is there a way to decompile Fift code back to the FunC code?

It is true that FunC code is typically compiled into the Fift language, which is a lower-level language for the TON Virtual Machine. However, decompiling Fift code back into FunC code is a non-trivial task and may not be possible in all cases.

Decompiling code involves converting a lower-level representation of a program, like bytecode or assembly, back into a higher-level source code that is more easily readable by humans. While it is theoretically possible to reverse-engineer F...

10 months ago
0 Is there something like is_int in FunC?

Unfortunately, we don't have the built-in function like that.

However, you can create your own function to check if a value is an integer. Or you can take a reference here to acheive it.

forall X -> int is_null(X x) asm "ISNULL";
forall X -> int is_int(X x) asm "<{ TRY:<{ 0 PUSHINT ADD DROP -1 PUSHINT }>CATCH<{ 2DROP 0 PUSHINT }> }>CONT 1 1 CALLXARGS";
forall X -> int is_cell(X x) asm "<{ TRY:<{ CTOS DROP -1 PUSHINT }>CATCH<{ 2DROP 0 PUSHINT }> }>CONT 1 1 CALLXARGS";
forall X ->...
10 months ago