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 optimize gas usage in a smart contract?

It's good when a smart contract needs as little gas as possible for a specific action. So a developer might want to optimize the code, making it use less gas. But how to do it? Of course, it depends on a specific case, so there is no universal answer. But maybe there are some well-known best practices that are good to begin with? Are there some posts on the topic of gas optimization in TON?

This question was imported from Telegram Chat: https://t.me/tondev/136089

Posted 10 months ago
Votes Newest


There is a page on ton.org that presents some best practices for optimizing gas:


Posted 10 months ago
1 Answer
10 months ago
10 months ago