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
Does store_slice act like store_ref?

Hello, I'm trying to understand the underlying logic of slice and cell in TON blockchain.

I'm wondering if store_slice acts like store_ref and if it's possible to use load_ref and begin_parse with store_slice.

Additionally, what is the most efficient way to store a slice as a ref?

The question imported from: https://t.me/tondev_eng/1075

Posted 3 months ago
Edited 3 months ago
Howard Peng
10 Administrator
Votes Newest


No, store_slice and store_ref are two different functions with different inputs and outputs.

store_slice adds slice bits and slice refs to a builder, while store_ref adds a cell to a builder's refs. Using store_slice with load_ref and begin_parse is not possible.

Regarding the most efficient way to store a slice as a ref, there is no one-size-fits-all solution. One possible method is to use builder.store_ref(begin_cell().store_slice(slice).end_cell()), but this may involve creating an extra cell.

The most efficient way to store a slice as a ref will depend on the specific requirements and constraints of the application, and may involve trade-offs between gas cost and complexity of the implementation.

Posted 3 months ago
Edited 3 months ago
1 Answer
3 months ago
3 months ago