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
How to calculate Gas Price for "get/set" Operations on Hashmap in TON Network

how can I calculate the gas price for get/set operations to Hashmap?

https://docs.ton.org/learn/tvm-instructions/instructions for these operations the gas price isn't written

This question was imported from Telegram Chat: https://t.me/tondev_eng/27673

Posted 7 months ago
Votes Newest


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 means it is measured in microTONs (10^-6 TON).

Please note that this estimation is based on tests and may not be fully accurate for all cases.

Gas prices can vary depending on several factors, including the complexity of the smart contract, the size of the dictionary, and the specific operations being performed. To obtain a more accurate estimation, it is recommended to test and analyze the gas consumption of your smart contract under different conditions.

Posted 7 months ago