File tree Expand file tree Collapse file tree 1 file changed +0
-25
lines changed
target_chains/ton/contracts/contracts/common Expand file tree Collapse file tree 1 file changed +0
-25
lines changed Original file line number Diff line number Diff line change @@ -34,31 +34,6 @@ int keccak256_slice(slice s) inline {
34
34
return keccak256_tuple(slices);
35
35
}
36
36
37
- ;; Splits a slice into chunks of MAX_BITS bits or less, in reverse order
38
- (cell, slice) split_into_reverse_chunks(slice data, int size) {
39
- cell chunks = null();
40
- int total_bits_loaded = 0;
41
- builder current_chunk = begin_cell();
42
- while ((~ data.slice_empty?()) & (total_bits_loaded < size)) {
43
- int bits_to_load = min(min(data.slice_bits(), MAX_BITS - current_chunk.builder_bits()), size - total_bits_loaded);
44
- current_chunk = current_chunk.store_slice(data~load_bits(bits_to_load));
45
- total_bits_loaded += bits_to_load;
46
- if ((current_chunk.builder_bits() == MAX_BITS) | (size - total_bits_loaded == 0)) {
47
- slice current_chunk_slice = current_chunk.end_cell().begin_parse();
48
- if (cell_null?(chunks)) {
49
- chunks = begin_cell().store_slice(current_chunk_slice).end_cell();
50
- } else {
51
- chunks = begin_cell().store_slice(current_chunk_slice).store_ref(chunks).end_cell();
52
- }
53
- current_chunk = begin_cell();
54
- }
55
- if ((data.slice_bits() == 0) & (~ data.slice_refs_empty?())) {
56
- data = data~load_ref().begin_parse();
57
- }
58
- }
59
- return (chunks, data);
60
- }
61
-
62
37
{-
63
38
This function reads a specified number of bits from the input slice and stores them in a cell structure,
64
39
handling data that may exceed the maximum cell capacity in FunC (1023 bits).
You can’t perform that action at this time.
0 commit comments