2020-03-25 17:59:03 +04:00

625 lines
32 KiB
Plaintext

// automatically generated from `smartcont/stdlib.fc` `smartcont/multisig-code.fc`
PROGRAM{
DECLPROC unpack_state
DECLPROC pack_state
DECLPROC pack_owner_info
DECLPROC unpack_owner_info
DECLPROC check_signatures
DECLPROC recv_internal
DECLPROC unpack_query_data
DECLPROC dec_flood
DECLPROC try_init
DECLPROC update_pending_queries
DECLPROC calc_boc_size
DECLPROC recv_external
104746 DECLMETHOD get_query_state
117746 DECLMETHOD processed?
81625 DECLMETHOD create_init_state
DECLPROC merge_list
120004 DECLMETHOD get_public_keys
87157 DECLMETHOD check_query_signatures
109260 DECLMETHOD messages_by_mask
85042 DECLMETHOD get_messages_unsigned_by_id
120055 DECLMETHOD get_messages_unsigned
114740 DECLMETHOD get_n_k
83381 DECLMETHOD merge_inner_queries
unpack_state PROCREF:<{
//
c4 PUSH // _1
CTOS // ds
32 LDU // _4 ds
8 LDU // _4 _7 ds
8 LDU // _4 _7 _10 ds
64 LDU // _4 _7 _10 _13 ds
LDDICT // _4 _7 _10 _13 _16 ds
LDDICT // res res res res res res ds
ENDS
}>
pack_state PROCREF:<{
// pending_queries owner_infos last_cleaned k n wallet_id
NEWC // pending_queries owner_infos last_cleaned k n wallet_id _6
32 STU // pending_queries owner_infos last_cleaned k n _8
8 STU // pending_queries owner_infos last_cleaned k _10
8 STU // pending_queries owner_infos last_cleaned _12
64 STU // pending_queries owner_infos _14
STDICT // pending_queries _15
STDICT // _16
ENDC // _17
}>
pack_owner_info PROCREF:<{
// public_key flood
SWAP
NEWC // flood public_key _2
256 STU // flood _4
8 STU // _6
}>
unpack_owner_info PROCREF:<{
// cs
256 LDU // _1 cs
8 LDU // _1 _10 _9
DROP // _1 _4
}>
check_signatures PROCREF:<{
// public_keys signatures hash cnt_bits
0 PUSHINT // public_keys signatures hash cnt_bits cnt=0
UNTIL:<{
s0 s3 XCHG // public_keys cnt hash cnt_bits signatures
CTOS // public_keys cnt hash cnt_bits cs
9 PUSHPOW2 // public_keys cnt hash cnt_bits cs _10=512
LDSLICEX // public_keys cnt hash cnt_bits signature cs
8 LDU // public_keys cnt hash cnt_bits signature i cs
LDDICT // public_keys cnt hash cnt_bits signature i _43 _42
DROP // public_keys cnt hash cnt_bits signature i signatures
s1 s6 PUSH2
8 PUSHINT // public_keys cnt hash cnt_bits signature i signatures i public_keys _20=8
DICTUGET
NULLSWAPIFNOT // public_keys cnt hash cnt_bits signature i signatures public_key found?
37 THROWIFNOT
256 PLDU // public_keys cnt hash cnt_bits signature i signatures _26
s5 s3 s3 PUXC2 // public_keys cnt hash cnt_bits signatures i hash signature _26
CHKSIGNU // public_keys cnt hash cnt_bits signatures i _27
38 THROWIFNOT
POW2 // public_keys cnt hash cnt_bits signatures mask
s2 s(-1) PUXC // public_keys cnt hash old_cnt_bits signatures cnt_bits mask
OR // public_keys cnt hash old_cnt_bits signatures cnt_bits
s0 s2 PUXC // public_keys cnt hash cnt_bits signatures cnt_bits old_cnt_bits
NEQ // public_keys cnt hash cnt_bits signatures should_check
s1 s4 XCHG // public_keys signatures hash cnt_bits cnt should_check
SUB // public_keys signatures hash cnt_bits cnt
s3 PUSH // public_keys signatures hash cnt_bits cnt signatures
ISNULL // public_keys signatures hash cnt_bits cnt _37
}> // public_keys signatures hash cnt_bits cnt
2 2 BLKDROP2
s2 POP // cnt cnt_bits
}>
recv_internal PROC:<{
// in_msg
DROP //
}>
unpack_query_data PROCREF:<{
// in_msg n query found? root_i
SWAP // in_msg n query root_i found?
IFJMP:<{ // in_msg n query root_i
DROP // in_msg n query
1 LDI // in_msg n _6 query
SWAP // in_msg n query _6
35 THROWIFNOT
8 LDU // in_msg n _14 query
8 LDU // in_msg n _14 _17 query
s0 s3 XCHG2 // in_msg _17 _14 query n
LDUX // in_msg cnt creator_i cnt_bits msg
DUP // in_msg cnt creator_i cnt_bits msg msg
HASHSU // in_msg cnt creator_i cnt_bits msg _23
s0 s5 XCHG // _23 cnt creator_i cnt_bits msg in_msg
HASHSU // _23 cnt creator_i cnt_bits msg _24
s1 s5 XCHG // msg cnt creator_i cnt_bits _23 _24
EQUAL // msg cnt creator_i cnt_bits _25
36 THROWIFNOT
s0 s3 XCHG2 // creator_i cnt cnt_bits msg
}> // in_msg n query root_i
2 1 BLKDROP2 // in_msg root_i
0 PUSHINT // in_msg root_i _27=0
s0 s1 s2 XCPUXC // root_i _27=0 _28=0 in_msg
}>
dec_flood PROC:<{
// owner_infos creator_i
s0 s1 PUSH2
8 PUSHINT // owner_infos creator_i creator_i owner_infos _4=8
DICTUGET
NULLSWAPIFNOT // owner_infos creator_i _15 _16
DROP // owner_infos creator_i owner_info
unpack_owner_info INLINECALLDICT // owner_infos creator_i public_key flood
DEC // owner_infos creator_i public_key _11
pack_owner_info INLINECALLDICT // owner_infos creator_i _12
s0 s2 XCHG
8 PUSHINT // _12 creator_i owner_infos _13=8
DICTUSETB // owner_infos
}>
try_init PROCREF:<{
//
unpack_state INLINECALLDICT // wallet_id n k last_cleaned owner_infos pending_queries
s0 s2 XCHG // wallet_id n k pending_queries owner_infos last_cleaned
37 THROWIF
ACCEPT
s4 s3 XCHG2
1 PUSHINT
s3 s1 s3 XCHG3 // pending_queries owner_infos _10=1 k n wallet_id
pack_state INLINECALLDICT // _11
c4 POP
}>
update_pending_queries PROCREF:<{
// pending_queries owner_infos msg query_id creator_i cnt cnt_bits n k
s3 s(-1) PUXC // pending_queries owner_infos msg query_id creator_i cnt cnt_bits n cnt k
GEQ // pending_queries owner_infos msg query_id creator_i cnt cnt_bits n _9
IF:<{ // pending_queries owner_infos msg query_id creator_i cnt cnt_bits n
3 BLKDROP // pending_queries owner_infos msg query_id creator_i
ACCEPT
WHILE:<{
s2 PUSH // pending_queries owner_infos msg query_id creator_i msg
SREFS // pending_queries owner_infos msg query_id creator_i _11
}>DO<{ // pending_queries owner_infos msg query_id creator_i
s0 s2 XCHG // pending_queries owner_infos creator_i query_id msg
8 LDU // pending_queries owner_infos creator_i query_id mode msg
LDREF // pending_queries owner_infos creator_i query_id mode _16 msg
s0 s2 XCHG // pending_queries owner_infos creator_i query_id msg _16 mode
SENDRAWMSG
s0 s2 XCHG // pending_queries owner_infos msg query_id creator_i
}> // pending_queries owner_infos msg query_id creator_i
s2 POP // pending_queries owner_infos creator_i query_id
0 PUSHINT // pending_queries owner_infos creator_i query_id _20=0
NEWC // pending_queries owner_infos creator_i query_id _20=0 _21
1 STI // pending_queries owner_infos creator_i query_id _23
s0 s1 s4 XCHG3
64 PUSHINT // creator_i owner_infos _23 query_id pending_queries _24=64
DICTUSETB // creator_i owner_infos pending_queries
s0 s2 XCHG // pending_queries owner_infos creator_i
dec_flood CALLDICT // pending_queries owner_infos
}>ELSE<{ // pending_queries owner_infos msg query_id creator_i cnt cnt_bits n
1 PUSHINT // pending_queries owner_infos msg query_id creator_i cnt cnt_bits n _29=1
NEWC // pending_queries owner_infos msg query_id creator_i cnt cnt_bits n _29=1 _30
1 STU // pending_queries owner_infos msg query_id creator_i cnt cnt_bits n _32
s1 s4 XCHG // pending_queries owner_infos msg query_id n cnt cnt_bits creator_i _32
8 STU // pending_queries owner_infos msg query_id n cnt cnt_bits _34
s1 s2 XCHG // pending_queries owner_infos msg query_id n cnt_bits cnt _34
8 STU // pending_queries owner_infos msg query_id n cnt_bits _36
ROT // pending_queries owner_infos msg query_id cnt_bits _36 n
STUX // pending_queries owner_infos msg query_id _37
ROT // pending_queries owner_infos query_id _37 msg
STSLICER // pending_queries owner_infos query_id _38
s0 s1 s3 XCHG3
64 PUSHINT // owner_infos _38 query_id pending_queries _39=64
DICTUSETB // owner_infos pending_queries
SWAP // pending_queries owner_infos
}>
}>
calc_boc_size PROC:<{
// cells bits root
s0 s2 XCHG // root bits cells
INC // root bits cells
s2 PUSH // root bits cells root
SBITS // root bits cells _5
s1 s2 XCHG // root cells bits _5
ADD // root cells bits
WHILE:<{
s2 PUSH // root cells bits root
SREFS // root cells bits _7
}>DO<{ // root cells bits
s0 s2 XCHG // bits cells root
LDREF // bits cells _8 root
SWAP // bits cells root _8
CTOS // bits cells root _10
s1 s3 XCHG // root cells bits _10
calc_boc_size CALLDICT // root cells bits
}> // root cells bits
1 2 BLKDROP2 // cells bits
}>
recv_external PROC:<{
// in_msg
DUP // in_msg in_msg
SEMPTY // in_msg _1
IFJMP:<{ // in_msg
DROP //
try_init INLINECALLDICT
}> // in_msg
9 PUSHPOW2 // in_msg _5=512
LDSLICEX // root_signature in_msg
DUP // root_signature in_msg in_msg
HASHSU // root_signature in_msg root_hash
SWAP // root_signature root_hash in_msg
8 LDU // root_signature root_hash root_i in_msg
unpack_state INLINECALLDICT // root_signature root_hash root_i in_msg wallet_id n k last_cleaned owner_infos pending_queries
s2 PUSH // root_signature root_hash root_i in_msg wallet_id n k last_cleaned owner_infos pending_queries last_cleaned
0 EQINT // root_signature root_hash root_i in_msg wallet_id n k last_cleaned owner_infos pending_queries _21
s1 s3 XCHG // root_signature root_hash root_i in_msg wallet_id n k pending_queries owner_infos last_cleaned _21
SUB // root_signature root_hash root_i in_msg wallet_id n k pending_queries owner_infos last_cleaned
s7 s1 PUSH2
8 PUSHINT // root_signature root_hash root_i in_msg wallet_id n k pending_queries owner_infos last_cleaned root_i owner_infos _25=8
DICTUGET
NULLSWAPIFNOT // root_signature root_hash root_i in_msg wallet_id n k pending_queries owner_infos last_cleaned owner_info found?
31 THROWIFNOT
unpack_owner_info INLINECALLDICT // root_signature root_hash root_i in_msg wallet_id n k pending_queries owner_infos last_cleaned public_key flood
s10 s11 s10 XC2PU // flood public_key root_i in_msg wallet_id n k pending_queries owner_infos last_cleaned root_hash root_signature public_key
CHKSIGNU // flood public_key root_i in_msg wallet_id n k pending_queries owner_infos last_cleaned _33
32 THROWIFNOT
s0 s6 XCHG // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos in_msg
LDDICT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures in_msg
DUP // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures in_msg in_msg
HASHSU // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures in_msg hash
SWAP // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash in_msg
32 LDU // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_wallet_id in_msg
s1 s8 XCPU // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash in_msg query_wallet_id wallet_id
EQUAL // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash in_msg _45
42 THROWIFNOT
64 LDU // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg
0 PUSHINT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg _53=0
s0 s1 PUSH2 // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg _53=0 _54=0 in_msg
calc_boc_size CALLDICT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg cnt bits
SWAP // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg bits cnt
8 GTINT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg bits _58
SWAP
11 PUSHPOW2 // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg _58 bits _59=2048
GREATER // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg _58 _60
OR // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg _61
40 THROWIF
s1 s5 PUSH2
64 PUSHINT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query_id pending_queries _65=64
DICTUGET
NULLSWAPIFNOT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query found?
DUP // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query found? found?
IFNOT:<{ // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query found?
s0 s14 XCHG // found? public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query flood
INC // found? public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query flood
DUP // found? public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query flood flood
10 GTINT // found? public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query flood _71
39 THROWIF
s0 s14 XCHG // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query found?
}> // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query found?
NOW // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query found? _74
32 LSHIFT# // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query found? bound
s4 s0 PUSH2 // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query found? bound query_id bound
LESS // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id in_msg query found? bound _78
33 THROWIF
s3 s10 s2 XCPUXC
s4 s14 PUSH2 // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound in_msg n query found? root_i
unpack_query_data INLINECALLDICT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt cnt_bits msg
s15 PUSH // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt cnt_bits msg root_i
POW2 // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt cnt_bits msg mask
s2 s0 PUSH2 // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt cnt_bits msg mask cnt_bits mask
AND // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt cnt_bits msg mask _89
34 THROWIF
s1 s2 XCHG // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt msg cnt_bits mask
OR // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt msg cnt_bits
s0 s2 XCHG // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt
INC // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt
s5 PUSH // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt found?
NOT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _95
s1 s12 PUSH2 // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _95 cnt k
LESS // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _95 _96
AND // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _97
s5 PUSH
15461882265600 PUSHINT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _97 bound _102
ADD // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _97 _103
s8 PUSH // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _97 _103 query_id
GREATER // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _97 _104
AND // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _105
41 THROWIF
100000 PUSHINT // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id found? bound creator_i cnt_bits msg cnt _107=100000
SETGASLIMIT
s0 s5 XCHG // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id cnt bound creator_i cnt_bits msg found?
IFNOT:<{ // flood public_key root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id cnt bound creator_i cnt_bits msg
s0 16 s() XCHG
s1 s15 XCHG // msg cnt_bits root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id cnt bound creator_i public_key flood
pack_owner_info INLINECALLDICT // msg cnt_bits root_i last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id cnt bound creator_i _110
s0 s13 s7 XCHG3
8 PUSHINT // msg cnt_bits creator_i last_cleaned wallet_id n k pending_queries bound signatures hash query_id cnt _110 root_i owner_infos _111=8
DICTUSETB // msg cnt_bits creator_i last_cleaned wallet_id n k pending_queries bound signatures hash query_id cnt owner_infos
s11 s13 XCHG
s0 s5 XCHG // creator_i cnt_bits msg last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id cnt bound
}>ELSE<{
s2 16 s() XCHG
s14 POP
s14 POP
DROP // creator_i cnt_bits msg last_cleaned wallet_id n k pending_queries owner_infos signatures hash query_id cnt bound
}>
s6 s5 s11 XC2PU
s3 s14 s7 PUSH3
16 s() PUSH
s13 s12 PUSH2 // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos msg query_id creator_i cnt cnt_bits n k
update_pending_queries INLINECALLDICT // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos
s1 s0 s10 PUSH3
s10 s11 s12 PUSH3 // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos pending_queries owner_infos last_cleaned k n wallet_id
pack_state INLINECALLDICT // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos _114
c4 POP
COMMIT
0 PUSHINT // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos need_save=0
s5 PUSH // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos need_save=0 signatures
ISNULL // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos need_save=0 _119
s8 s9 PUSH2 // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos need_save=0 _119 cnt k
GEQ // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos need_save=0 _119 _120
OR // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos need_save=0 _121
IFNOT:<{ // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos need_save=0
DROP // creator_i cnt_bits msg last_cleaned wallet_id n k cnt bound signatures hash query_id pending_queries owner_infos
s4 s0 s2 XCPUXC
s4 s13 XCHG2 // creator_i query_id msg last_cleaned wallet_id n k cnt bound pending_queries owner_infos owner_infos signatures hash cnt_bits
check_signatures INLINECALLDICT // creator_i query_id msg last_cleaned wallet_id n k cnt bound pending_queries owner_infos new_cnt cnt_bits
s5 s5 XCHG2 // creator_i query_id msg last_cleaned wallet_id n k cnt_bits bound pending_queries owner_infos cnt new_cnt
ADD // creator_i query_id msg last_cleaned wallet_id n k cnt_bits bound pending_queries owner_infos cnt
s6 s5 s0 XCHG3
s4 s9 XCHG
s3 s10 XCHG
s11 s0 s9 XCHG3
s11 s9 PUSH2 // n bound k last_cleaned wallet_id pending_queries owner_infos msg query_id creator_i cnt cnt_bits n k
update_pending_queries INLINECALLDICT // n bound k last_cleaned wallet_id pending_queries owner_infos
s5 s4 XCHG2
s1 s6 XCHG
-1 PUSHINT // bound pending_queries owner_infos last_cleaned wallet_id n k need_save=-1
}>ELSE<{
s6 s14 XCHG
s2 s13 XCHG
s12 s7 XCHG2
7 BLKDROP // bound pending_queries owner_infos last_cleaned wallet_id n k need_save
}>
ACCEPT
s0 s7 XCHG
38 PUSHPOW2 // need_save pending_queries owner_infos last_cleaned wallet_id n k bound _130
SUB // need_save pending_queries owner_infos last_cleaned wallet_id n k bound
UNTIL:<{
s6 PUSH
64 PUSHINT // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries _137=64
DICTUREMMIN
NULLSWAPIFNOT2 // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries' query i f
DUP // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries' query i f f
IF:<{ // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries' query i f
DROP // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries' query i
s0 s3 PUSH2 // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries' query i i bound
LESS // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries' query i f
}> // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries' query i f
DUP // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries' query i f f
IF:<{ // need_save pending_queries owner_infos last_cleaned wallet_id n k bound pending_queries' query i f
s8 POP
s9 POP
s9 POP // query i owner_infos f wallet_id n k bound pending_queries'
s0 s8 XCHG // pending_queries' i owner_infos f wallet_id n k bound query
1 LDI // pending_queries' i owner_infos f wallet_id n k bound _142 query
SWAP // pending_queries' i owner_infos f wallet_id n k bound query _142
IF:<{ // pending_queries' i owner_infos f wallet_id n k bound query
8 LDU // pending_queries' i owner_infos f wallet_id n k bound _195 _194
DROP // pending_queries' i owner_infos f wallet_id n k bound _146
s1 s6 XCHG // pending_queries' i bound f wallet_id n k owner_infos _146
dec_flood CALLDICT // pending_queries' i bound f wallet_id n k owner_infos
s0 s5 XCHG // pending_queries' i owner_infos f wallet_id n k bound
}>ELSE<{
DROP // pending_queries' i owner_infos f wallet_id n k bound
}> // pending_queries last_cleaned owner_infos f wallet_id n k bound
-1 PUSHINT // pending_queries last_cleaned owner_infos f wallet_id n k bound need_save=-1
s0 s8 XCHG
s0 s7 XCHG
s0 s5 XCHG // need_save=-1 pending_queries owner_infos last_cleaned wallet_id n k bound f
}>ELSE<{
3 1 BLKDROP2 // need_save pending_queries owner_infos last_cleaned wallet_id n k bound f
}>
NOT // need_save pending_queries owner_infos last_cleaned wallet_id n k bound _151
}> // need_save pending_queries owner_infos last_cleaned wallet_id n k bound
DROP // need_save pending_queries owner_infos last_cleaned wallet_id n k
s0 s6 XCHG // k pending_queries owner_infos last_cleaned wallet_id n need_save
IF:<{ // k pending_queries owner_infos last_cleaned wallet_id n
s4 s5 XCHG
s3 s4 XCHG
s3 s0 s0 XCHG3 // pending_queries owner_infos last_cleaned k n wallet_id
pack_state INLINECALLDICT // _152
c4 POP
}>ELSE<{
6 BLKDROP //
}>
}>
get_query_state PROC:<{
// query_id
unpack_state INLINECALLDICT // query_id _28 _29 _30 _31 _32 _33
NIP
s2 POP
s3 POP // query_id last_cleaned n pending_queries
s3 s(-1) PUXC
64 PUSHINT // query_id last_cleaned n query_id pending_queries _10=64
DICTUGET
NULLSWAPIFNOT // query_id last_cleaned n cs found
IFJMP:<{ // query_id last_cleaned n cs
2 2 BLKDROP2 // n cs
1 LDI // n _12 cs
SWAP // n cs _12
IFJMP:<{ // n cs
16 LDU // n _39 _38
NIP // n cs
0 PUSHINT // n cs _20=0
s0 s2 XCHG // _20=0 cs n
LDUX // _20=0 _41 _40
DROP // _20=0 _21
}> // n cs
2DROP //
-1 PUSHINT // _23=-1
0 PUSHINT // _23=-1 _24=0
}> // query_id last_cleaned n cs
2DROP // query_id last_cleaned
LEQ // _25
NEGATE // _26
0 PUSHINT // _26 _27=0
}>
processed? PROC:<{
// query_id
get_query_state CALLDICT // _4 _5
DROP // x
}>
create_init_state PROC:<{
// wallet_id n k owners_info
NEWDICT // wallet_id n k owners_info _4
s3 s4 XCHG2
0 PUSHINT
3 -ROLL // _4 owners_info _5=0 k n wallet_id
pack_state INLINECALLDICT // _6
}>
merge_list PROC:<{
// a b
OVER // a b a
ISNULL // a b _2
IFJMP:<{ // a b
NIP // b
}> // a b
DUP // a b b
ISNULL // a b _3
IFJMP:<{ // a b
DROP // a
}> // a b
SWAP // b a
CTOS // b as
DUP // b as as
SREFS // b as _6
0 NEQINT // b as _8
IFJMP:<{ // b as
LDREF // b _10 as
s0 s2 XCHG // as _10 b
merge_list CALLDICT // as tail
NEWC
ROT // tail _13 as
STSLICER // tail _14
STREF // _15
ENDC // _16
}> // b as
1 PUSHINT // b as _18=1
SDSKIPLAST // b as
NEWC // b as _20
SWAP // b _20 as
STSLICER // b _21
STDICT // _22
ENDC // _23
}>
get_public_keys PROC:<{
//
unpack_state INLINECALLDICT // _7 _8 _9 _10 _11 _12
s1 s5 XCHG
5 BLKDROP // public_keys
}>
check_query_signatures PROC:<{
// query
CTOS // cs
9 PUSHPOW2 // cs _5=512
LDSLICEX // root_signature cs
DUP // root_signature cs cs
HASHSU // root_signature cs root_hash
SWAP // root_signature root_hash cs
8 LDU // root_signature root_hash root_i cs
get_public_keys CALLDICT // root_signature root_hash root_i cs public_keys
s2 s0 PUSH2
8 PUSHINT // root_signature root_hash root_i cs public_keys root_i public_keys _17=8
DICTUGET
NULLSWAPIFNOT // root_signature root_hash root_i cs public_keys public_key found?
31 THROWIFNOT
256 PLDU // root_signature root_hash root_i cs public_keys _23
5 1 REVERSE // public_keys cs root_i root_hash root_signature _23
CHKSIGNU // public_keys cs root_i _24
32 THROWIFNOT
POW2 // public_keys cs mask
SWAP // public_keys mask cs
LDDICT // public_keys mask signatures cs
OVER // public_keys mask signatures cs signatures
ISNULL // public_keys mask signatures cs _32
IFJMP:<{ // public_keys mask signatures cs
2DROP
1 PUSHINT
s2 POP // _33=1 mask
}> // public_keys mask signatures cs
HASHSU // public_keys mask signatures _35
ROT // public_keys signatures _35 mask
check_signatures INLINECALLDICT // cnt mask
SWAP // mask cnt
INC // mask _38
SWAP // _38 mask
}>
messages_by_mask PROC:<{
// mask
unpack_state INLINECALLDICT // mask _32 _33 _34 _35 _36 _37
s5 POP
3 BLKDROP // mask pending_queries n
-1 PUSHINT // mask pending_queries n i=-1
NEWDICT // mask pending_queries n i=-1 a
UNTIL:<{
s1 s3 XCPU
64 PUSHINT // mask pending_queries n a i pending_queries _14=64
DICTUGETNEXT
NULLSWAPIFNOT2 // mask pending_queries n a cs i f
DUP // mask pending_queries n a cs i f f
IF:<{ // mask pending_queries n a cs i f
s0 s2 XCHG // mask pending_queries n a f i cs
1 LDI // mask pending_queries n a f i _16 cs
SWAP // mask pending_queries n a f i cs _16
IF:<{ // mask pending_queries n a f i cs
DUP
16 PUSHINT // mask pending_queries n a f i cs cs _22
SDSKIPFIRST // mask pending_queries n a f i cs _23
s5 PUSH // mask pending_queries n a f i cs _23 n
PLDUX // mask pending_queries n a f i cs cnt_bits
s7 PUSH // mask pending_queries n a f i cs cnt_bits mask
AND // mask pending_queries n a f i cs _25
IF:<{ // mask pending_queries n a f i cs
NEWC // mask pending_queries n a f i cs _27
SWAP // mask pending_queries n a f i _27 cs
STSLICER // mask pending_queries n a f i _28
s0 s0 s3 XCPUXC
64 PUSHINT // mask pending_queries n i f _28 i a _29=64
DICTUSETB // mask pending_queries n i f a
s0 s2 XCHG // mask pending_queries n a f i
}>ELSE<{
DROP // mask pending_queries n a f i
}>
}>ELSE<{
DROP // mask pending_queries n a f i
}>
}>ELSE<{
s2 POP // mask pending_queries n a f i
}>
SWAP // mask pending_queries n a i f
NOT // mask pending_queries n a i _31
s1 s2 XCHG // mask pending_queries n i a _31
}> // mask pending_queries n i a
4 1 BLKDROP2 // a
}>
get_messages_unsigned_by_id PROC:<{
// id
POW2 // _2
messages_by_mask CALLDICT // _3
}>
get_messages_unsigned PROC:<{
//
0 PUSHINT // _0=0
NOT // _1
messages_by_mask CALLDICT // _2
}>
get_n_k PROC:<{
//
unpack_state INLINECALLDICT // _7 _8 _9 _10 _11 _12
3 BLKDROP
1 2 BLKDROP2 // n k
}>
merge_inner_queries PROC:<{
// a b
SWAP // b a
CTOS // b ca
SWAP // ca b
CTOS // ca cb
SWAP // cb ca
LDDICT // cb list_a ca
s0 s2 XCHG // ca list_a cb
LDDICT // ca list_a list_b cb
s3 PUSH // ca list_a list_b cb ca
HASHSU // ca list_a list_b cb _13
SWAP // ca list_a list_b _13 cb
HASHSU // ca list_a list_b _13 _14
EQUAL // ca list_a list_b _15
31 THROWIFNOT
merge_list CALLDICT // ca _17
NEWC // ca _17 _18
STDICT // ca _19
SWAP // _19 ca
STSLICER // _20
ENDC // _21
}>
}END>c