Does store_slice act like store_ref?
Does store_slice act like store_ref?
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.
"No store_slice is function applied to (builder, slice) and it adds slice bits to builder bits and adds slice refs to builder refs.
While store_ref is function applied to (builder, cell) and it adds cell to builder' refs.
>what's the most efficient way to store slice as ref?
there is no 'very efficient ways'.
builder.store_ref(begin_cell().store_slice(slice).end_cell()) will do the thing, but usually trick is to somehow by-pass creation of extra cell."
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.
Does store_slice act like store_ref?
"No store_slice is function applied to (builder, slice) and it adds slice bits to builder bits and adds slice refs to builder refs.
While store_ref is function applied to (builder, cell) and it adds cell to builder' refs.
>what's the most efficient way to store slice as ref?
there is no 'very efficient ways'.
builder.store_ref(begin_cell().store_slice(slice).end_cell()) will do the thing, but usually trick is to somehow by-pass creation of extra cell."
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.