|
|
|
@ -46,6 +46,63 @@ int __tact_dict_get_slice_int(cell d, int kl, slice k, int vl) inline {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
tuple __tact_string_builder_start(builder b) inline { |
|
|
|
|
return tpush(tpush(empty_tuple(), b), null()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
tuple __tact_string_builder_start_comment() inline { |
|
|
|
|
return __tact_string_builder_start(begin_cell().store_uint(0, 32)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cell __tact_string_builder_end(tuple builders) inline { |
|
|
|
|
(builder b, tuple tail) = uncons(builders); |
|
|
|
|
cell c = b.end_cell(); |
|
|
|
|
while(~ null?(tail)) { |
|
|
|
|
(b, tail) = uncons(tail); |
|
|
|
|
c = b.store_ref(c).end_cell(); |
|
|
|
|
} |
|
|
|
|
return c; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
((tuple), ()) __tact_string_builder_append(tuple builders, slice sc) inline_ref { |
|
|
|
|
int sliceRefs = slice_refs(sc); |
|
|
|
|
int sliceBits = slice_bits(sc); |
|
|
|
|
|
|
|
|
|
while((sliceBits > 0) | (sliceRefs > 0)) { |
|
|
|
|
|
|
|
|
|
;; Load the current builder |
|
|
|
|
(builder b, tuple tail) = uncons(builders); |
|
|
|
|
int remBytes = 127 - (builder_bits(b) / 8); |
|
|
|
|
int exBytes = sliceBits / 8; |
|
|
|
|
|
|
|
|
|
;; Append bits |
|
|
|
|
int amount = min(remBytes, exBytes); |
|
|
|
|
if (amount > 0) { |
|
|
|
|
slice read = sc~load_bits(amount * 8); |
|
|
|
|
b = b.store_slice(read); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
;; Update builders |
|
|
|
|
builders = cons(b, tail); |
|
|
|
|
|
|
|
|
|
;; Check if we need to add a new cell and continue |
|
|
|
|
if (exBytes - amount > 0) { |
|
|
|
|
var bb = begin_cell(); |
|
|
|
|
builders = cons(bb, builders); |
|
|
|
|
sliceBits = (exBytes - amount) * 8; |
|
|
|
|
} elseif (sliceRefs > 0) { |
|
|
|
|
sc = sc~load_ref().begin_parse(); |
|
|
|
|
sliceRefs = slice_refs(sc); |
|
|
|
|
sliceBits = slice_bits(sc); |
|
|
|
|
} else { |
|
|
|
|
sliceBits = 0; |
|
|
|
|
sliceRefs = 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return ((builders), ()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
(slice, ((int))) __gen_read_StakingWithdraw(slice sc_0) inline { |
|
|
|
|
throw_unless(129, sc_0~load_uint(32) == 3665837821); |
|
|
|
|
var v'value = sc_0~load_coins(); |
|
|
|
@ -76,6 +133,9 @@ builder __gen_write_PseudoStaking(builder build_0, (cell) v) inline {
|
|
|
|
|
set_data(b.end_cell()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
;; String "Withdraw completed" |
|
|
|
|
slice __gen_str_2874951020() asm "B{b5ee9c72410101010014000024576974686472617720636f6d706c65746564f7612edd} B>boc <s PUSHSLICE"; |
|
|
|
|
|
|
|
|
|
() $send((int, slice, int, int, cell, cell, cell) $params) impure inline_ref { |
|
|
|
|
var (($params'bounce, $params'to, $params'value, $params'mode, $params'body, $params'code, $params'data)) = $params; |
|
|
|
|
builder $b = begin_cell(); |
|
|
|
@ -119,6 +179,13 @@ builder __gen_write_PseudoStaking(builder build_0, (cell) v) inline {
|
|
|
|
|
send_raw_message($c, $params'mode); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
cell $__gen_String_asComment(slice $self) impure inline_ref { |
|
|
|
|
var ($self) = $self; |
|
|
|
|
tuple $b = __tact_string_builder_start_comment(); |
|
|
|
|
$b~__tact_string_builder_append($self); |
|
|
|
|
return __tact_string_builder_end($b); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
((cell), ()) $__gen_PseudoStaking_receive_comment_2dcb19a5b89db9d3377fc651c6f9b6b92db9be624060c62a50572cdc97968638((cell) $self) impure inline { |
|
|
|
|
var ($self'stakes) = $self; |
|
|
|
|
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get(); |
|
|
|
@ -135,7 +202,7 @@ builder __gen_write_PseudoStaking(builder build_0, (cell) v) inline {
|
|
|
|
|
var ($self'stakes) = $self; |
|
|
|
|
var ($msg'value) = $msg; |
|
|
|
|
var ($ctx'bounced, $ctx'sender, $ctx'value, $ctx'raw) = __tact_context_get(); |
|
|
|
|
$send((true, $ctx'sender, $msg'value, 0, null(), null(), null())); |
|
|
|
|
$send((true, $ctx'sender, $msg'value, 0, $__gen_String_asComment(__gen_str_2874951020()), null(), null())); |
|
|
|
|
return (($self'stakes), ()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|