2020-04-23 23:29:22 +04:00

2415 lines
141 KiB
Plaintext

// automatically generated from `smartcont/stdlib.fc` `smartcont/elector-code.fc`
PROGRAM{
DECLPROC load_data
DECLPROC store_data
DECLPROC unpack_elect
DECLPROC pack_elect
DECLPROC unpack_past_election
DECLPROC pack_past_election
DECLPROC unpack_complaint_status
DECLPROC pack_complaint_status
DECLPROC unpack_complaint
DECLPROC pack_complaint
DECLPROC parse_complaint_prices
DECLPROC get_complaint_prices
DECLPROC get_validator_conf
DECLPROC get_current_vset
DECLPROC get_validator_descr
DECLPROC unpack_validator_descr
DECLPROC send_message_back
DECLPROC return_stake
DECLPROC send_confirmation
DECLPROC send_validator_set_to_config
DECLPROC ~credit_to
DECLPROC process_new_stake
DECLPROC unfreeze_without_bonuses
DECLPROC unfreeze_with_bonuses
DECLPROC unfreeze_all
DECLPROC config_set_confirmed
DECLPROC process_simple_transfer
DECLPROC recover_stake
1666 DECLMETHOD after_code_upgrade
DECLPROC upgrade_code
DECLPROC register_complaint
DECLPROC punish
DECLPROC register_vote
DECLPROC proceed_register_vote
DECLPROC recv_internal
DECLPROC postpone_elections
DECLPROC compute_total_stake
DECLPROC try_elect
DECLPROC conduct_elections
DECLPROC update_active_vset_id
DECLPROC cell_hash_eq?
DECLPROC validator_set_installed
DECLPROC check_unfreeze
DECLPROC announce_new_elections
DECLPROC run_ticktock
86535 DECLMETHOD active_election_id
87852 DECLMETHOD participates_in
123541 DECLMETHOD participant_list
86698 DECLMETHOD participant_list_extended
130944 DECLMETHOD compute_returned_stake
104565 DECLMETHOD past_election_ids
81558 DECLMETHOD past_elections
74376 DECLMETHOD past_elections_list
DECLPROC complete_unpack_complaint
DECLPROC get_past_complaints
77853 DECLMETHOD show_complaint
70210 DECLMETHOD list_complaints
load_data PROCREF:<{
//
c4 PUSH // _1
CTOS // cs
LDDICT // _4 cs
LDDICT // _4 _6 cs
LDDICT // _4 _6 _8 cs
LDGRAMS // _4 _6 _8 _10 cs
32 LDU // _4 _6 _8 _10 _12 cs
256 LDU // res res res res res res cs
ENDS
}>
store_data PROCREF:<{
// elect credits past_elections grams active_id active_hash
s0 s5 XCHG
NEWC // active_hash credits past_elections grams active_id elect _6
STDICT // active_hash credits past_elections grams active_id _7
s1 s4 XCHG // active_hash active_id past_elections grams credits _7
STDICT // active_hash active_id past_elections grams _8
s1 s2 XCHG // active_hash active_id grams past_elections _8
STDICT // active_hash active_id grams _9
SWAP // active_hash active_id _9 grams
STGRAMS // active_hash active_id _10
32 STU // active_hash _12
256 STU // _14
ENDC // _15
c4 POP
}>
unpack_elect PROCREF:<{
// elect
CTOS // es
32 LDU // _4 es
32 LDU // _4 _7 es
LDGRAMS // _4 _7 _10 es
LDGRAMS // _4 _7 _10 _12 es
LDDICT // _4 _7 _10 _12 _14 es
1 LDI // _4 _7 _10 _12 _14 _16 es
1 LDI // res res res res res res res es
ENDS
}>
pack_elect PROCREF:<{
// elect_at elect_close min_stake total_stake members failed finished
s0 s6 XCHG
NEWC // finished elect_close min_stake total_stake members failed elect_at _7
32 STU // finished elect_close min_stake total_stake members failed _9
s1 s5 XCHG // finished failed min_stake total_stake members elect_close _9
32 STU // finished failed min_stake total_stake members _11
s0 s3 XCHG2 // finished failed members total_stake _11 min_stake
STGRAMS // finished failed members total_stake _12
SWAP // finished failed members _12 total_stake
STGRAMS // finished failed members _13
STDICT // finished failed _14
1 STI // finished _16
1 STI // _18
ENDC // _19
}>
unpack_past_election PROCREF:<{
// fs
32 LDU // _2 fs
32 LDU // _2 _5 fs
256 LDU // _2 _5 _8 fs
LDDICT // _2 _5 _8 _11 fs
LDGRAMS // _2 _5 _8 _11 _13 fs
LDGRAMS // _2 _5 _8 _11 _13 _15 fs
LDDICT // res res res res res res res fs
ENDS
}>
pack_past_election PROCREF:<{
// unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses complaints
s0 s6 XCHG
NEWC // complaints stake_held vset_hash frozen_dict total_stake bonuses unfreeze_at _7
32 STU // complaints stake_held vset_hash frozen_dict total_stake bonuses _9
s1 s5 XCHG // complaints bonuses vset_hash frozen_dict total_stake stake_held _9
32 STU // complaints bonuses vset_hash frozen_dict total_stake _11
s1 s3 XCHG // complaints bonuses total_stake frozen_dict vset_hash _11
256 STU // complaints bonuses total_stake frozen_dict _13
STDICT // complaints bonuses total_stake _14
SWAP // complaints bonuses _14 total_stake
STGRAMS // complaints bonuses _15
SWAP // complaints _15 bonuses
STGRAMS // complaints _16
STDICT // _17
}>
unpack_complaint_status PROCREF:<{
// cs
8 LDU // _2 cs
SWAP // cs _2
45 EQINT // cs _6
9 THROWIFNOT
LDREF // _9 cs
LDDICT // _9 _11 cs
256 LDU // _9 _11 _13 cs
64 LDI // res res res res cs
ENDS
}>
pack_complaint_status PROCREF:<{
// complaint voters vset_id weight_remaining
45 PUSHINT // complaint voters vset_id weight_remaining _4=45
NEWC // complaint voters vset_id weight_remaining _4=45 _5
8 STU // complaint voters vset_id weight_remaining _7
s1 s4 XCHG // weight_remaining voters vset_id complaint _7
STREF // weight_remaining voters vset_id _8
s1 s2 XCHG // weight_remaining vset_id voters _8
STDICT // weight_remaining vset_id _9
256 STU // weight_remaining _11
64 STI // _13
}>
unpack_complaint PROCREF:<{
// cs
8 LDI // _2 cs
SWAP // cs _2
-68 EQINT // cs _8
9 THROWIFNOT
256 LDU // _11 cs
LDREF // _11 _14 cs
32 LDU // _11 _14 _16 cs
8 LDU // _11 _14 _16 _19 cs
256 LDU // _11 _14 _16 _19 _22 cs
LDGRAMS // _11 _14 _16 _19 _22 _25 cs
LDGRAMS // _11 _14 _16 _19 _22 _25 _27 cs
32 LDU // res res res res res res res res cs
ENDS
}>
pack_complaint PROCREF:<{
// validator_pubkey description created_at severity reward_addr paid suggested_fine suggested_fine_part
-68 PUSHINT // validator_pubkey description created_at severity reward_addr paid suggested_fine suggested_fine_part _10
NEWC // validator_pubkey description created_at severity reward_addr paid suggested_fine suggested_fine_part _10 _11
8 STI // validator_pubkey description created_at severity reward_addr paid suggested_fine suggested_fine_part _13
s1 s8 XCHG // suggested_fine_part description created_at severity reward_addr paid suggested_fine validator_pubkey _13
256 STU // suggested_fine_part description created_at severity reward_addr paid suggested_fine _15
s1 s6 XCHG // suggested_fine_part suggested_fine created_at severity reward_addr paid description _15
STREF // suggested_fine_part suggested_fine created_at severity reward_addr paid _16
s1 s4 XCHG // suggested_fine_part suggested_fine paid severity reward_addr created_at _16
32 STU // suggested_fine_part suggested_fine paid severity reward_addr _18
s1 s2 XCHG // suggested_fine_part suggested_fine paid reward_addr severity _18
8 STU // suggested_fine_part suggested_fine paid reward_addr _20
256 STU // suggested_fine_part suggested_fine paid _22
SWAP // suggested_fine_part suggested_fine _22 paid
STGRAMS // suggested_fine_part suggested_fine _23
SWAP // suggested_fine_part _23 suggested_fine
STGRAMS // suggested_fine_part _24
32 STU // _26
}>
parse_complaint_prices PROC:<{
// info
CTOS // cs
8 LDU // _4 cs
SWAP // cs _4
26 EQINT // cs _8
9 THROWIFNOT
LDGRAMS // _11 cs
LDGRAMS // _11 _13 cs
LDGRAMS // res res res cs
ENDS
}>
get_complaint_prices PROCREF:<{
//
13 PUSHINT // _1=13
CONFIGOPTPARAM // info
DUP // info info
ISNULL // info _3
IF:<{ // info
DROP //
36 PUSHPOW2 // _7
1 PUSHINT // _7 _8=1
9 PUSHPOW2 // _11 _12=1 _13=512
}>ELSE<{ // info
parse_complaint_prices INLINECALLDICT // _11 _12 _13
}>
}>
get_validator_conf PROC:<{
//
15 PUSHINT // _1=15
CONFIGOPTPARAM // _2
CTOS // cs
32 LDI // _4 cs
32 LDI // _4 _7 cs
32 LDI // _4 _7 _10 cs
32 PLDI // _4 _7 _10 _14
}>
get_current_vset PROCREF:<{
//
34 PUSHINT // _1=34
CONFIGOPTPARAM // vset
DUP // vset vset
CTOS // vset cs
8 LDU // vset _6 cs
SWAP // vset cs _6
18 EQINT // vset cs _10
40 THROWIFNOT
96 PUSHINT // vset cs _19
SDSKIPFIRST // vset cs
64 LDU // vset _23 cs
LDDICT // vset total_weight dict cs
ENDS
}>
get_validator_descr PROCREF:<{
// idx
get_current_vset INLINECALLDICT // idx _9 _10 _11
s2 POP // idx dict total_weight
-ROT
16 PUSHINT // total_weight idx dict _7=16
DICTUGET
NULLSWAPIFNOT // total_weight _12 _13
DROP // total_weight value
SWAP // value total_weight
}>
unpack_validator_descr PROC:<{
// cs
8 LDU // _2 cs
32 PUSHINT // _2 cs _5=32
NOT // _2 cs _6
s1 s2 XCHG // cs _2 _6
AND // cs _7
83 EQINT // cs _9
41 THROWIFNOT
32 LDU // _12 cs
SWAP
2390828938 PUSHINT // cs _12 _15=2390828938
EQUAL // cs _16
41 THROWIFNOT
256 LDU // _18 cs
64 LDU // _18 _31 _30
DROP // _18 _21
}>
send_message_back PROCREF:<{
// addr ans_tag query_id body grams mode
0 PUSHINT // addr ans_tag query_id body grams mode _7=0
24 PUSHINT // addr ans_tag query_id body grams mode _7=0 _8=24
NEWC // addr ans_tag query_id body grams mode _7=0 _8=24 _9
6 STU // addr ans_tag query_id body grams mode _7=0 _11
s0 s7 XCHG2 // _7=0 ans_tag query_id body grams mode _11 addr
STSLICER // _7=0 ans_tag query_id body grams mode _12
ROT // _7=0 ans_tag query_id body mode _12 grams
STGRAMS // _7=0 ans_tag query_id body mode _13
s1 s5 XCHG // mode ans_tag query_id body _7=0 _13
107 STU // mode ans_tag query_id body _27
s1 s3 XCHG // mode body query_id ans_tag _27
32 STU // mode body query_id _29
64 STU // mode body msg
OVER // mode body msg body
-1 GTINT // mode body msg _33
IF:<{ // mode body msg
32 STU // mode msg
}>ELSE<{
NIP // mode msg
}>
ENDC // mode _37
SWAP // _37 mode
SENDRAWMSG
}>
return_stake PROCREF:<{
// addr query_id reason
4000269644 PUSHINT // addr query_id reason _3=4000269644
-ROT
0 PUSHINT
64 PUSHINT // addr _3=4000269644 query_id reason _4=0 _5=64
send_message_back INLINECALLDICT
}>
send_confirmation PROCREF:<{
// addr query_id comment
4084484172 PUSHINT // addr query_id comment _3=4084484172
-ROT
1000000000 PUSHINT
2 PUSHINT // addr _3=4084484172 query_id comment _4=1000000000 _5=2
send_message_back INLINECALLDICT
}>
send_validator_set_to_config PROCREF:<{
// config_addr vset query_id
1314280276 PUSHINT // config_addr vset query_id _4=1314280276
0 PUSHINT // config_addr vset query_id _4=1314280276 _5=0
50431 PUSHINT // config_addr vset query_id _4=1314280276 _5=0 _6=50431
NEWC // config_addr vset query_id _4=1314280276 _5=0 _6=50431 _7
17 STU // config_addr vset query_id _4=1314280276 _5=0 _9
s1 s5 XCHG // _5=0 vset query_id _4=1314280276 config_addr _9
256 STU // _5=0 vset query_id _4=1314280276 _11
30 PUSHPOW2 // _5=0 vset query_id _4=1314280276 _11 _14
STGRAMS // _5=0 vset query_id _4=1314280276 _15
s1 s4 XCHG // _4=1314280276 vset query_id _5=0 _15
107 STU // _4=1314280276 vset query_id _29
s1 s3 XCHG // query_id vset _4=1314280276 _29
32 STU // query_id vset _31
s1 s2 XCHG // vset query_id _31
64 STU // vset _33
STREF // msg
ENDC // _35
1 PUSHINT // _35 _36=1
SENDRAWMSG
}>
~credit_to PROCREF:<{
// credits addr amount
s1 s2 PUSH2
8 PUSHPOW2 // credits addr amount addr credits _5=256
DICTUGET
NULLSWAPIFNOT // credits addr amount val f
IF:<{ // credits addr amount val
LDGRAMS // credits addr amount _18 _17
DROP // credits addr amount _7
ADD // credits addr amount
}>ELSE<{
DROP // credits addr amount
}>
NEWC // credits addr amount _11
SWAP // credits addr _11 amount
STGRAMS // credits addr _12
s0 s2 XCHG
8 PUSHPOW2 // _12 addr credits _13=256
DICTUSETB // credits
}>
process_new_stake PROCREF:<{
// s_addr msg_value cs query_id
s3 PUSH // s_addr msg_value cs query_id s_addr
REWRITESTDADDR // s_addr msg_value cs query_id src_wc src_addr
c4 PUSH // s_addr msg_value cs query_id src_wc src_addr _8
CTOS // s_addr msg_value cs query_id src_wc src_addr ds
LDDICT // s_addr msg_value cs query_id src_wc src_addr elect ds
OVER // s_addr msg_value cs query_id src_wc src_addr elect ds elect
ISNULL // s_addr msg_value cs query_id src_wc src_addr elect ds _13
s0 s4 XCHG // s_addr msg_value cs query_id _13 src_addr elect ds src_wc
INC // s_addr msg_value cs query_id _13 src_addr elect ds _15
s1 s4 XCHG // s_addr msg_value cs query_id ds src_addr elect _13 _15
OR // s_addr msg_value cs query_id ds src_addr elect _16
IFJMP:<{ // s_addr msg_value cs query_id ds src_addr elect
s3 s5 XCHG
5 BLKDROP // s_addr query_id
0 PUSHINT // s_addr query_id _17=0
return_stake INLINECALLDICT
}> // s_addr msg_value cs query_id ds src_addr elect
s0 s4 XCHG // s_addr msg_value elect query_id ds src_addr cs
256 LDU // s_addr msg_value elect query_id ds src_addr validator_pubkey cs
32 LDU // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at cs
32 LDU // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor cs
256 LDU // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr cs
LDREF // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr _36 cs
SWAP // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr cs _36
CTOS // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr cs _38
9 PUSHPOW2 // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr cs _38 _39=512
PLDSLICEX // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr cs signature
SWAP // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature cs
ENDS
1699500148 PUSHINT // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature _42=1699500148
NEWC // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature _42=1699500148 _43
32 STU // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature _45
s4 s(-1) PUXC // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature stake_at _45
32 STU // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature _47
s3 s(-1) PUXC // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature max_factor _47
32 STU // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature _49
s6 s(-1) PUXC // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature src_addr _49
256 STU // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature _51
s2 s(-1) PUXC // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature adnl_addr _51
256 STU // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature _53
ENDC // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature _54
CTOS // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr signature _55
s1 s5 XCPU // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr _55 signature validator_pubkey
CHKSIGNS // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr _56
IFNOTJMP:<{ // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr
s6 s8 XCHG
8 BLKDROP // s_addr query_id
1 PUSHINT // s_addr query_id _57=1
return_stake INLINECALLDICT
}> // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr
OVER
16 PUSHPOW2 // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr max_factor _59=65536
LESS // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr _60
IFJMP:<{ // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr
s6 s8 XCHG
8 BLKDROP // s_addr query_id
6 PUSHINT // s_addr query_id _61=6
return_stake INLINECALLDICT
}> // s_addr msg_value elect query_id ds src_addr validator_pubkey stake_at max_factor adnl_addr
s0 s7 XCHG // s_addr msg_value adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect
unpack_elect INLINECALLDICT // s_addr msg_value adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor _144 _145 _146 _147 _148 _149 _150
NIP // s_addr msg_value adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake total_stake members finished
s0 s13 XCHG
1000000000 PUSHINT // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake total_stake members msg_value _71=1000000000
SUB // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake total_stake members msg_value
DUP // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake total_stake members msg_value msg_value
12 LSHIFT# // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake total_stake members msg_value _74
s3 PUSH // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake total_stake members msg_value _74 total_stake
LESS // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake total_stake members msg_value _75
IFJMP:<{ // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake total_stake members msg_value
s11 s13 XCHG
13 BLKDROP // s_addr query_id
2 PUSHINT // s_addr query_id _76=2
return_stake INLINECALLDICT
}> // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake total_stake members msg_value
s2 s2 XCPU // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake msg_value members total_stake msg_value
ADD // s_addr finished adnl_addr query_id ds src_addr validator_pubkey stake_at max_factor elect_at elect_close min_stake msg_value members total_stake
s7 s5 XCPU // s_addr finished adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value members stake_at elect_at
NEQ // s_addr finished adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value members _79
IFJMP:<{ // s_addr finished adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value members
s10 s12 XCHG
12 BLKDROP // s_addr query_id
3 PUSHINT // s_addr query_id _80=3
return_stake INLINECALLDICT
}> // s_addr finished adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value members
s0 s12 XCHG // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value finished
IFJMP:<{ // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value
s9 s11 XCHG
11 BLKDROP // s_addr query_id
0 PUSHINT // s_addr query_id _82=0
return_stake INLINECALLDICT
}> // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value
s6 s11 PUSH2
8 PUSHPOW2 // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value validator_pubkey members _86=256
DICTUGET
NULLSWAPIFNOT // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value mem found
DUP // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value mem found found
IF:<{ // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value mem found
DROP // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value mem
LDGRAMS // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value _88 mem
-ROT // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake mem msg_value _88
ADD // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake mem msg_value
SWAP // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value mem
64 LDU // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value _156 _155
NIP // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value mem
256 LDU // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value _158 _157
DROP // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value _94
s8 s(-1) PUXC // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value src_addr _94
NEQ // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value found
}>ELSE<{
NIP // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value found
}>
IFJMP:<{ // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value
s9 s11 XCHG
11 BLKDROP // s_addr query_id
4 PUSHINT // s_addr query_id _98=4
return_stake INLINECALLDICT
}> // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value
s0 s1 PUSH2 // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value msg_value min_stake
LESS // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value _100
IFJMP:<{ // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value
s9 s11 XCHG
11 BLKDROP // s_addr query_id
5 PUSHINT // s_addr query_id _101=5
return_stake INLINECALLDICT
}> // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value
DUP // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value msg_value
44 THROWIFNOT
ACCEPT
NOW // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake msg_value _107
NEWC
ROT // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake _107 _108 msg_value
STGRAMS // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake _107 _109
32 STU // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake max_factor elect_at elect_close min_stake _111
s1 s4 XCHG // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake min_stake elect_at elect_close max_factor _111
32 STU // s_addr members adnl_addr query_id ds src_addr validator_pubkey total_stake min_stake elect_at elect_close _113
s1 s6 XCHG // s_addr members adnl_addr query_id ds elect_close validator_pubkey total_stake min_stake elect_at src_addr _113
256 STU // s_addr members adnl_addr query_id ds elect_close validator_pubkey total_stake min_stake elect_at _115
s1 s8 XCHG // s_addr members elect_at query_id ds elect_close validator_pubkey total_stake min_stake adnl_addr _115
256 STU // s_addr members elect_at query_id ds elect_close validator_pubkey total_stake min_stake _117
s0 s3 s8 XCHG3
8 PUSHPOW2 // s_addr total_stake elect_at query_id ds elect_close min_stake _117 validator_pubkey members _118=256
DICTUSETB // s_addr total_stake elect_at query_id ds elect_close min_stake members
s4 s5 XCHG
s1 s3 s0 XCHG3
s1 s6 XCHG
FALSE
FALSE // s_addr ds query_id elect_at elect_close min_stake total_stake members _120 _121
pack_elect INLINECALLDICT // s_addr ds query_id elect
NEWC // s_addr ds query_id elect _123
STDICT // s_addr ds query_id _124
ROT // s_addr query_id _124 ds
STSLICER // s_addr query_id _125
ENDC // s_addr query_id _126
c4 POP
DUP // s_addr query_id query_id
IFJMP:<{ // s_addr query_id
0 PUSHINT // s_addr query_id _128=0
send_confirmation INLINECALLDICT
}> // s_addr query_id
2DROP //
}>
unfreeze_without_bonuses PROCREF:<{
// credits freeze_dict tot_stakes
0 PUSHINT // credits freeze_dict tot_stakes _5=0
DUP // credits freeze_dict tot_stakes total=0 recovered=0
-1 PUSHINT // credits freeze_dict tot_stakes total=0 recovered=0 pubkey=-1
UNTIL:<{
s4 PUSH
8 PUSHPOW2 // credits freeze_dict tot_stakes total recovered pubkey freeze_dict _10=256
DICTUGETNEXT
NULLSWAPIFNOT2 // credits freeze_dict tot_stakes total recovered cs pubkey f
DUP // credits freeze_dict tot_stakes total recovered cs pubkey f f
IF:<{ // credits freeze_dict tot_stakes total recovered cs pubkey f
s0 s2 XCHG // credits freeze_dict tot_stakes total recovered f pubkey cs
256 LDU // credits freeze_dict tot_stakes total recovered f pubkey _16 cs
64 LDU // credits freeze_dict tot_stakes total recovered f pubkey _16 _42 _41
NIP // credits freeze_dict tot_stakes total recovered f pubkey _16 cs
LDGRAMS // credits freeze_dict tot_stakes total recovered f pubkey _16 _22 cs
1 LDI // credits freeze_dict tot_stakes total recovered f pubkey addr stake banned cs
ENDS
IF:<{ // credits freeze_dict tot_stakes total recovered f pubkey addr stake
NIP // credits freeze_dict tot_stakes total recovered f pubkey stake
s3 s3 XCPU // credits freeze_dict tot_stakes total stake f pubkey recovered stake
ADD // credits freeze_dict tot_stakes total stake f pubkey recovered
}>ELSE<{ // credits freeze_dict tot_stakes total recovered f pubkey addr stake
s8 s8 s8 XC2PU // stake freeze_dict tot_stakes total recovered f pubkey credits addr stake
~credit_to INLINECALLDICT // stake freeze_dict tot_stakes total recovered f pubkey credits
s0 s7 XCHG
s0 s3 XCHG // credits freeze_dict tot_stakes total stake f pubkey recovered
}>
s4 s3 XCHG2 // credits freeze_dict tot_stakes pubkey recovered f total stake
ADD // credits freeze_dict tot_stakes pubkey recovered f total
s0 s3 XCHG // credits freeze_dict tot_stakes total recovered f pubkey
}>ELSE<{
s2 POP // credits freeze_dict tot_stakes total recovered f pubkey
}>
SWAP // credits freeze_dict tot_stakes total recovered pubkey f
NOT // credits freeze_dict tot_stakes total recovered pubkey _32
}> // credits freeze_dict tot_stakes total recovered pubkey
DROP
s3 POP // credits recovered tot_stakes total
SWAP // credits recovered total tot_stakes
EQUAL // credits recovered _34
59 THROWIFNOT
}>
unfreeze_with_bonuses PROCREF:<{
// credits freeze_dict tot_stakes tot_bonuses
0 PUSHINT // credits freeze_dict tot_stakes tot_bonuses _7=0
s0 s0 PUSH2 // credits freeze_dict tot_stakes tot_bonuses total=0 returned_bonuses=0 recovered=0
-1 PUSHINT // credits freeze_dict tot_stakes tot_bonuses total=0 returned_bonuses=0 recovered=0 pubkey=-1
UNTIL:<{
s6 PUSH
8 PUSHPOW2 // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered pubkey freeze_dict _12=256
DICTUGETNEXT
NULLSWAPIFNOT2 // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered cs pubkey f
DUP // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered cs pubkey f f
IF:<{ // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered cs pubkey f
s0 s2 XCHG // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey cs
256 LDU // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey _18 cs
64 LDU // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey _18 _52 _51
NIP // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey _18 cs
LDGRAMS // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey _18 _24 cs
1 LDI // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey addr stake banned cs
ENDS
IF:<{ // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey addr stake
NIP // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey stake
s3 s3 XCPU // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses stake f pubkey recovered stake
ADD // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses stake f pubkey recovered
}>ELSE<{ // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey addr stake
s7 s0 s8 PUSH3 // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey addr stake tot_bonuses stake tot_stakes
MULDIV // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey addr stake bonus
s6 s6 XCPU // credits freeze_dict tot_stakes tot_bonuses total bonus recovered f pubkey addr stake returned_bonuses bonus
ADD // credits freeze_dict tot_stakes tot_bonuses total bonus recovered f pubkey addr stake returned_bonuses
s1 s6 PUXC // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey addr stake stake bonus
ADD // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey addr stake _35
s11 s11 s0 XCHG3 // stake freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey credits addr _35
~credit_to INLINECALLDICT // stake freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey credits
s0 s9 XCHG
s0 s3 XCHG // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses stake f pubkey recovered
}>
s5 s3 XCHG2 // credits freeze_dict tot_stakes tot_bonuses pubkey returned_bonuses recovered f total stake
ADD // credits freeze_dict tot_stakes tot_bonuses pubkey returned_bonuses recovered f total
s0 s4 XCHG // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey
}>ELSE<{
s2 POP // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered f pubkey
}>
SWAP // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered pubkey f
NOT // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered pubkey _38
}> // credits freeze_dict tot_stakes tot_bonuses total returned_bonuses recovered pubkey
DROP
s5 POP // credits recovered tot_stakes tot_bonuses total returned_bonuses
s0 s3 XCHG // credits recovered returned_bonuses tot_bonuses total tot_stakes
EQUAL // credits recovered returned_bonuses tot_bonuses _40
s2 s1 PUSH2 // credits recovered returned_bonuses tot_bonuses _40 returned_bonuses tot_bonuses
LEQ // credits recovered returned_bonuses tot_bonuses _40 _41
AND // credits recovered returned_bonuses tot_bonuses _42
59 THROWIFNOT
s1 s2 XCHG // credits returned_bonuses recovered tot_bonuses
ADD // credits returned_bonuses _44
SWAP // credits _44 returned_bonuses
SUB // credits _45
}>
unfreeze_all PROCREF:<{
// credits past_elections elect_id
SWAP
32 PUSHINT // credits elect_id past_elections _6=32
DICTUDELGET
NULLSWAPIFNOT // credits past_elections fs f
IFNOTJMP:<{ // credits past_elections fs
DROP // credits past_elections
0 PUSHINT // credits past_elections _8=0
}> // credits past_elections fs
unpack_past_election INLINECALLDICT // credits past_elections _30 _31 _32 _33 _34 _35 _36
DROP
3 3 BLKDROP2 // credits past_elections fdict tot_stakes bonuses
DUP // credits past_elections fdict tot_stakes bonuses bonuses
0 GTINT // credits past_elections fdict tot_stakes bonuses _19
IF:<{ // credits past_elections fdict tot_stakes bonuses
s3 s4 XCHG // past_elections credits fdict tot_stakes bonuses
unfreeze_with_bonuses INLINECALLDICT // past_elections credits _20
}>ELSE<{ // credits past_elections fdict tot_stakes bonuses
DROP // credits past_elections fdict tot_stakes
s2 s3 XCHG // past_elections credits fdict tot_stakes
unfreeze_without_bonuses INLINECALLDICT // past_elections credits _20
}> // past_elections credits unused_prizes
s1 s2 XCHG // credits past_elections unused_prizes
}>
config_set_confirmed PROCREF:<{
// s_addr cs query_id ok
s2 POP // s_addr ok query_id
s0 s2 XCHG // query_id ok s_addr
REWRITESTDADDR // query_id ok src_wc src_addr
0 PUSHINT // query_id ok src_wc src_addr _8=0
CONFIGOPTPARAM // query_id ok src_wc src_addr _9
CTOS // query_id ok src_wc src_addr _10
256 PLDU // query_id ok src_wc src_addr config_addr
c4 PUSH // query_id ok src_wc src_addr config_addr _14
CTOS // query_id ok src_wc src_addr config_addr ds
LDDICT // query_id ok src_wc src_addr config_addr elect ds
s0 s4 XCHG // query_id ok ds src_addr config_addr elect src_wc
INC // query_id ok ds src_addr config_addr elect _20
2SWAP // query_id ok ds elect _20 src_addr config_addr
NEQ // query_id ok ds elect _20 _21
OR // query_id ok ds elect _22
OVER // query_id ok ds elect _22 elect
ISNULL // query_id ok ds elect _22 _23
OR // query_id ok ds elect _24
IFJMP:<{ // query_id ok ds elect
4 BLKDROP //
}> // query_id ok ds elect
unpack_elect INLINECALLDICT // query_id ok ds _63 _64 _65 _66 _67 _68 _69
5 1 BLKDROP2 // query_id ok ds elect_at finished
s1 s4 PUXC // finished ok ds elect_at elect_at query_id
NEQ // finished ok ds elect_at _33
s0 s4 XCHG // _33 ok ds elect_at finished
NOT // _33 ok ds elect_at _34
s1 s4 XCHG // elect_at ok ds _33 _34
OR // elect_at ok ds _35
IFJMP:<{ // elect_at ok ds
3 BLKDROP //
}> // elect_at ok ds
ACCEPT
SWAP // elect_at ds ok
IFNOT:<{ // elect_at ds
LDDICT // elect_at _40 ds
LDDICT // elect_at _40 _42 ds
LDGRAMS // elect_at credits past_elections grams ds
s3 s3 s4 XCHG3 // ds grams credits past_elections elect_at
unfreeze_all INLINECALLDICT // ds grams credits past_elections unused_prizes
FALSE // ds grams credits past_elections unused_prizes _48
NEWC // ds grams credits past_elections unused_prizes _48 _49
1 STI // ds grams credits past_elections unused_prizes _51
s1 s3 XCHG // ds grams unused_prizes past_elections credits _51
STDICT // ds grams unused_prizes past_elections _52
STDICT // ds grams unused_prizes _53
-ROT // ds _53 grams unused_prizes
ADD // ds _53 _54
STGRAMS // ds _55
SWAP // _55 ds
STSLICER // _56
ENDC // _57
c4 POP
}>ELSE<{
2DROP //
}>
}>
process_simple_transfer PROCREF:<{
// s_addr msg_value
load_data INLINECALLDICT // s_addr msg_value elect credits past_elections grams active_id active_hash
s0 s7 XCHG // active_hash msg_value elect credits past_elections grams active_id s_addr
REWRITESTDADDR // active_hash msg_value elect credits past_elections grams active_id src_wc src_addr
SWAP // active_hash msg_value elect credits past_elections grams active_id src_addr src_wc
INC // active_hash msg_value elect credits past_elections grams active_id src_addr _13
OR // active_hash msg_value elect credits past_elections grams active_id _14
OVER // active_hash msg_value elect credits past_elections grams active_id _14 active_id
0 EQINT // active_hash msg_value elect credits past_elections grams active_id _14 _16
OR // active_hash msg_value elect credits past_elections grams active_id _17
IFJMP:<{ // active_hash msg_value elect credits past_elections grams active_id
s0 s5 XCHG // active_hash active_id elect credits past_elections grams msg_value
ADD // active_hash active_id elect credits past_elections grams
s3 s5 XCHG
2 3 BLKSWAP // elect credits past_elections grams active_id active_hash
store_data INLINECALLDICT
}> // active_hash msg_value elect credits past_elections grams active_id
s0 s2 PUSH2
32 PUSHINT // active_hash msg_value elect credits past_elections grams active_id active_id past_elections _22=32
DICTUGET
NULLSWAPIFNOT // active_hash msg_value elect credits past_elections grams active_id fs f
IF:<{ // active_hash msg_value elect credits past_elections grams active_id fs
unpack_past_election INLINECALLDICT // active_hash msg_value elect credits past_elections grams active_id unfreeze_at stake_held hash dict total_stake bonuses complaints
s0 s12 XCHG // active_hash complaints elect credits past_elections grams active_id unfreeze_at stake_held hash dict total_stake bonuses msg_value
ADD // active_hash complaints elect credits past_elections grams active_id unfreeze_at stake_held hash dict total_stake bonuses
6 ROLL
s0 s11 XCHG // active_hash active_id elect credits past_elections grams unfreeze_at stake_held hash dict total_stake bonuses complaints
pack_past_election INLINECALLDICT // active_hash active_id elect credits past_elections grams _35
s0 s5 s2 XCPUXC
32 PUSHINT // active_hash active_id elect credits grams _35 active_id past_elections _36=32
DICTUSETB // active_hash active_id elect credits grams past_elections
}>ELSE<{ // active_hash msg_value elect credits past_elections grams active_id fs
DROP // active_hash msg_value elect credits past_elections grams active_id
s0 s5 XCHG // active_hash active_id elect credits past_elections grams msg_value
ADD // active_hash active_id elect credits past_elections grams
SWAP // active_hash active_id elect credits grams past_elections
}>
s3 s5 XCHG
s1 s4 s3 XCHG3 // elect credits past_elections grams active_id active_hash
store_data INLINECALLDICT
}>
recover_stake PROCREF:<{
// op s_addr cs query_id
NIP // op s_addr query_id
OVER // op s_addr query_id s_addr
REWRITESTDADDR // op s_addr query_id src_wc src_addr
SWAP // op s_addr query_id src_addr src_wc
INC // op s_addr query_id src_addr _8
IFJMP:<{ // op s_addr query_id src_addr
DROP // op s_addr query_id
4294967294 PUSHINT // op s_addr query_id _9=4294967294
s0 s1 s3 XCHG3
0 PUSHINT
64 PUSHINT // s_addr _9=4294967294 query_id op _10=0 _11=64
send_message_back INLINECALLDICT
}> // op s_addr query_id src_addr
c4 PUSH // op s_addr query_id src_addr _14
CTOS // op s_addr query_id src_addr ds
LDDICT // op s_addr query_id src_addr _18 ds
LDDICT // op s_addr query_id src_addr elect credits ds
s3 s3 XCHG2
8 PUSHPOW2 // op s_addr query_id ds elect src_addr credits _25=256
DICTUDELGET
NULLSWAPIFNOT // op s_addr query_id ds elect credits cs f
IFNOTJMP:<{ // op s_addr query_id ds elect credits cs
4 BLKDROP // op s_addr query_id
4294967294 PUSHINT // op s_addr query_id _27=4294967294
s0 s1 s3 XCHG3
0 PUSHINT
64 PUSHINT // s_addr _27=4294967294 query_id op _28=0 _29=64
send_message_back INLINECALLDICT
}> // op s_addr query_id ds elect credits cs
s6 POP // cs s_addr query_id ds elect credits
s0 s5 XCHG // credits s_addr query_id ds elect cs
LDGRAMS // credits s_addr query_id ds elect amount cs
ENDS
SWAP
NEWC // credits s_addr query_id ds amount elect _35
STDICT // credits s_addr query_id ds amount _36
s1 s5 XCHG // amount s_addr query_id ds credits _36
STDICT // amount s_addr query_id ds _37
SWAP // amount s_addr query_id _37 ds
STSLICER // amount s_addr query_id _38
ENDC // amount s_addr query_id _39
c4 POP
4184830756 PUSHINT // amount s_addr query_id _41=4184830756
0 PUSHINT // amount s_addr query_id _41=4184830756 _42=0
24 PUSHINT // amount s_addr query_id _41=4184830756 _42=0 _43=24
NEWC // amount s_addr query_id _41=4184830756 _42=0 _43=24 _44
6 STU // amount s_addr query_id _41=4184830756 _42=0 _46
s0 s4 XCHG2 // amount _42=0 query_id _41=4184830756 _46 s_addr
STSLICER // amount _42=0 query_id _41=4184830756 _47
s0 s4 XCHG2 // _41=4184830756 _42=0 query_id _47 amount
STGRAMS // _41=4184830756 _42=0 query_id _48
s1 s2 XCHG // _41=4184830756 query_id _42=0 _48
107 STU // _41=4184830756 query_id _62
s1 s2 XCHG // query_id _41=4184830756 _62
32 STU // query_id _64
64 STU // _66
ENDC // _67
64 PUSHINT // _67 _68=64
SENDRAWMSG
}>
after_code_upgrade PROC:<{
// s_addr cs query_id
NIP // s_addr query_id
1313042276 PUSHINT // s_addr query_id op=1313042276
3460525924 PUSHINT // s_addr query_id op=1313042276 _5=3460525924
-ROT
0 PUSHINT
64 PUSHINT // s_addr _5=3460525924 query_id op=1313042276 _6=0 _7=64
send_message_back INLINECALLDICT
}>
upgrade_code PROCREF:<{
// s_addr cs query_id
0 PUSHINT // s_addr cs query_id _4=0
CONFIGOPTPARAM // s_addr cs query_id c_addr
DUP // s_addr cs query_id c_addr c_addr
ISNULL // s_addr cs query_id c_addr _6
IFJMP:<{ // s_addr cs query_id c_addr
4 BLKDROP //
FALSE // _7
}> // s_addr cs query_id c_addr
CTOS // s_addr cs query_id _9
256 PLDU // s_addr cs query_id config_addr
s3 PUSH // s_addr cs query_id config_addr s_addr
REWRITESTDADDR // s_addr cs query_id config_addr src_wc src_addr
SWAP // s_addr cs query_id config_addr src_addr src_wc
INC // s_addr cs query_id config_addr src_addr _16
s0 s2 XCHG // s_addr cs query_id _16 src_addr config_addr
NEQ // s_addr cs query_id _16 _17
OR // s_addr cs query_id _18
IFJMP:<{ // s_addr cs query_id
3 BLKDROP //
FALSE // _19
}> // s_addr cs query_id
ACCEPT
SWAP // s_addr query_id cs
LDREF // s_addr query_id code cs
OVER // s_addr query_id code cs code
SETCODE
DUP // s_addr query_id code cs cs
SEMPTY // s_addr query_id code cs _25
IFNOT:<{ // s_addr query_id code cs
SWAP // s_addr query_id cs code
CTOS // s_addr query_id cs _26
BLESS // s_addr query_id cs _27
c3 POP
SWAP // s_addr cs query_id
after_code_upgrade CALLDICT
0 THROW
}>ELSE<{
4 BLKDROP //
}>
TRUE // _32
}>
register_complaint PROC:<{
// s_addr complaint msg_value
s0 s2 XCHG // msg_value complaint s_addr
REWRITESTDADDR // msg_value complaint src_wc src_addr
SWAP // msg_value complaint src_addr src_wc
INC // msg_value complaint src_addr _7
IFJMP:<{ // msg_value complaint src_addr
3 BLKDROP //
-1 PUSHINT // _8=-1
}> // msg_value complaint src_addr
OVER // msg_value complaint src_addr complaint
SDEPTH // msg_value complaint src_addr _9
7 PUSHPOW2 // msg_value complaint src_addr _9 _10=128
GEQ // msg_value complaint src_addr _11
IFJMP:<{ // msg_value complaint src_addr
3 BLKDROP //
-3 PUSHINT // _12=-3
}> // msg_value complaint src_addr
load_data INLINECALLDICT // msg_value complaint src_addr _131 _132 _133 _134 _135 _136
s3 s5 XCHG
5 BLKDROP // msg_value complaint src_addr past_elections
s0 s2 XCHG // msg_value past_elections src_addr complaint
32 LDU // msg_value past_elections src_addr election_id complaint
s1 s3 PUSH2
32 PUSHINT // msg_value past_elections src_addr election_id complaint election_id past_elections _26=32
DICTUGET
NULLSWAPIFNOT // msg_value past_elections src_addr election_id complaint fs f
IFNOTJMP:<{ // msg_value past_elections src_addr election_id complaint fs
6 BLKDROP //
-2 PUSHINT // _28=-2
}> // msg_value past_elections src_addr election_id complaint fs
DUP // msg_value past_elections src_addr election_id complaint fs fs
32 PLDU // msg_value past_elections src_addr election_id complaint fs _31
NOW // msg_value past_elections src_addr election_id complaint fs _31 _32
SUB // msg_value past_elections src_addr election_id complaint fs expire_in
DUP // msg_value past_elections src_addr election_id complaint fs expire_in expire_in
1 LESSINT // msg_value past_elections src_addr election_id complaint fs expire_in _35
IFJMP:<{ // msg_value past_elections src_addr election_id complaint fs expire_in
7 BLKDROP //
-4 PUSHINT // _36=-4
}> // msg_value past_elections src_addr election_id complaint fs expire_in
s2 PUSH // msg_value past_elections src_addr election_id complaint fs expire_in complaint
unpack_complaint INLINECALLDICT // msg_value past_elections src_addr election_id complaint fs expire_in _141 _142 _143 _144 _145 _146 _147 _148
2 2 BLKDROP2
s3 POP // msg_value past_elections reward_addr election_id complaint fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine
NOW // msg_value past_elections reward_addr election_id complaint fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at
get_complaint_prices INLINECALLDICT // msg_value past_elections reward_addr election_id complaint fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit bit_price cell_price
s0 s11 XCHG
12 PUSHPOW2 // msg_value past_elections reward_addr election_id cell_price fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit bit_price complaint _54=4096
SDATASIZE // msg_value past_elections reward_addr election_id cell_price fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit bit_price _152 _153 _154
s2 POP // msg_value past_elections reward_addr election_id cell_price fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit bit_price refs bits
10 PUSHPOW2 // msg_value past_elections reward_addr election_id cell_price fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit bit_price refs bits _57=1024
ADD // msg_value past_elections reward_addr election_id cell_price fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit bit_price refs _58
ROT // msg_value past_elections reward_addr election_id cell_price fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit refs _58 bit_price
MUL // msg_value past_elections reward_addr election_id cell_price fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit refs _59
SWAP // msg_value past_elections reward_addr election_id cell_price fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit _59 refs
2 ADDCONST // msg_value past_elections reward_addr election_id cell_price fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit _59 _61
s0 s11 XCHG2 // msg_value past_elections reward_addr election_id _59 fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit _61 cell_price
MUL // msg_value past_elections reward_addr election_id _59 fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at deposit _62
s1 s10 XCHG // msg_value past_elections reward_addr election_id deposit fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at _59 _62
ADD // msg_value past_elections reward_addr election_id deposit fs expire_in validator_pubkey description suggested_fine_part severity suggested_fine created_at pps
s0 s7 XCHG2 // msg_value past_elections reward_addr election_id deposit fs created_at validator_pubkey description suggested_fine_part severity suggested_fine pps expire_in
MUL // msg_value past_elections reward_addr election_id deposit fs created_at validator_pubkey description suggested_fine_part severity suggested_fine _64
s0 s8 XCHG2 // msg_value past_elections reward_addr election_id suggested_fine fs created_at validator_pubkey description suggested_fine_part severity _64 deposit
ADD // msg_value past_elections reward_addr election_id suggested_fine fs created_at validator_pubkey description suggested_fine_part severity paid
DUP
30 PUSHPOW2 // msg_value past_elections reward_addr election_id suggested_fine fs created_at validator_pubkey description suggested_fine_part severity paid paid _68
ADD // msg_value past_elections reward_addr election_id suggested_fine fs created_at validator_pubkey description suggested_fine_part severity paid _69
s0 s12 XCHG2 // paid past_elections reward_addr election_id suggested_fine fs created_at validator_pubkey description suggested_fine_part severity _69 msg_value
LESS // paid past_elections reward_addr election_id suggested_fine fs created_at validator_pubkey description suggested_fine_part severity _70
IFJMP:<{ // paid past_elections reward_addr election_id suggested_fine fs created_at validator_pubkey description suggested_fine_part severity
11 BLKDROP //
-5 PUSHINT // _71=-5
}> // paid past_elections reward_addr election_id suggested_fine fs created_at validator_pubkey description suggested_fine_part severity
s4 s0 s3 XC2PU
s9 s11 s7 XCPU2
s7 PUSH // paid past_elections validator_pubkey election_id suggested_fine fs suggested_fine_part validator_pubkey description created_at severity reward_addr paid suggested_fine suggested_fine_part
pack_complaint INLINECALLDICT // paid past_elections validator_pubkey election_id suggested_fine fs suggested_fine_part _73
ENDC // paid past_elections validator_pubkey election_id suggested_fine fs suggested_fine_part complaint
s0 s2 XCHG // paid past_elections validator_pubkey election_id suggested_fine complaint suggested_fine_part fs
unpack_past_election INLINECALLDICT // paid past_elections validator_pubkey election_id suggested_fine complaint suggested_fine_part unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses complaints
s11 s3 XCPU
8 PUSHPOW2 // paid past_elections complaints election_id suggested_fine complaint suggested_fine_part unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses validator_pubkey frozen_dict _85=256
DICTUGET
NULLSWAPIFNOT // paid past_elections complaints election_id suggested_fine complaint suggested_fine_part unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses fs f
IFNOTJMP:<{ // paid past_elections complaints election_id suggested_fine complaint suggested_fine_part unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses fs
14 BLKDROP //
-6 PUSHINT // _87=-6
}> // paid past_elections complaints election_id suggested_fine complaint suggested_fine_part unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses fs
320 PUSHINT // paid past_elections complaints election_id suggested_fine complaint suggested_fine_part unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses fs _91
SDSKIPFIRST // paid past_elections complaints election_id suggested_fine complaint suggested_fine_part unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses fs
LDGRAMS // paid past_elections complaints election_id suggested_fine complaint suggested_fine_part unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses _165 _164
DROP // paid past_elections complaints election_id suggested_fine complaint suggested_fine_part unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses validator_stake
s0 s7 PUXC // paid past_elections complaints election_id suggested_fine complaint validator_stake unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses validator_stake suggested_fine_part
32 MULRSHIFT# // paid past_elections complaints election_id suggested_fine complaint validator_stake unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses _100
s1 s9 XCHG // paid past_elections complaints election_id bonuses complaint validator_stake unfreeze_at stake_held vset_hash frozen_dict total_stake suggested_fine _100
ADD // paid past_elections complaints election_id bonuses complaint validator_stake unfreeze_at stake_held vset_hash frozen_dict total_stake fine
s0 s6 PUXC // paid past_elections complaints election_id bonuses complaint fine unfreeze_at stake_held vset_hash frozen_dict total_stake fine validator_stake
GREATER // paid past_elections complaints election_id bonuses complaint fine unfreeze_at stake_held vset_hash frozen_dict total_stake _102
IFJMP:<{ // paid past_elections complaints election_id bonuses complaint fine unfreeze_at stake_held vset_hash frozen_dict total_stake
12 BLKDROP //
-7 PUSHINT // _103=-7
}> // paid past_elections complaints election_id bonuses complaint fine unfreeze_at stake_held vset_hash frozen_dict total_stake
s5 s11 XCPU // paid past_elections complaints election_id bonuses complaint total_stake unfreeze_at stake_held vset_hash frozen_dict fine paid
LEQ // paid past_elections complaints election_id bonuses complaint total_stake unfreeze_at stake_held vset_hash frozen_dict _104
IFJMP:<{ // paid past_elections complaints election_id bonuses complaint total_stake unfreeze_at stake_held vset_hash frozen_dict
11 BLKDROP //
-8 PUSHINT // _105=-8
}> // paid past_elections complaints election_id bonuses complaint total_stake unfreeze_at stake_held vset_hash frozen_dict
PUSHNULL // paid past_elections complaints election_id bonuses complaint total_stake unfreeze_at stake_held vset_hash frozen_dict _107
0 PUSHINT // paid past_elections complaints election_id bonuses complaint total_stake unfreeze_at stake_held vset_hash frozen_dict _107 _108=0
s0 s7 PUSH2
3 -ROLL // paid past_elections complaints election_id bonuses complaint total_stake unfreeze_at stake_held vset_hash frozen_dict complaint _107 _108=0 _109=0
pack_complaint_status INLINECALLDICT // paid past_elections complaints election_id bonuses complaint total_stake unfreeze_at stake_held vset_hash frozen_dict cstatus
s0 s6 XCHG // paid past_elections complaints election_id bonuses cstatus total_stake unfreeze_at stake_held vset_hash frozen_dict complaint
HASHCU // paid past_elections complaints election_id bonuses cstatus total_stake unfreeze_at stake_held vset_hash frozen_dict cpl_id
s6 s0 s9 XCHG3
8 PUSHPOW2 // paid past_elections frozen_dict election_id bonuses vset_hash total_stake unfreeze_at stake_held cstatus cpl_id complaints _114=256
DICTUADDB // paid past_elections frozen_dict election_id bonuses vset_hash total_stake unfreeze_at stake_held complaints _113
IFNOTJMP:<{ // paid past_elections frozen_dict election_id bonuses vset_hash total_stake unfreeze_at stake_held complaints
10 BLKDROP //
-9 PUSHINT // _116=-9
}> // paid past_elections frozen_dict election_id bonuses vset_hash total_stake unfreeze_at stake_held complaints
s6 s5 s0 XCHG3
s3 s7 XCHG
s2 s7 XCHG // paid past_elections election_id unfreeze_at stake_held vset_hash frozen_dict total_stake bonuses complaints
pack_past_election INLINECALLDICT // paid past_elections election_id _118
s0 s2 XCHG
32 PUSHINT // paid _118 election_id past_elections _119=32
DICTUSETB // paid past_elections
load_data INLINECALLDICT // paid past_elections _168 _169 _170 _171 _172 _173
s3 POP // paid past_elections elect credits active_hash grams active_id
s4 s5 XCHG
s3 s4 XCHG
ROT // paid elect credits past_elections grams active_id active_hash
store_data INLINECALLDICT
}>
punish PROCREF:<{
// credits frozen complaint
CTOS // credits frozen _11
unpack_complaint INLINECALLDICT // credits frozen _62 _63 _64 _65 _66 _67 _68 _69
s4 POP
s4 POP
s4 POP // credits frozen validator_pubkey paid suggested_fine suggested_fine_part reward_addr
s4 s5 PUSH2
8 PUSHPOW2 // credits frozen validator_pubkey paid suggested_fine suggested_fine_part reward_addr validator_pubkey frozen _15=256
DICTUGET
NULLSWAPIFNOT // credits frozen validator_pubkey paid suggested_fine suggested_fine_part reward_addr cs f
IFNOTJMP:<{ // credits frozen validator_pubkey paid suggested_fine suggested_fine_part reward_addr cs
6 BLKDROP // credits frozen
0 PUSHINT // credits frozen _17=0
}> // credits frozen validator_pubkey paid suggested_fine suggested_fine_part reward_addr cs
256 LDU // credits frozen validator_pubkey paid suggested_fine suggested_fine_part reward_addr _22 cs
64 LDU // credits frozen validator_pubkey paid suggested_fine suggested_fine_part reward_addr _22 _25 cs
LDGRAMS // credits frozen validator_pubkey paid suggested_fine suggested_fine_part reward_addr _22 _25 _28 cs
1 LDI // credits frozen validator_pubkey paid suggested_fine suggested_fine_part reward_addr addr weight stake banned cs
ENDS
s1 s5 PUXC // credits frozen validator_pubkey paid suggested_fine banned reward_addr addr weight stake stake suggested_fine_part
32 MULRSHIFT# // credits frozen validator_pubkey paid suggested_fine banned reward_addr addr weight stake _38
s1 s6 XCHG // credits frozen validator_pubkey paid stake banned reward_addr addr weight suggested_fine _38
ADD // credits frozen validator_pubkey paid stake banned reward_addr addr weight _39
s5 s(-1) PUXC // credits frozen validator_pubkey paid stake banned reward_addr addr weight stake _39
MIN // credits frozen validator_pubkey paid stake banned reward_addr addr weight fine
s5 s5 XCPU // credits frozen validator_pubkey paid fine banned reward_addr addr weight stake fine
SUB // credits frozen validator_pubkey paid fine banned reward_addr addr weight stake
s0 s2 XCHG
NEWC // credits frozen validator_pubkey paid fine banned reward_addr stake weight addr _43
256 STU // credits frozen validator_pubkey paid fine banned reward_addr stake weight _45
64 STU // credits frozen validator_pubkey paid fine banned reward_addr stake _47
SWAP // credits frozen validator_pubkey paid fine banned reward_addr _47 stake
STGRAMS // credits frozen validator_pubkey paid fine banned reward_addr _48
s1 s2 XCHG // credits frozen validator_pubkey paid fine reward_addr banned _48
1 STI // credits frozen validator_pubkey paid fine reward_addr _50
s0 s4 s5 XCHG3
8 PUSHPOW2 // credits fine reward_addr paid _50 validator_pubkey frozen _51=256
DICTUSETB // credits fine reward_addr paid frozen
s3 PUSH // credits fine reward_addr paid frozen fine
3 RSHIFT# // credits fine reward_addr paid frozen _55
s0 s2 XCHG // credits fine reward_addr _55 frozen paid
3 LSHIFT# // credits fine reward_addr _55 frozen _57
s1 s2 XCHG // credits fine reward_addr frozen _55 _57
MIN // credits fine reward_addr frozen reward
s3 s3 XCPU // credits reward reward_addr frozen fine reward
SUB // credits reward reward_addr frozen fine
s4 s4 s3 XCHG3 // frozen fine credits reward_addr reward
~credit_to INLINECALLDICT // frozen fine credits
-ROT // credits frozen fine
}>
register_vote PROCREF:<{
// complaints chash idx weight
s2 s3 PUSH2
8 PUSHPOW2 // complaints chash idx weight chash complaints _6=256
DICTUGET
NULLSWAPIFNOT // complaints chash idx weight cstatus found?
IFNOTJMP:<{ // complaints chash idx weight cstatus
4 BLKDROP // complaints
PUSHNULL // complaints _8
-1 PUSHINT // complaints _8 _9=-1
}> // complaints chash idx weight cstatus
get_current_vset INLINECALLDICT // complaints chash idx weight cstatus _53 _54 _55
DROP // complaints chash idx weight cstatus cur_vset total_weight
SWAP // complaints chash idx weight cstatus total_weight cur_vset
HASHCU // complaints chash idx weight cstatus total_weight cur_vset_id
s0 s2 XCHG // complaints chash idx weight cur_vset_id total_weight cstatus
unpack_complaint_status INLINECALLDICT // complaints chash idx weight cur_vset_id total_weight complaint voters vset_id weight_remaining
s1 s5 PUSH2 // complaints chash idx weight cur_vset_id total_weight complaint voters vset_id weight_remaining vset_id cur_vset_id
NEQ // complaints chash idx weight cur_vset_id total_weight complaint voters vset_id weight_remaining _21
IF:<{ // complaints chash idx weight cur_vset_id total_weight complaint voters vset_id weight_remaining
3 BLKDROP // complaints chash idx weight vset_id total_weight complaint
PUSHNULL // complaints chash idx weight vset_id total_weight complaint voters
s0 s2 XCHG
3 PUSHINT // complaints chash idx weight vset_id voters complaint total_weight _24=3
1 LSHIFT#DIV // complaints chash idx weight vset_id voters complaint weight_remaining
s0 s2 XCHG // complaints chash idx weight vset_id weight_remaining complaint voters
}>ELSE<{
s4 POP
s4 POP // complaints chash idx weight vset_id weight_remaining complaint voters
}>
s5 s0 PUSH2
16 PUSHINT // complaints chash idx weight vset_id weight_remaining complaint voters idx voters _28=16
DICTUGET
NULLSWAPIFNOT // complaints chash idx weight vset_id weight_remaining complaint voters _60 _61
NIP // complaints chash idx weight vset_id weight_remaining complaint voters found?
IFJMP:<{ // complaints chash idx weight vset_id weight_remaining complaint voters
7 BLKDROP // complaints
PUSHNULL // complaints _30
0 PUSHINT // complaints _30 _31=0
}> // complaints chash idx weight vset_id weight_remaining complaint voters
NOW // complaints chash idx weight vset_id weight_remaining complaint voters _33
NEWC // complaints chash idx weight vset_id weight_remaining complaint voters _33 _34
32 STU // complaints chash idx weight vset_id weight_remaining complaint voters _36
s0 s6 s6 XCHG3
16 PUSHINT // complaints chash complaint weight vset_id weight_remaining _36 idx voters _37=16
DICTUSETB // complaints chash complaint weight vset_id weight_remaining voters
s0 s0 s3 XCPUXC // complaints chash complaint old_wr vset_id voters weight_remaining weight
SUB // complaints chash complaint old_wr vset_id voters weight_remaining
s3 s3 XCPU // complaints chash complaint weight_remaining vset_id voters old_wr weight_remaining
XOR // complaints chash complaint weight_remaining vset_id voters old_wr
s4 PUSH
s3 s3 XCHG2
s0 s4 XCHG // complaints chash complaint old_wr complaint voters vset_id weight_remaining
pack_complaint_status INLINECALLDICT // complaints chash complaint old_wr _43
s0 s3 s4 XCHG3
8 PUSHPOW2 // complaint old_wr _43 chash complaints _44=256
DICTUSETB // complaint old_wr complaints
SWAP // complaint complaints old_wr
-1 GTINT // complaint complaints _47
IFJMP:<{ // complaint complaints
NIP // complaints
PUSHNULL // complaints _48
1 PUSHINT // complaints _48 _49=1
}> // complaint complaints
SWAP
2 PUSHINT // complaints complaint _50=2
}>
proceed_register_vote PROCREF:<{
// election_id chash idx weight
load_data INLINECALLDICT // election_id chash idx weight elect credits past_elections grams active_id active_hash
s9 s3 PUSH2
32 PUSHINT // election_id chash idx weight elect credits past_elections grams active_id active_hash election_id past_elections _13=32
DICTUGET
NULLSWAPIFNOT // election_id chash idx weight elect credits past_elections grams active_id active_hash _43 _44
s11 POP // f chash idx weight elect credits past_elections grams active_id active_hash fs
s0 s10 XCHG // fs chash idx weight elect credits past_elections grams active_id active_hash f
IFNOTJMP:<{ // fs chash idx weight elect credits past_elections grams active_id active_hash
10 BLKDROP //
-2 PUSHINT // _15=-2
}> // fs chash idx weight elect credits past_elections grams active_id active_hash
s0 s9 XCHG // active_hash chash idx weight elect credits past_elections grams active_id fs
unpack_past_election INLINECALLDICT // active_hash chash idx weight elect credits past_elections grams active_id _45 _46 _47 _48 _49 _50 _51
s4 POP
2DROP
2 2 BLKDROP2 // active_hash chash idx weight elect credits past_elections grams active_id complaints frozen_dict
s9 s3 s7 XCHG3
s1 s8 XCHG // active_hash active_id grams frozen_dict elect credits past_elections complaints chash idx weight
register_vote INLINECALLDICT // active_hash active_id grams frozen_dict elect credits past_elections _52 _53 _54
s2 POP // active_hash active_id grams frozen_dict elect credits past_elections status accepted_complaint
OVER // active_hash active_id grams frozen_dict elect credits past_elections status accepted_complaint status
1 LESSINT // active_hash active_id grams frozen_dict elect credits past_elections status accepted_complaint _28
IFJMP:<{ // active_hash active_id grams frozen_dict elect credits past_elections status accepted_complaint
s1 s8 XCHG
8 BLKDROP // status
}> // active_hash active_id grams frozen_dict elect credits past_elections status accepted_complaint
DUP // active_hash active_id grams frozen_dict elect credits past_elections status accepted_complaint accepted_complaint
ISNULL // active_hash active_id grams frozen_dict elect credits past_elections status accepted_complaint _29
IFNOT:<{ // active_hash active_id grams frozen_dict elect credits past_elections status accepted_complaint
s3 s5 s0 XCHG3 // active_hash active_id grams status elect past_elections credits frozen_dict accepted_complaint
punish INLINECALLDICT // active_hash active_id grams status elect past_elections _55 _56 _57
NIP // active_hash active_id grams status elect past_elections credits fine
s1 s5 XCHG // active_hash active_id credits status elect past_elections grams fine
ADD // active_hash active_id credits status elect past_elections grams
s4 s4 XCHG2 // active_hash active_id grams status elect credits past_elections
}>ELSE<{
DROP
s4 POP // active_hash active_id grams status elect credits past_elections
}>
s5 s1 s3 XCHG3
s4 s4 s6 XCHG3 // status elect credits past_elections grams active_id active_hash
store_data INLINECALLDICT
}>
recv_internal PROC:<{
// msg_value in_msg_cell in_msg
SWAP // msg_value in_msg in_msg_cell
CTOS // msg_value in_msg cs
4 LDU // msg_value in_msg flags cs
SWAP
1 PUSHINT // msg_value in_msg cs flags _9=1
AND // msg_value in_msg cs _10
IFJMP:<{ // msg_value in_msg cs
3 BLKDROP //
}> // msg_value in_msg cs
LDMSGADDR // msg_value in_msg _123 _122
DROP // msg_value in_msg s_addr
OVER // msg_value in_msg s_addr in_msg
SEMPTY // msg_value in_msg s_addr _14
IFJMP:<{ // msg_value in_msg s_addr
NIP // msg_value s_addr
SWAP // s_addr msg_value
process_simple_transfer INLINECALLDICT
}> // msg_value in_msg s_addr
SWAP // msg_value s_addr in_msg
32 LDU // msg_value s_addr op in_msg
OVER // msg_value s_addr op in_msg op
0 EQINT // msg_value s_addr op in_msg _21
IFJMP:<{ // msg_value s_addr op in_msg
2DROP // msg_value s_addr
SWAP // s_addr msg_value
process_simple_transfer INLINECALLDICT
}> // msg_value s_addr op in_msg
64 LDU // msg_value s_addr op query_id in_msg
s2 PUSH
1316189259 PUSHINT // msg_value s_addr op query_id in_msg op _27=1316189259
EQUAL // msg_value s_addr op query_id in_msg _28
IFJMP:<{ // msg_value s_addr op query_id in_msg
s2 POP // msg_value s_addr in_msg query_id
s2 s3 XCHG // s_addr msg_value in_msg query_id
process_new_stake INLINECALLDICT
}> // msg_value s_addr op query_id in_msg
s2 PUSH
1197831204 PUSHINT // msg_value s_addr op query_id in_msg op _30=1197831204
EQUAL // msg_value s_addr op query_id in_msg _31
IFJMP:<{ // msg_value s_addr op query_id in_msg
s4 POP // in_msg s_addr op query_id
s1 s3 XCHG // op s_addr in_msg query_id
recover_stake INLINECALLDICT
}> // msg_value s_addr op query_id in_msg
s2 PUSH
1313042276 PUSHINT // msg_value s_addr op query_id in_msg op _33=1313042276
EQUAL // msg_value s_addr op query_id in_msg _34
IFJMP:<{ // msg_value s_addr op query_id in_msg
s4 POP // in_msg s_addr op query_id
s2 s3 s3 PUXCPU // query_id s_addr op s_addr in_msg query_id
upgrade_code INLINECALLDICT // query_id s_addr op ok
IF:<{ // query_id s_addr op
3460525924 PUSHINT // query_id s_addr op _37=3460525924
}>ELSE<{ // query_id s_addr op
32 PUSHPOW2DEC // query_id s_addr op _37=4294967295
}>
s0 s3 s3 XCHG3
0 PUSHINT
64 PUSHINT // s_addr _37 query_id op _40=0 _41=64
send_message_back INLINECALLDICT
}> // msg_value s_addr op query_id in_msg
s2 PUSH
4000730955 PUSHINT // msg_value s_addr op query_id in_msg op _44=4000730955
EQUAL // msg_value s_addr op query_id in_msg cfg_ok
s3 PUSH
4000730991 PUSHINT // msg_value s_addr op query_id in_msg cfg_ok op _46=4000730991
EQUAL // msg_value s_addr op query_id in_msg cfg_ok _47
s1 s(-1) PUXC // msg_value s_addr op query_id in_msg cfg_ok cfg_ok _47
OR // msg_value s_addr op query_id in_msg cfg_ok _48
IFJMP:<{ // msg_value s_addr op query_id in_msg cfg_ok
s3 POP
s4 POP // in_msg s_addr cfg_ok query_id
s3 s0 s0 XCHG3 // s_addr in_msg query_id cfg_ok
config_set_confirmed INLINECALLDICT
}> // msg_value s_addr op query_id in_msg cfg_ok
DROP // msg_value s_addr op query_id in_msg
s2 PUSH
1382499184 PUSHINT // msg_value s_addr op query_id in_msg op _50=1382499184
EQUAL // msg_value s_addr op query_id in_msg _51
IFJMP:<{ // msg_value s_addr op query_id in_msg
s3 s0 s4 PUXC2 // query_id s_addr op s_addr in_msg msg_value
register_complaint CALLDICT // query_id s_addr op price
64 PUSHINT // query_id s_addr op price mode=64
OVER // query_id s_addr op price mode=64 price
NEGATE // query_id s_addr op price mode=64 ans_tag
s2 PUSH // query_id s_addr op price mode=64 ans_tag price
-1 GTINT // query_id s_addr op price mode=64 ans_tag _59
IF:<{ // query_id s_addr op price mode=64 ans_tag
2DROP // query_id s_addr op price
4 PUSHINT // query_id s_addr op price _60=4
RAWRESERVE
0 PUSHINT // query_id s_addr op ans_tag=0
7 PUSHPOW2 // query_id s_addr op ans_tag=0 mode=128
}>ELSE<{
s2 POP // query_id s_addr op ans_tag mode
}>
SWAP
4066861904 PUSHINT // query_id s_addr op mode ans_tag _64=4066861904
ADD // query_id s_addr op mode _65
s0 s3 XCHG
s4 s4 s4 XCHG3
0 PUSHINT
SWAP // s_addr _65 query_id op _66=0 mode
send_message_back INLINECALLDICT
}> // msg_value s_addr op query_id in_msg
s4 POP // in_msg s_addr op query_id
OVER
1450460016 PUSHINT // in_msg s_addr op query_id op _68=1450460016
EQUAL // in_msg s_addr op query_id _69
IFJMP:<{ // in_msg s_addr op query_id
s0 s3 XCHG
9 PUSHPOW2 // query_id s_addr op in_msg _72=512
LDSLICEX // query_id s_addr op signature in_msg
DUP // query_id s_addr op signature msg_body in_msg
32 LDU // query_id s_addr op signature msg_body _79 in_msg
16 LDU // query_id s_addr op signature msg_body _79 _82 in_msg
32 LDU // query_id s_addr op signature msg_body _79 _82 _85 in_msg
256 LDU // query_id s_addr op signature msg_body sign_tag idx elect_id chash in_msg
ENDS
s0 s3 XCHG
1450459984 PUSHINT // query_id s_addr op signature msg_body chash idx elect_id sign_tag _93=1450459984
EQUAL // query_id s_addr op signature msg_body chash idx elect_id _94
37 THROWIFNOT
OVER // query_id s_addr op signature msg_body chash idx elect_id idx
get_validator_descr INLINECALLDICT // query_id s_addr op signature msg_body chash idx elect_id _138 _139
DROP // query_id s_addr op signature msg_body chash idx elect_id vdescr
unpack_validator_descr INLINECALLDICT // query_id s_addr op signature msg_body chash idx elect_id val_pubkey weight
s5 s6 s6 XCHG3 // query_id s_addr op weight elect_id chash idx msg_body signature val_pubkey
CHKSIGNS // query_id s_addr op weight elect_id chash idx _103
34 THROWIFNOT
3 ROLL // query_id s_addr op elect_id chash idx weight
proceed_register_vote INLINECALLDICT // query_id s_addr op res
3597947456 PUSHINT // query_id s_addr op res _107=3597947456
ADD // query_id s_addr op _108
s0 s3 s3 XCHG3
0 PUSHINT
64 PUSHINT // s_addr _108 query_id op _109=0 _110=64
send_message_back INLINECALLDICT
}> // in_msg s_addr op query_id
s3 POP // query_id s_addr op
DUP
31 PUSHPOW2 // query_id s_addr op op _114
AND // query_id s_addr op _115
IFNOTJMP:<{ // query_id s_addr op
32 PUSHPOW2DEC // query_id s_addr op _116=4294967295
s0 s3 s3 XCHG3
0 PUSHINT
64 PUSHINT // s_addr _116=4294967295 query_id op _117=0 _118=64
send_message_back INLINECALLDICT
}> // query_id s_addr op
3 BLKDROP //
}>
postpone_elections PROC:<{
//
FALSE // _0
}>
compute_total_stake PROCREF:<{
// l n m_stake
0 PUSHINT // l n m_stake tot_stake=0
s0 s2 XCHG // l tot_stake=0 m_stake n
REPEAT:<{ // l tot_stake m_stake
s0 s2 XCHG // m_stake tot_stake l
UNCONS // m_stake tot_stake h l
OVER // m_stake tot_stake h l h
0 INDEX // m_stake tot_stake h l stake
s0 s2 XCHG // m_stake tot_stake stake l h
1 INDEX // m_stake tot_stake stake l max_f
s4 PUSH // m_stake tot_stake stake l max_f m_stake
MUL // m_stake tot_stake stake l _13
16 RSHIFT# // m_stake tot_stake stake l _15
s1 s2 XCHG // m_stake tot_stake l stake _15
MIN // m_stake tot_stake l stake
s1 s2 XCHG // m_stake l tot_stake stake
ADD // m_stake l tot_stake
ROT // l tot_stake m_stake
}>
DROP
NIP // tot_stake
}>
try_elect PROC:<{
// credits members min_stake max_stake min_total_stake max_stake_factor
16 PUSHINT // credits members min_stake max_stake min_total_stake max_stake_factor _7=16
CONFIGOPTPARAM // credits members min_stake max_stake min_total_stake max_stake_factor _8
CTOS // credits members min_stake max_stake min_total_stake max_stake_factor cs
16 LDU // credits members min_stake max_stake min_total_stake max_stake_factor _13 cs
16 LDU // credits members min_stake max_stake min_total_stake max_stake_factor _13 _256 _255
NIP // credits members min_stake max_stake min_total_stake max_stake_factor _13 cs
16 LDU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators cs
ENDS
1 PUSHINT // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators _23=1
MAX // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators
0 PUSHINT // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n=0
NEWDICT // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n=0 sdict
-1 PUSHINT // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n=0 sdict pubkey=-1
UNTIL:<{
s9 PUSH
8 PUSHPOW2 // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict pubkey members _33=256
DICTUGETNEXT
NULLSWAPIFNOT2 // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict cs pubkey f
DUP // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict cs pubkey f f
IF:<{ // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict cs pubkey f
s0 s2 XCHG // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey cs
LDGRAMS // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey _40 cs
32 LDU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey _40 _42 cs
32 LDU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey _40 _42 _45 cs
256 LDU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey _40 _42 _45 _48 cs
256 LDU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey stake time max_factor addr adnl_addr cs
ENDS
s0 s3 XCHG // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey stake adnl_addr max_factor addr time
NEGATE // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey stake adnl_addr max_factor addr _56
s0 s4 XCHG
NEWC // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey _56 adnl_addr max_factor addr stake _57
128 STU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey _56 adnl_addr max_factor addr _59
s1 s4 XCHG // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr max_factor _56 _59
32 STI // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr max_factor _61
s4 s(-1) PUXC // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr max_factor pubkey _61
256 STU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr max_factor _63
ENDC // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr max_factor _64
CTOS // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr max_factor key
s1 s10 XCPU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr key max_factor max_stake_factor
MIN // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr key _67
NEWC // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr key _67 _68
32 STU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey addr adnl_addr key _70
s1 s3 XCHG // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey key adnl_addr addr _70
256 STU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey key adnl_addr _72
256 STU // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey key _74
s0 s1 s4 XCHG3
416 PUSHINT // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n pubkey f _74 key sdict _79
DICTSETB // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n pubkey f sdict
s0 s3 XCHG // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators sdict pubkey f n
INC // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators sdict pubkey f n
s3 s1 s3 XCHG3 // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey
}>ELSE<{
s2 POP // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict f pubkey
}>
SWAP // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict pubkey f
NOT // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict pubkey _83
}> // credits members min_stake max_stake min_total_stake max_stake_factor max_validators min_validators n sdict pubkey
DROP
s4 POP // credits members min_stake max_stake min_total_stake sdict max_validators min_validators n
ROT // credits members min_stake max_stake min_total_stake sdict min_validators n max_validators
MIN // credits members min_stake max_stake min_total_stake sdict min_validators n
s0 s1 PUSH2 // credits members min_stake max_stake min_total_stake sdict min_validators n n min_validators
LESS // credits members min_stake max_stake min_total_stake sdict min_validators n _85
IFJMP:<{ // credits members min_stake max_stake min_total_stake sdict min_validators n
7 BLKDROP // credits
NEWDICT // credits _86
0 PUSHINT // credits _86 _87=0
NEWDICT // credits _86 _87=0 _88
s1 s1 PUSH2 // credits _86 _87=0 _88 _89=0 _90=0
}> // credits members min_stake max_stake min_total_stake sdict min_validators n
PUSHNULL // credits members min_stake max_stake min_total_stake sdict min_validators n l
UNTIL:<{
s0 s3 XCHG
416 PUSHINT // credits members min_stake max_stake min_total_stake l min_validators n sdict _101
DICTREMMIN
NULLSWAPIFNOT2 // credits members min_stake max_stake min_total_stake l min_validators n sdict cs key f
DUP // credits members min_stake max_stake min_total_stake l min_validators n sdict cs key f f
IF:<{ // credits members min_stake max_stake min_total_stake l min_validators n sdict cs key f
SWAP // credits members min_stake max_stake min_total_stake l min_validators n sdict cs f key
128 LDU // credits members min_stake max_stake min_total_stake l min_validators n sdict cs f _106 key
s1 s9 XCPU // credits members min_stake max_stake min_total_stake l min_validators n sdict cs f key _106 max_stake
MIN // credits members min_stake max_stake min_total_stake l min_validators n sdict cs f key _109
SWAP // credits members min_stake max_stake min_total_stake l min_validators n sdict cs f _109 key
32 LDU // credits members min_stake max_stake min_total_stake l min_validators n sdict cs f _109 _282 _281
NIP // credits members min_stake max_stake min_total_stake l min_validators n sdict cs f _109 key
256 PLDU // credits members min_stake max_stake min_total_stake l min_validators n sdict cs f stake pubkey
s0 s3 XCHG // credits members min_stake max_stake min_total_stake l min_validators n sdict pubkey f stake cs
32 LDU // credits members min_stake max_stake min_total_stake l min_validators n sdict pubkey f stake _118 cs
256 LDU // credits members min_stake max_stake min_total_stake l min_validators n sdict pubkey f stake _118 _286 _285
NIP // credits members min_stake max_stake min_total_stake l min_validators n sdict pubkey f stake _118 cs
256 PLDU // credits members min_stake max_stake min_total_stake l min_validators n sdict pubkey f stake max_f adnl_addr
s1 s3 s0 XCHG3
s1 s4 XCHG // credits members min_stake max_stake min_total_stake l min_validators n sdict f stake max_f pubkey adnl_addr
4 TUPLE // credits members min_stake max_stake min_total_stake l min_validators n sdict f _126
s0 s5 XCHG2 // credits members min_stake max_stake min_total_stake f min_validators n sdict _126 l
CONS // credits members min_stake max_stake min_total_stake f min_validators n sdict l
s0 s4 XCHG // credits members min_stake max_stake min_total_stake l min_validators n sdict f
}>ELSE<{
2 1 BLKDROP2 // credits members min_stake max_stake min_total_stake l min_validators n sdict f
}>
NOT // credits members min_stake max_stake min_total_stake l min_validators n sdict _128
s1 s4 XCHG // credits members min_stake max_stake min_total_stake sdict min_validators n l _128
}> // credits members min_stake max_stake min_total_stake sdict min_validators n l
s3 POP
s4 POP // credits members min_stake n min_total_stake l min_validators
DEC // credits members min_stake n min_total_stake l i
2DUP // credits members min_stake n min_total_stake l i l1 i
REPEAT:<{ // credits members min_stake n min_total_stake l i l1
CDR // credits members min_stake n min_total_stake l i l1
}>
0 PUSHINT // credits members min_stake n min_total_stake l i l1 _136=0
DUP // credits members min_stake n min_total_stake l i l1 best_stake=0 m=0
UNTIL:<{
s0 s2 XCHG // credits members min_stake n min_total_stake l i m best_stake l1
UNCONS // credits members min_stake n min_total_stake l i m best_stake _139 l1
SWAP // credits members min_stake n min_total_stake l i m best_stake l1 _139
0 INDEX // credits members min_stake n min_total_stake l i m best_stake l1 stake
s0 s4 XCHG // credits members min_stake n min_total_stake l stake m best_stake l1 i
INC // credits members min_stake n min_total_stake l stake m best_stake l1 i
s4 s8 PUSH2 // credits members min_stake n min_total_stake l stake m best_stake l1 i stake min_stake
GEQ // credits members min_stake n min_total_stake l stake m best_stake l1 i _145
IF:<{ // credits members min_stake n min_total_stake l stake m best_stake l1 i
s5 s(-1) s4 PU2XC // credits members min_stake n min_total_stake l i m best_stake l1 l i stake
compute_total_stake INLINECALLDICT // credits members min_stake n min_total_stake l i m best_stake l1 tot_stake
s0 s2 PUSH2 // credits members min_stake n min_total_stake l i m best_stake l1 tot_stake tot_stake best_stake
GREATER // credits members min_stake n min_total_stake l i m best_stake l1 tot_stake _148
IF:<{ // credits members min_stake n min_total_stake l i m best_stake l1 tot_stake
2 2 BLKDROP2 // credits members min_stake n min_total_stake l i l1 tot_stake
s2 PUSH // credits members min_stake n min_total_stake l i l1 best_stake m
s0 s2 XCHG // credits members min_stake n min_total_stake l i m best_stake l1
}>ELSE<{
DROP // credits members min_stake n min_total_stake l i m best_stake l1
}>
}>ELSE<{
s4 POP // credits members min_stake n min_total_stake l i m best_stake l1
}>
s3 s6 PUSH2 // credits members min_stake n min_total_stake l i m best_stake l1 i n
GEQ // credits members min_stake n min_total_stake l i m best_stake l1 _149
s1 s3 XCHG // credits members min_stake n min_total_stake l i l1 best_stake m _149
}> // credits members min_stake n min_total_stake l i l1 best_stake m
s6 POP
s6 POP
2DROP // credits members best_stake m min_total_stake l
s2 PUSH // credits members best_stake m min_total_stake l m
0 EQINT // credits members best_stake m min_total_stake l _151
s4 s2 PUXC // credits members best_stake m _151 l best_stake min_total_stake
LESS // credits members best_stake m _151 l _152
s1 s2 XCHG // credits members best_stake m l _151 _152
OR // credits members best_stake m l _153
IFJMP:<{ // credits members best_stake m l
4 BLKDROP // credits
NEWDICT // credits _154
0 PUSHINT // credits _154 _155=0
NEWDICT // credits _154 _155=0 _156
s1 s1 PUSH2 // credits _154 _155=0 _156 _157=0 _158=0
}> // credits members best_stake m l
s0 s1 PUSH2 // credits members best_stake m l l1 m
DEC // credits members best_stake m l l1 _161
REPEAT:<{ // credits members best_stake m l l1
CDR // credits members best_stake m l l1
}>
CAR // credits members best_stake m l _164
0 INDEX // credits members best_stake m l m_stake
0 PUSHINT // credits members best_stake m l m_stake i=0
s0 s0 PUSH2 // credits members best_stake m l m_stake i=0 tot_stake=0 tot_weight=0
NEWDICT // credits members best_stake m l m_stake i=0 tot_stake=0 tot_weight=0 vset
NEWDICT // credits members best_stake m l m_stake i=0 tot_stake=0 tot_weight=0 vset frozen
UNTIL:<{
s0 s6 XCHG // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l
UNCONS // credits members best_stake m frozen m_stake i tot_stake tot_weight vset _181 l
SWAP // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l _181
4 UNTUPLE // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr
s1 s13 PUSH2
8 PUSHPOW2 // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr pubkey members _186=256
DICTUGET
NULLSWAPIFNOT // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr val f
61 THROWIFNOT
LDGRAMS // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr _298 _297
NIP // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr val
64 LDU // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr _300 _299
NIP // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr val
256 PLDU // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr src_addr
s9 s12 PUSH2 // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr src_addr i m
LESS // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr src_addr _200
IF:<{ // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake max_f pubkey adnl_addr src_addr
s3 s10 XCPU // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake src_addr pubkey adnl_addr max_f m_stake
MUL // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake src_addr pubkey adnl_addr _202
16 RSHIFT# // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake src_addr pubkey adnl_addr _204
s4 s(-1) PUXC // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake src_addr pubkey adnl_addr stake _204
MIN // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake src_addr pubkey adnl_addr true_stake
s4 s4 XCPU // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l true_stake src_addr pubkey adnl_addr stake true_stake
SUB // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l true_stake src_addr pubkey adnl_addr stake
s4 PUSH // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l true_stake src_addr pubkey adnl_addr stake true_stake
60 LSHIFT# // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l true_stake src_addr pubkey adnl_addr stake _209
s14 PUSH // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l true_stake src_addr pubkey adnl_addr stake _209 best_stake
DIV // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l true_stake src_addr pubkey adnl_addr stake weight
s9 s5 XCPU // credits members best_stake m frozen m_stake i weight tot_weight vset l true_stake src_addr pubkey adnl_addr stake tot_stake true_stake
ADD // credits members best_stake m frozen m_stake i weight tot_weight vset l true_stake src_addr pubkey adnl_addr stake tot_stake
s8 s9 XCPU // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight weight
ADD // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight
2390828938 PUSHINT // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _214=2390828938
s3 PUSH // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _214=2390828938 adnl_addr
IF:<{ // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _214=2390828938
115 PUSHINT // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _214=2390828938 _215=115
}>ELSE<{ // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _214=2390828938
83 PUSHINT // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _214=2390828938 _215=83
}>
NEWC // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _214=2390828938 _215 _218
8 STU // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _214=2390828938 _220
32 STU // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _222
s4 s(-1) PUXC // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight pubkey _222
256 STU // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight _224
s10 s(-1) PUXC // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight weight _224
64 STU // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight vinfo
s3 PUSH // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight vinfo adnl_addr
IF:<{ // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey adnl_addr stake tot_weight vinfo
s1 s3 XCHG // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey tot_weight stake adnl_addr vinfo
256 STU // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey tot_weight stake vinfo
s0 s2 XCHG // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey vinfo stake tot_weight
}>ELSE<{
s3 POP // credits members best_stake m frozen m_stake i weight tot_stake vset l true_stake src_addr pubkey vinfo stake tot_weight
}>
s2 s10 s7 XCPUXC
16 PUSHINT // credits members best_stake m frozen m_stake i weight tot_stake tot_weight l true_stake src_addr pubkey stake vinfo i vset _231=16
DICTUSETB // credits members best_stake m frozen m_stake i weight tot_stake tot_weight l true_stake src_addr pubkey stake vset
FALSE // credits members best_stake m frozen m_stake i weight tot_stake tot_weight l true_stake src_addr pubkey stake vset _234
s4 PUSH
NEWC // credits members best_stake m frozen m_stake i weight tot_stake tot_weight l true_stake src_addr pubkey stake vset _234 src_addr _235
256 STU // credits members best_stake m frozen m_stake i weight tot_stake tot_weight l true_stake src_addr pubkey stake vset _234 _237
s1 s10 XCHG // credits members best_stake m frozen m_stake i _234 tot_stake tot_weight l true_stake src_addr pubkey stake vset weight _237
64 STU // credits members best_stake m frozen m_stake i _234 tot_stake tot_weight l true_stake src_addr pubkey stake vset _239
s0 s5 XCHG2 // credits members best_stake m frozen m_stake i _234 tot_stake tot_weight l vset src_addr pubkey stake _239 true_stake
STGRAMS // credits members best_stake m frozen m_stake i _234 tot_stake tot_weight l vset src_addr pubkey stake _240
s1 s8 XCHG // credits members best_stake m frozen m_stake i stake tot_stake tot_weight l vset src_addr pubkey _234 _240
1 STI // credits members best_stake m frozen m_stake i stake tot_stake tot_weight l vset src_addr pubkey _242
s0 s1 s10 XCHG3
8 PUSHPOW2 // credits members best_stake m src_addr m_stake i stake tot_stake tot_weight l vset _242 pubkey frozen _243=256
DICTUSETB // credits members best_stake m src_addr m_stake i stake tot_stake tot_weight l vset frozen
s0 s8 XCHG
s4 s5 XCHG
s1 s3 XCHG
s1 s4 XCHG // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake src_addr
}>ELSE<{
3 1 BLKDROP2 // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake src_addr
}>
OVER // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake src_addr stake
IF:<{ // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l stake src_addr
s12 s0 s0 XCHG3 // l members best_stake m frozen m_stake i tot_stake tot_weight vset credits src_addr stake
~credit_to INLINECALLDICT // l members best_stake m frozen m_stake i tot_stake tot_weight vset credits
s0 s10 XCHG // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l
}>ELSE<{
2DROP // credits members best_stake m frozen m_stake i tot_stake tot_weight vset l
}>
s0 s4 XCHG // credits members best_stake m frozen m_stake l tot_stake tot_weight vset i
INC // credits members best_stake m frozen m_stake l tot_stake tot_weight vset i
s4 PUSH // credits members best_stake m frozen m_stake l tot_stake tot_weight vset i l
ISNULL // credits members best_stake m frozen m_stake l tot_stake tot_weight vset i _249
s1 s5 XCHG
s1 s7 XCHG // credits members best_stake m l m_stake i tot_stake tot_weight vset frozen _249
}> // credits members best_stake m l m_stake i tot_stake tot_weight vset frozen
s4 POP
s4 POP
s4 POP
s6 POP // credits tot_stake best_stake m tot_weight vset frozen
s5 s4 PUXC // credits tot_stake frozen m tot_weight vset tot_stake best_stake
EQUAL // credits tot_stake frozen m tot_weight vset _251
49 THROWIFNOT
s4 s4 XCHG2
s3 s1 s3 XCHG3 // credits vset tot_weight frozen tot_stake m
}>
conduct_elections PROC:<{
// ds elect credits
SWAP // ds credits elect
unpack_elect INLINECALLDICT // ds credits _121 _122 _123 _124 _125 _126 _127
s4 POP // ds credits elect_at elect_close finished total_stake members failed
NOW // ds credits elect_at elect_close finished total_stake members failed _11
s5 PUSH // ds credits elect_at elect_close finished total_stake members failed _11 elect_close
LESS // ds credits elect_at elect_close finished total_stake members failed _12
IFJMP:<{ // ds credits elect_at elect_close finished total_stake members failed
8 BLKDROP //
FALSE // _13
}> // ds credits elect_at elect_close finished total_stake members failed
0 PUSHINT // ds credits elect_at elect_close finished total_stake members failed _14=0
CONFIGOPTPARAM // ds credits elect_at elect_close finished total_stake members failed _15
ISNULL // ds credits elect_at elect_close finished total_stake members failed _16
IFJMP:<{ // ds credits elect_at elect_close finished total_stake members failed
8 BLKDROP //
postpone_elections CALLDICT // _17
}> // ds credits elect_at elect_close finished total_stake members failed
17 PUSHINT // ds credits elect_at elect_close finished total_stake members failed _19=17
CONFIGOPTPARAM // ds credits elect_at elect_close finished total_stake members failed _20
CTOS // ds credits elect_at elect_close finished total_stake members failed cs
LDGRAMS // ds credits elect_at elect_close finished total_stake members failed min_stake cs
LDGRAMS // ds credits elect_at elect_close finished total_stake members failed min_stake max_stake cs
LDGRAMS // ds credits elect_at elect_close finished total_stake members failed min_stake max_stake min_total_stake cs
32 LDU // ds credits elect_at elect_close finished total_stake members failed min_stake max_stake min_total_stake max_stake_factor cs
ENDS
s6 s1 PUSH2 // ds credits elect_at elect_close finished total_stake members failed min_stake max_stake min_total_stake max_stake_factor total_stake min_total_stake
LESS // ds credits elect_at elect_close finished total_stake members failed min_stake max_stake min_total_stake max_stake_factor _35
IFJMP:<{ // ds credits elect_at elect_close finished total_stake members failed min_stake max_stake min_total_stake max_stake_factor
12 BLKDROP //
postpone_elections CALLDICT // _36
}> // ds credits elect_at elect_close finished total_stake members failed min_stake max_stake min_total_stake max_stake_factor
s0 s4 XCHG // ds credits elect_at elect_close finished total_stake members max_stake_factor min_stake max_stake min_total_stake failed
IFJMP:<{ // ds credits elect_at elect_close finished total_stake members max_stake_factor min_stake max_stake min_total_stake
11 BLKDROP //
postpone_elections CALLDICT // _37
}> // ds credits elect_at elect_close finished total_stake members max_stake_factor min_stake max_stake min_total_stake
s0 s6 XCHG // ds credits elect_at elect_close min_total_stake total_stake members max_stake_factor min_stake max_stake finished
IFJMP:<{ // ds credits elect_at elect_close min_total_stake total_stake members max_stake_factor min_stake max_stake
10 BLKDROP //
FALSE // _38
}> // ds credits elect_at elect_close min_total_stake total_stake members max_stake_factor min_stake max_stake
s3 PUSH
s4 s9 XCHG
s3 s2 XCPU
s7 s7 XCHG2 // ds members elect_at elect_close min_stake total_stake credits members min_stake max_stake min_total_stake max_stake_factor
try_elect CALLDICT // ds members elect_at elect_close min_stake total_stake credits vdict total_weight frozen total_stakes cnt
DUP // ds members elect_at elect_close min_stake total_stake credits vdict total_weight frozen total_stakes cnt cnt
0 EQINT // ds members elect_at elect_close min_stake total_stake credits vdict total_weight frozen total_stakes cnt failed
DUP // ds members elect_at elect_close min_stake total_stake credits vdict total_weight frozen total_stakes cnt failed failed
NOT // ds members elect_at elect_close min_stake total_stake credits vdict total_weight frozen total_stakes cnt failed finished
s11 PUSH
s0 s6 XCHG
s5 s11 XCHG
s4 s10 XCHG
s3 s9 XCHG
s13 s13 s13 XCHG3 // ds total_weight elect_at frozen total_stakes cnt credits vdict elect_at elect_close min_stake total_stake members failed finished
pack_elect INLINECALLDICT // ds total_weight elect_at frozen total_stakes cnt credits vdict elect
s3 PUSH // ds total_weight elect_at frozen total_stakes cnt credits vdict elect cnt
IFNOTJMP:<{ // ds total_weight elect_at frozen total_stakes cnt credits vdict elect
NIP
5 2 BLKDROP2
NEWC // ds credits elect _49
STDICT // ds credits _50
STDICT // ds _51
SWAP // _51 ds
STSLICER // _52
ENDC // _53
c4 POP
postpone_elections CALLDICT // _55
}> // ds total_weight elect_at frozen total_stakes cnt credits vdict elect
get_validator_conf CALLDICT // ds total_weight elect_at frozen total_stakes cnt credits vdict elect _142 _143 _144 _145
s2 POP // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held elect_end_before
NOW // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held elect_end_before _62
SWAP // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held _62 elect_end_before
ADD // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held _63
-60 ADDCONST // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held _65
s9 PUSH // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held _65 elect_at
MAX // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start
16 PUSHINT // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _68=16
CONFIGOPTPARAM // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _69
CTOS // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _70
16 PUSHINT // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _70 _71=16
SDSKIPFIRST // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _72
16 PLDU // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start main_validators
s7 s(-1) PUXC // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start cnt main_validators
MIN // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _76
s1 s3 PUSH2 // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _76 start elect_for
ADD // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _76 _77
18 PUSHINT // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _76 _77 _78=18
NEWC // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _76 _77 _78=18 _79
8 STU // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _76 _77 _81
s3 s(-1) PUXC // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _76 _77 start _81
32 STU // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _76 _77 _83
32 STU // ds total_weight elect_at frozen total_stakes cnt credits vdict elect elect_for stake_held start _76 _85
s1 s8 XCHG // ds total_weight elect_at frozen total_stakes _76 credits vdict elect elect_for stake_held start cnt _85
16 STU // ds total_weight elect_at frozen total_stakes _76 credits vdict elect elect_for stake_held start _87
s1 s7 XCHG // ds total_weight elect_at frozen total_stakes start credits vdict elect elect_for stake_held _76 _87
16 STU // ds total_weight elect_at frozen total_stakes start credits vdict elect elect_for stake_held _89
s1 s10 XCHG // ds stake_held elect_at frozen total_stakes start credits vdict elect elect_for total_weight _89
64 STU // ds stake_held elect_at frozen total_stakes start credits vdict elect elect_for _91
s1 s3 XCHG // ds stake_held elect_at frozen total_stakes start credits elect_for elect vdict _91
STDICT // ds stake_held elect_at frozen total_stakes start credits elect_for elect _92
ENDC // ds stake_held elect_at frozen total_stakes start credits elect_for elect vset
0 PUSHINT // ds stake_held elect_at frozen total_stakes start credits elect_for elect vset _95=0
CONFIGOPTPARAM // ds stake_held elect_at frozen total_stakes start credits elect_for elect vset _96
CTOS // ds stake_held elect_at frozen total_stakes start credits elect_for elect vset _97
256 PLDU // ds stake_held elect_at frozen total_stakes start credits elect_for elect vset config_addr
s1 s8 PUSH2 // ds stake_held elect_at frozen total_stakes start credits elect_for elect vset config_addr vset elect_at
send_validator_set_to_config INLINECALLDICT
s0 s9 XCHG // vset stake_held elect_at frozen total_stakes start credits elect_for elect ds
LDDICT // vset stake_held elect_at frozen total_stakes start credits elect_for elect past_elections ds
s5 s3 XCHG2 // vset stake_held elect_at frozen total_stakes past_elections credits ds elect start elect_for
ADD // vset stake_held elect_at frozen total_stakes past_elections credits ds elect _105
s8 PUSH // vset stake_held elect_at frozen total_stakes past_elections credits ds elect _105 stake_held
ADD // vset stake_held elect_at frozen total_stakes past_elections credits ds elect _106
s0 s9 XCHG // _106 stake_held elect_at frozen total_stakes past_elections credits ds elect vset
HASHCU // _106 stake_held elect_at frozen total_stakes past_elections credits ds elect _107
s4 s9 XCHG
s3 s8 XCHG
s0 s6 s5 XCHG3
0 PUSHINT
PUSHNULL // past_elections credits elect_at elect ds _106 stake_held _107 frozen total_stakes _108=0 _109
pack_past_election INLINECALLDICT // past_elections credits elect_at elect ds _110
s0 s3 s5 XCHG3
32 PUSHINT // elect credits ds _110 elect_at past_elections _111=32
DICTUSETB // elect credits ds past_elections
s0 s3 XCHG
NEWC // past_elections credits ds elect _113
STDICT // past_elections credits ds _114
s1 s2 XCHG // past_elections ds credits _114
STDICT // past_elections ds _115
s1 s2 XCHG // ds past_elections _115
STDICT // ds _116
SWAP // _116 ds
STSLICER // _117
ENDC // _118
c4 POP
TRUE // _120
}>
update_active_vset_id PROC:<{
//
load_data INLINECALLDICT // elect credits past_elections grams active_id active_hash
34 PUSHINT // elect credits past_elections grams active_id active_hash _8=34
CONFIGOPTPARAM // elect credits past_elections grams active_id active_hash _9
HASHCU // elect credits past_elections grams active_id active_hash cur_hash
s0 s1 PUSH2 // elect credits past_elections grams active_id active_hash cur_hash cur_hash active_hash
EQUAL // elect credits past_elections grams active_id active_hash cur_hash _11
IFJMP:<{ // elect credits past_elections grams active_id active_hash cur_hash
7 BLKDROP //
FALSE // _12
}> // elect credits past_elections grams active_id active_hash cur_hash
s2 PUSH // elect credits past_elections grams active_id active_hash cur_hash active_id
IF:<{ // elect credits past_elections grams active_id active_hash cur_hash
s2 s4 PUSH2
32 PUSHINT // elect credits past_elections grams active_id active_hash cur_hash active_id past_elections _15=32
DICTUGET
NULLSWAPIFNOT // elect credits past_elections grams active_id active_hash cur_hash fs f
IF:<{ // elect credits past_elections grams active_id active_hash cur_hash fs
32 LDU // elect credits past_elections grams active_id active_hash cur_hash _99 _98
NIP // elect credits past_elections grams active_id active_hash cur_hash fs
DUP // elect credits past_elections grams active_id active_hash cur_hash fs0 fs
32 LDU // elect credits past_elections grams active_id active_hash cur_hash fs0 _24 fs
256 LDU // elect credits past_elections grams active_id active_hash cur_hash fs0 _24 _103 _102
DROP // elect credits past_elections grams active_id active_hash cur_hash fs0 stake_held hash
s0 s4 XCHG2 // elect credits past_elections grams active_id stake_held cur_hash fs0 hash active_hash
EQUAL // elect credits past_elections grams active_id stake_held cur_hash fs0 _31
57 THROWIFNOT
NOW // elect credits past_elections grams active_id stake_held cur_hash fs0 _33
s0 s3 XCHG2 // elect credits past_elections grams active_id fs0 cur_hash _33 stake_held
ADD // elect credits past_elections grams active_id fs0 cur_hash unfreeze_time
NEWC // elect credits past_elections grams active_id fs0 cur_hash unfreeze_time _36
32 STU // elect credits past_elections grams active_id fs0 cur_hash _38
ROT // elect credits past_elections grams active_id cur_hash _38 fs0
STSLICER // elect credits past_elections grams active_id cur_hash _39
s0 s0 s4 XCHG3
32 PUSHINT // elect credits cur_hash grams _39 active_id past_elections _40=32
DICTUSETB // elect credits cur_hash grams past_elections
s0 s2 XCHG // elect credits past_elections grams cur_hash
}>ELSE<{
s1 s3 XCHG
3 BLKDROP // elect credits past_elections grams cur_hash
}>
}>ELSE<{
2 1 BLKDROP2 // elect credits past_elections grams cur_hash
}>
-1 PUSHINT // elect credits past_elections grams cur_hash id=-1
UNTIL:<{
s3 PUSH
32 PUSHINT // elect credits past_elections grams cur_hash id past_elections _46=32
DICTUGETNEXT
NULLSWAPIFNOT2 // elect credits past_elections grams cur_hash fs id f
DUP // elect credits past_elections grams cur_hash fs id f f
IF:<{ // elect credits past_elections grams cur_hash fs id f
s0 s2 XCHG // elect credits past_elections grams cur_hash f id fs
64 LDU // elect credits past_elections grams cur_hash f id _50 fs
256 LDU // elect credits past_elections grams cur_hash f id tm hash fs
s1 s5 PUSH2 // elect credits past_elections grams cur_hash f id tm hash fs hash cur_hash
EQUAL // elect credits past_elections grams cur_hash f id tm hash fs _56
IF:<{ // elect credits past_elections grams cur_hash f id tm hash fs
s4 POP // elect credits past_elections grams cur_hash fs id tm hash
s0 s3 XCHG // elect credits past_elections grams cur_hash hash id tm fs
LDDICT // elect credits past_elections grams cur_hash hash id tm _60 fs
LDGRAMS // elect credits past_elections grams cur_hash hash id tm _60 _62 fs
LDGRAMS // elect credits past_elections grams cur_hash hash id tm dict total_stake bonuses fs
s8 PUSH // elect credits past_elections grams cur_hash hash id tm dict total_stake bonuses fs grams
3 RSHIFT# // elect credits past_elections grams cur_hash hash id tm dict total_stake bonuses fs amount
s9 s9 XCPU // elect credits past_elections amount cur_hash hash id tm dict total_stake bonuses fs grams amount
SUB // elect credits past_elections amount cur_hash hash id tm dict total_stake bonuses fs grams
s2 s9 XCHG2 // elect credits past_elections grams cur_hash hash id tm dict total_stake fs bonuses amount
ADD // elect credits past_elections grams cur_hash hash id tm dict total_stake fs bonuses
s0 s4 XCHG
NEWC // elect credits past_elections grams cur_hash hash id bonuses dict total_stake fs tm _72
64 STU // elect credits past_elections grams cur_hash hash id bonuses dict total_stake fs _74
s1 s6 XCHG // elect credits past_elections grams cur_hash fs id bonuses dict total_stake hash _74
256 STU // elect credits past_elections grams cur_hash fs id bonuses dict total_stake _76
s1 s2 XCHG // elect credits past_elections grams cur_hash fs id bonuses total_stake dict _76
STDICT // elect credits past_elections grams cur_hash fs id bonuses total_stake _77
SWAP // elect credits past_elections grams cur_hash fs id bonuses _77 total_stake
STGRAMS // elect credits past_elections grams cur_hash fs id bonuses _78
SWAP // elect credits past_elections grams cur_hash fs id _78 bonuses
STGRAMS // elect credits past_elections grams cur_hash fs id _79
ROT // elect credits past_elections grams cur_hash id _79 fs
STSLICER // elect credits past_elections grams cur_hash id _80
s0 s0 s4 XCPUXC
32 PUSHINT // elect credits id grams cur_hash _80 id past_elections _81=32
DICTUSETB // elect credits id grams cur_hash past_elections
s0 s3 XCHG
FALSE
SWAP // elect credits past_elections grams cur_hash f id
}>ELSE<{
3 BLKDROP // elect credits past_elections grams cur_hash f id
}>
}>ELSE<{
s2 POP // elect credits past_elections grams cur_hash f id
}>
SWAP // elect credits past_elections grams cur_hash id f
NOT // elect credits past_elections grams cur_hash id _84
}> // elect credits past_elections grams cur_hash id
DUP // elect credits past_elections grams cur_hash id id
ISNULL // elect credits past_elections grams cur_hash id _85
IF:<{ // elect credits past_elections grams cur_hash id
DROP // elect credits past_elections grams cur_hash
0 PUSHINT // elect credits past_elections grams cur_hash _86=0
}>ELSE<{ // elect credits past_elections grams cur_hash _86
}> // elect credits past_elections grams active_hash active_id
SWAP // elect credits past_elections grams active_id active_hash
store_data INLINECALLDICT
TRUE // _89
}>
cell_hash_eq? PROCREF:<{
// vset expected_vset_hash
OVER // vset expected_vset_hash vset
ISNULL // vset expected_vset_hash _2
IF:<{ // vset expected_vset_hash
2DROP //
FALSE // _3
}>ELSE<{ // vset expected_vset_hash
SWAP // expected_vset_hash vset
HASHCU // expected_vset_hash _5
SWAP // _5 expected_vset_hash
EQUAL // _3
}>
}>
validator_set_installed PROC:<{
// ds elect credits
SWAP // ds credits elect
unpack_elect INLINECALLDICT // ds credits _44 _45 _46 _47 _48 _49 _50
5 1 BLKDROP2 // ds credits elect_at finished
IFNOTJMP:<{ // ds credits elect_at
3 BLKDROP //
FALSE // _11
}> // ds credits elect_at
s0 s2 XCHG // elect_at credits ds
LDDICT // elect_at credits past_elections ds
s3 s1 XCPU
32 PUSHINT // ds credits past_elections elect_at past_elections _17=32
DICTUGET
NULLSWAPIFNOT // ds credits past_elections fs f
IFNOTJMP:<{ // ds credits past_elections fs
4 BLKDROP //
FALSE // _19
}> // ds credits past_elections fs
64 PUSHINT // ds credits past_elections fs _21=64
SDSKIPFIRST // ds credits past_elections _22
256 PLDU // ds credits past_elections vset_hash
34 PUSHINT // ds credits past_elections vset_hash _25=34
CONFIGOPTPARAM // ds credits past_elections vset_hash _26
OVER // ds credits past_elections vset_hash _26 vset_hash
cell_hash_eq? INLINECALLDICT // ds credits past_elections vset_hash _27
36 PUSHINT // ds credits past_elections vset_hash _27 _28=36
CONFIGOPTPARAM // ds credits past_elections vset_hash _27 _29
ROT // ds credits past_elections _27 _29 vset_hash
cell_hash_eq? INLINECALLDICT // ds credits past_elections _27 _30
OR // ds credits past_elections _31
IFJMP:<{ // ds credits past_elections
FALSE // ds credits past_elections _32
NEWC // ds credits past_elections _32 _33
1 STI // ds credits past_elections _35
s1 s2 XCHG // ds past_elections credits _35
STDICT // ds past_elections _36
STDICT // ds _37
SWAP // _37 ds
STSLICER // _38
ENDC // _39
c4 POP
update_active_vset_id CALLDICT // _41
DROP //
TRUE // _42
}> // ds credits past_elections
3 BLKDROP //
FALSE // _43
}>
check_unfreeze PROC:<{
//
load_data INLINECALLDICT // elect credits past_elections grams active_id active_hash
-1 PUSHINT // elect credits past_elections grams active_id active_hash id=-1
UNTIL:<{
s4 PUSH
32 PUSHINT // elect credits past_elections grams active_id active_hash id past_elections _11=32
DICTUGETNEXT
NULLSWAPIFNOT2 // elect credits past_elections grams active_id active_hash fs id f
DUP // elect credits past_elections grams active_id active_hash fs id f f
IF:<{ // elect credits past_elections grams active_id active_hash fs id f
s0 s2 XCHG // elect credits past_elections grams active_id active_hash f id fs
32 LDU // elect credits past_elections grams active_id active_hash f id _39 _38
DROP // elect credits past_elections grams active_id active_hash f id unfreeze_at
NOW // elect credits past_elections grams active_id active_hash f id unfreeze_at _17
LEQ // elect credits past_elections grams active_id active_hash f id _18
s1 s4 PUSH2 // elect credits past_elections grams active_id active_hash f id _18 id active_id
NEQ // elect credits past_elections grams active_id active_hash f id _18 _19
AND // elect credits past_elections grams active_id active_hash f id _20
IF:<{ // elect credits past_elections grams active_id active_hash f id
NIP // elect credits past_elections grams active_id active_hash id
s5 s4 s4 XC2PU // elect active_hash id grams active_id credits past_elections id
unfreeze_all INLINECALLDICT // elect active_hash id grams active_id credits past_elections unused_prizes
s1 s4 XCHG // elect active_hash id past_elections active_id credits grams unused_prizes
ADD // elect active_hash id past_elections active_id credits grams
s6 s1 s3 PUSH3
s3 s5 s8 PUSH3 // elect active_hash id past_elections active_id credits grams elect credits past_elections grams active_id active_hash
store_data INLINECALLDICT
s0 s3 XCHG
s5 s4 XCHG2
FALSE
SWAP // elect credits past_elections grams active_id active_hash f id
}> // elect credits past_elections grams active_id active_hash f id
}>ELSE<{
s2 POP // elect credits past_elections grams active_id active_hash f id
}>
SWAP // elect credits past_elections grams active_id active_hash id f
NOT // elect credits past_elections grams active_id active_hash id _26
}> // elect credits past_elections grams active_id active_hash id
6 1 BLKDROP2 // id
ISNULL // _27
NOT // _28
}>
announce_new_elections PROC:<{
// ds elect credits
NIP // ds credits
36 PUSHINT // ds credits _4=36
CONFIGOPTPARAM // ds credits next_vset
ISNULL // ds credits _6
IFNOTJMP:<{ // ds credits
2DROP //
FALSE // _7
}> // ds credits
1 PUSHINT // ds credits _9=1
CONFIGOPTPARAM // ds credits _10
CTOS // ds credits _11
256 PLDU // ds credits elector_addr
MYADDR // ds credits elector_addr _16
REWRITESTDADDR // ds credits elector_addr my_wc my_addr
SWAP // ds credits elector_addr my_addr my_wc
INC // ds credits elector_addr my_addr _19
s0 s2 XCHG // ds credits _19 my_addr elector_addr
NEQ // ds credits _19 _20
OR // ds credits _21
IFJMP:<{ // ds credits
2DROP //
FALSE // _22
}> // ds credits
34 PUSHINT // ds credits _24=34
CONFIGOPTPARAM // ds credits cur_vset
DUP // ds credits cur_vset cur_vset
ISNULL // ds credits cur_vset _26
IFJMP:<{ // ds credits cur_vset
3 BLKDROP //
FALSE // _27
}> // ds credits cur_vset
get_validator_conf CALLDICT // ds credits cur_vset _74 _75 _76 _77
DROP
s2 POP // ds credits cur_vset elect_end_before elect_begin_before
s0 s2 XCHG // ds credits elect_begin_before elect_end_before cur_vset
CTOS // ds credits elect_begin_before elect_end_before _34
40 PUSHINT // ds credits elect_begin_before elect_end_before _34 _37
SDSKIPFIRST // ds credits elect_begin_before elect_end_before _38
32 PLDU // ds credits elect_begin_before elect_end_before cur_valid_until
NOW // ds credits elect_begin_before elect_end_before cur_valid_until t
s1 s3 XCPU // ds credits elect_begin_before elect_end_before t cur_valid_until elect_begin_before
SUB // ds credits elect_begin_before elect_end_before t t0
2DUP // ds credits elect_begin_before elect_end_before t t0 t t0
LESS // ds credits elect_begin_before elect_end_before t t0 _45
IFJMP:<{ // ds credits elect_begin_before elect_end_before t t0
6 BLKDROP //
FALSE // _46
}> // ds credits elect_begin_before elect_end_before t t0
2DUP // ds credits elect_begin_before elect_end_before t t0 t t0
SUB // ds credits elect_begin_before elect_end_before t t0 _47
60 LESSINT // ds credits elect_begin_before elect_end_before t t0 _49
IF:<{ // ds credits elect_begin_before elect_end_before t t0
NIP // ds credits elect_begin_before elect_end_before t
}>ELSE<{
DROP // ds credits elect_begin_before elect_end_before t
}>
17 PUSHINT // ds credits elect_begin_before elect_end_before t _52=17
CONFIGOPTPARAM // ds credits elect_begin_before elect_end_before t _53
CTOS // ds credits elect_begin_before elect_end_before t _54
LDGRAMS // ds credits elect_begin_before elect_end_before t _79 _78
DROP // ds credits elect_begin_before elect_end_before t min_stake
s0 s3 XCHG // ds credits min_stake elect_end_before t elect_begin_before
ADD // ds credits min_stake elect_end_before elect_at
s0 s1 PUXC // ds credits min_stake elect_at elect_at elect_end_before
SUB // ds credits min_stake elect_at elect_close
0 PUSHINT // ds credits min_stake elect_at elect_close _60=0
NEWDICT // ds credits min_stake elect_at elect_close _60=0 _61
s3 s4 XCHG
s2 s3 XCHG
FALSE
FALSE // ds credits elect_at elect_close min_stake _60=0 _61 _62 _63
pack_elect INLINECALLDICT // ds credits elect
NEWC // ds credits elect _65
STDICT // ds credits _66
STDICT // ds _67
SWAP // _67 ds
STSLICER // _68
ENDC // _69
c4 POP
TRUE // _71
}>
run_ticktock PROC:<{
// is_tock
DROP //
c4 PUSH // _2
CTOS // ds
LDDICT // _6 ds
LDDICT // elect credits ds
s2 PUSH // elect credits ds elect
ISNULL // elect credits ds _10
IF:<{ // elect credits ds
-ROT // ds elect credits
announce_new_elections CALLDICT // _18
0 THROWIF
}>ELSE<{ // elect credits ds
s0 s2 s1 PUSH3 // elect credits ds ds elect credits
conduct_elections CALLDICT // elect credits ds _12
0 THROWIF
-ROT // ds elect credits
validator_set_installed CALLDICT // _15
0 THROWIF
}>
update_active_vset_id CALLDICT // _21
0 THROWIF
check_unfreeze CALLDICT // _23
DROP //
}>
active_election_id PROC:<{
//
c4 PUSH // _1
CTOS // _2
PLDDICT // elect
DUP // elect elect
ISNULL // elect _4
IF:<{ // elect
DROP //
0 PUSHINT // _5=0
}>ELSE<{ // elect
CTOS // _7
32 PLDU // _5
}>
}>
participates_in PROC:<{
// validator_pubkey
c4 PUSH // validator_pubkey _2
CTOS // validator_pubkey _3
PLDDICT // validator_pubkey elect
DUP // validator_pubkey elect elect
ISNULL // validator_pubkey elect _5
IFJMP:<{ // validator_pubkey elect
2DROP //
0 PUSHINT // _6=0
}> // validator_pubkey elect
unpack_elect INLINECALLDICT // validator_pubkey _23 _24 _25 _26 _27 _28 _29
s2 s6 XCHG
6 BLKDROP // validator_pubkey members
8 PUSHPOW2 // validator_pubkey members _17=256
DICTUGET
NULLSWAPIFNOT // mem found
IF:<{ // mem
LDGRAMS // _33 _32
DROP // _19
}>ELSE<{ // mem
DROP //
0 PUSHINT // _19=0
}>
}>
participant_list PROC:<{
//
c4 PUSH // _1
CTOS // _2
PLDDICT // elect
DUP // elect elect
ISNULL // elect _4
IFJMP:<{ // elect
DROP //
PUSHNULL // _5
}> // elect
unpack_elect INLINECALLDICT // _35 _36 _37 _38 _39 _40 _41
s2 s6 XCHG
6 BLKDROP // members
PUSHNULL // members l
256 PUSHPOW2DEC // members l id
UNTIL:<{
s2 PUSH
8 PUSHPOW2 // members l id members _28=256
DICTUGETPREV
NULLSWAPIFNOT2 // members l fs id f
DUP // members l fs id f f
IF:<{ // members l fs id f
s0 s2 XCHG // members l f id fs
LDGRAMS // members l f id _46 _45
DROP // members l f id _31
s1 s(-1) PUXC // members l f id id _31
PAIR // members l f id _30
s0 s3 XCHG2 // members id f _30 l
CONS // members id f l
s0 s2 XCHG // members l f id
}>ELSE<{
s2 POP // members l f id
}>
SWAP // members l id f
NOT // members l id _34
}> // members l id
DROP
NIP // l
}>
participant_list_extended PROC:<{
//
c4 PUSH // _1
CTOS // _2
PLDDICT // elect
DUP // elect elect
ISNULL // elect _4
IFJMP:<{ // elect
DROP //
0 PUSHINT // _5=0
s0 s0 s0 PUSH3 // _5=0 _6=0 _7=0 _8=0
PUSHNULL // _5=0 _6=0 _7=0 _8=0 _9
s1 s1 PUSH2 // _5=0 _6=0 _7=0 _8=0 _9 _10=0 _11=0
}> // elect
unpack_elect INLINECALLDICT // elect_at elect_close min_stake total_stake members failed finished
PUSHNULL // elect_at elect_close min_stake total_stake members failed finished l
256 PUSHPOW2DEC // elect_at elect_close min_stake total_stake members failed finished l id
UNTIL:<{
s4 PUSH
8 PUSHPOW2 // elect_at elect_close min_stake total_stake members failed finished l id members _34=256
DICTUGETPREV
NULLSWAPIFNOT2 // elect_at elect_close min_stake total_stake members failed finished l cs id f
DUP // elect_at elect_close min_stake total_stake members failed finished l cs id f f
IF:<{ // elect_at elect_close min_stake total_stake members failed finished l cs id f
s0 s2 XCHG // elect_at elect_close min_stake total_stake members failed finished l f id cs
LDGRAMS // elect_at elect_close min_stake total_stake members failed finished l f id _41 cs
32 LDU // elect_at elect_close min_stake total_stake members failed finished l f id _41 _73 _72
NIP // elect_at elect_close min_stake total_stake members failed finished l f id _41 cs
32 LDU // elect_at elect_close min_stake total_stake members failed finished l f id _41 _46 cs
256 LDU // elect_at elect_close min_stake total_stake members failed finished l f id _41 _46 _49 cs
256 LDU // elect_at elect_close min_stake total_stake members failed finished l f id stake max_factor addr adnl_addr cs
ENDS
4 TUPLE // elect_at elect_close min_stake total_stake members failed finished l f id _57
s1 s(-1) PUXC // elect_at elect_close min_stake total_stake members failed finished l f id id _57
PAIR // elect_at elect_close min_stake total_stake members failed finished l f id _56
s0 s3 XCHG2 // elect_at elect_close min_stake total_stake members failed finished id f _56 l
CONS // elect_at elect_close min_stake total_stake members failed finished id f l
s0 s2 XCHG // elect_at elect_close min_stake total_stake members failed finished l f id
}>ELSE<{
s2 POP // elect_at elect_close min_stake total_stake members failed finished l f id
}>
SWAP // elect_at elect_close min_stake total_stake members failed finished l id f
NOT // elect_at elect_close min_stake total_stake members failed finished l id _59
}> // elect_at elect_close min_stake total_stake members failed finished l id
DROP
s3 POP // elect_at elect_close min_stake total_stake l failed finished
}>
compute_returned_stake PROC:<{
// wallet_addr
c4 PUSH // wallet_addr _2
CTOS // wallet_addr cs
LDDICT // wallet_addr _19 _18
NIP // wallet_addr cs
LDDICT // wallet_addr _21 _20
DROP // wallet_addr credits
8 PUSHPOW2 // wallet_addr credits _12=256
DICTUGET
NULLSWAPIFNOT // val f
IF:<{ // val
LDGRAMS // _25 _24
DROP // _14
}>ELSE<{ // val
DROP //
0 PUSHINT // _14=0
}>
}>
past_election_ids PROC:<{
//
load_data INLINECALLDICT // _19 _20 _21 _22 _23 _24
s3 s5 XCHG
5 BLKDROP // past_elections
32 PUSHPOW2 // past_elections id
PUSHNULL // past_elections id list
UNTIL:<{
s1 s2 XCPU
32 PUSHINT // past_elections list id past_elections _15=32
DICTUGETPREV
NULLSWAPIFNOT2 // past_elections list _26 _25 _27
s2 POP // past_elections list f id
OVER // past_elections list f id f
IF:<{ // past_elections list f id
s0 s2 PUXC // past_elections id f id list
CONS // past_elections id f list
s0 s2 XCHG // past_elections list f id
}> // past_elections list f id
SWAP // past_elections list id f
NOT // past_elections list id _18
s1 s2 XCHG // past_elections id list _18
}> // past_elections id list
2 1 BLKDROP2 // list
}>
past_elections PROC:<{
//
load_data INLINECALLDICT // _21 _22 _23 _24 _25 _26
s3 s5 XCHG
5 BLKDROP // past_elections
32 PUSHPOW2 // past_elections id
PUSHNULL // past_elections id list
UNTIL:<{
s1 s2 XCPU
32 PUSHINT // past_elections list id past_elections _15=32
DICTUGETPREV
NULLSWAPIFNOT2 // past_elections list fs id found
DUP // past_elections list fs id found found
IF:<{ // past_elections list fs id found
s0 s2 XCHG // past_elections list found id fs
unpack_past_election INLINECALLDICT // past_elections list found id _30 _31 _32 _33 _34 _35 _36
s7 PUSH
7 -ROLL // past_elections list found id id _30 _31 _32 _33 _34 _35 _36
8 TUPLE // past_elections list found id _17
s0 s3 XCHG2 // past_elections id found _17 list
CONS // past_elections id found list
s0 s2 XCHG // past_elections list found id
}>ELSE<{
s2 POP // past_elections list found id
}>
SWAP // past_elections list id found
NOT // past_elections list id _20
s1 s2 XCHG // past_elections id list _20
}> // past_elections id list
2 1 BLKDROP2 // list
}>
past_elections_list PROC:<{
//
load_data INLINECALLDICT // _28 _29 _30 _31 _32 _33
s3 s5 XCHG
5 BLKDROP // past_elections
32 PUSHPOW2 // past_elections id
PUSHNULL // past_elections id list
UNTIL:<{
s1 s2 XCPU
32 PUSHINT // past_elections list id past_elections _15=32
DICTUGETPREV
NULLSWAPIFNOT2 // past_elections list fs id found
DUP // past_elections list fs id found found
IF:<{ // past_elections list fs id found
s0 s2 XCHG // past_elections list found id fs
unpack_past_election INLINECALLDICT // past_elections list found id _37 _38 _39 _40 _41 _42 _43
4 BLKDROP // past_elections list found id unfreeze_at stake_held vset_hash
s3 PUSH
s3 s1 s3 XCHG3 // past_elections list found id id unfreeze_at vset_hash stake_held
4 TUPLE // past_elections list found id _25
s0 s3 XCHG2 // past_elections id found _25 list
CONS // past_elections id found list
s0 s2 XCHG // past_elections list found id
}>ELSE<{
s2 POP // past_elections list found id
}>
SWAP // past_elections list id found
NOT // past_elections list id _27
s1 s2 XCHG // past_elections id list _27
}> // past_elections id list
2 1 BLKDROP2 // list
}>
complete_unpack_complaint PROCREF:<{
// cs
unpack_complaint_status INLINECALLDICT // complaint voters vset_id weight_remaining
PUSHNULL // complaint voters vset_id weight_remaining voters_list
32 PUSHPOW2 // complaint voters vset_id weight_remaining voters_list voter_id
UNTIL:<{
s4 PUSH
16 PUSHINT // complaint voters vset_id weight_remaining voters_list voter_id voters _14=16
DICTUGETPREV
NULLSWAPIFNOT2 // complaint voters vset_id weight_remaining voters_list _27 _26 _28
s2 POP // complaint voters vset_id weight_remaining voters_list f voter_id
OVER // complaint voters vset_id weight_remaining voters_list f voter_id f
IF:<{ // complaint voters vset_id weight_remaining voters_list f voter_id
s0 s2 PUXC // complaint voters vset_id weight_remaining voter_id f voter_id voters_list
CONS // complaint voters vset_id weight_remaining voter_id f voters_list
s0 s2 XCHG // complaint voters vset_id weight_remaining voters_list f voter_id
}> // complaint voters vset_id weight_remaining voters_list f voter_id
SWAP // complaint voters vset_id weight_remaining voters_list voter_id f
NOT // complaint voters vset_id weight_remaining voters_list voter_id _17
}> // complaint voters vset_id weight_remaining voters_list voter_id
DROP
s3 POP // complaint voters_list vset_id weight_remaining
s0 s3 XCHG // weight_remaining voters_list vset_id complaint
CTOS // weight_remaining voters_list vset_id _20
unpack_complaint INLINECALLDICT // weight_remaining voters_list vset_id _29 _30 _31 _32 _33 _34 _35 _36
8 TUPLE // weight_remaining voters_list vset_id _19
s0 s3 XCHG // _19 voters_list vset_id weight_remaining
4 TUPLE // _18
}>
get_past_complaints PROCREF:<{
// election_id
load_data INLINECALLDICT // election_id _21 _22 _23 _24 _25 _26
s3 s5 XCHG
5 BLKDROP // election_id past_elections
32 PUSHINT // election_id past_elections _10=32
DICTUGET
NULLSWAPIFNOT // fs found?
IFNOTJMP:<{ // fs
DROP //
PUSHNULL // _12
}> // fs
unpack_past_election INLINECALLDICT // _29 _30 _31 _32 _33 _34 _35
6 1 BLKDROP2 // complaints
}>
show_complaint PROC:<{
// election_id chash
SWAP // chash election_id
get_past_complaints INLINECALLDICT // chash complaints
8 PUSHPOW2 // chash complaints _6=256
DICTUGET
NULLSWAPIFNOT // cs found
IF:<{ // cs
complete_unpack_complaint INLINECALLDICT // _8
}>ELSE<{ // cs
DROP //
PUSHNULL // _8
}>
}>
list_complaints PROC:<{
// election_id
get_past_complaints INLINECALLDICT // complaints
256 PUSHPOW2DEC // complaints id
PUSHNULL // complaints id list
UNTIL:<{
s1 s2 XCPU
8 PUSHPOW2 // complaints list id complaints _17=256
DICTUGETPREV
NULLSWAPIFNOT2 // complaints list cs id found?
DUP // complaints list cs id found? found?
IF:<{ // complaints list cs id found?
s0 s2 XCHG // complaints list found? id cs
complete_unpack_complaint INLINECALLDICT // complaints list found? id _19
s1 s(-1) PUXC // complaints list found? id id _19
PAIR // complaints list found? id _20
s0 s3 XCHG2 // complaints id found? _20 list
CONS // complaints id found? list
s0 s2 XCHG // complaints list found? id
}>ELSE<{
s2 POP // complaints list found? id
}>
SWAP // complaints list id found?
NOT // complaints list id _22
s1 s2 XCHG // complaints id list _22
}> // complaints id list
2 1 BLKDROP2 // list
}>
}END>c