1
0
mirror of https://github.com/danog/toncontest.git synced 2024-12-02 09:27:47 +01:00
toncontest/wallet/wallet-code.fif

331 lines
4.8 KiB
Plaintext
Raw Normal View History

2019-10-03 21:54:25 +02:00
"Asm.fif" include
// automatically generated from `/home/daniil/repos/contest/lib/crypto/smartcont/stdlib.fc` `wallet-code.fc`
PROGRAM{
2019-10-04 19:09:10 +02:00
DECLPROC ~collect_garbage
2019-10-04 16:12:48 +02:00
DECLPROC store_db
2019-10-03 21:54:25 +02:00
DECLPROC recv_internal
DECLPROC recv_external
85143 DECLMETHOD seqno
2019-10-07 17:08:09 +02:00
119659 DECLMETHOD getKey
66593 DECLMETHOD getId
124239 DECLMETHOD getPartials
87848 DECLMETHOD getPartialsById
2019-10-11 13:31:10 +02:00
125107 DECLMETHOD getPartialByKey
100959 DECLMETHOD getPartialByHash
2019-10-04 19:09:10 +02:00
~collect_garbage PROC:<{
2019-10-04 16:12:48 +02:00
-1 PUSHINT
UNTIL:<{
OVER
8 PUSHPOW2
DICTUGETNEXT
NULLSWAPIFNOT
NULLSWAPIFNOT
2019-10-03 21:54:25 +02:00
DUP
2019-10-04 16:12:48 +02:00
IF:<{
s0 s2 XCHG
2019-10-04 19:09:10 +02:00
SKIPDICT
32 PLDU
2019-10-04 16:12:48 +02:00
NOW
LEQ
IF:<{
2019-10-04 18:00:14 +02:00
8 PUSHPOW2
s1 s3 s3 PUXC2
DICTUDEL
DROP
}>ELSE<{
s0 s2 XCHG
2019-10-04 16:12:48 +02:00
}>
}>ELSE<{
2019-10-04 18:00:14 +02:00
2SWAP
DROP
2019-10-04 16:12:48 +02:00
}>
SWAP
NOT
2019-10-04 18:00:14 +02:00
s1 s2 XCHG
2019-10-03 21:54:25 +02:00
}>
2019-10-04 16:12:48 +02:00
DROP
}>
store_db PROC:<{
2019-10-03 21:54:25 +02:00
NEWC
2019-10-04 16:12:48 +02:00
s1 s3 XCHG
2019-10-03 21:54:25 +02:00
32 STU
2019-10-04 16:12:48 +02:00
STDICT
STDICT
2019-10-03 21:54:25 +02:00
ENDC
c4 POP
}>
2019-10-04 16:12:48 +02:00
recv_internal PROC:<{
DROP
}>
2019-10-04 18:00:14 +02:00
recv_external PROC:<{
1 LDU
SWAP
2019-10-09 17:18:04 +02:00
32 THROWIF
2019-10-04 18:00:14 +02:00
DUP
1 PLDU
33 THROWIFNOT
LDDICT
DUP
32 LDU
32 LDU
NOW
2019-10-11 13:31:10 +02:00
s1 s3 XCHG
2019-10-04 18:00:14 +02:00
LEQ
34 THROWIF
2019-10-11 13:31:10 +02:00
s2 PUSH
2019-10-04 18:00:14 +02:00
HASHSU
c4 PUSH
CTOS
32 LDU
4 LDU
2019-10-10 17:37:47 +02:00
LDDICT
2019-10-04 18:00:14 +02:00
LDDICT
ENDS
2019-10-11 13:31:10 +02:00
0 PUSHINT
s4 PUSH
2019-10-04 18:00:14 +02:00
NEWDICT
2019-10-11 13:31:10 +02:00
s0 s8 XCHG
2019-10-04 18:00:14 +02:00
EQUAL
IF:<{
2019-10-10 17:37:47 +02:00
s0 s4 XCHG
2019-10-04 18:00:14 +02:00
INC
}>ELSE<{
2019-10-11 13:31:10 +02:00
DROP
s7 POP
s3 s6 PUSH2
2019-10-04 18:00:14 +02:00
8 PUSHPOW2
DICTUGET
NULLSWAPIFNOT
2019-10-07 21:18:31 +02:00
35 THROWIFNOT
2019-10-11 13:31:10 +02:00
4 LDU
s4 s8 XCHG2
SWAP
2019-10-04 18:00:14 +02:00
}>
ACCEPT
2019-10-11 13:31:10 +02:00
-1 PUSHINT
2019-10-04 18:00:14 +02:00
UNTIL:<{
2019-10-10 17:37:47 +02:00
s10 PUSH
2019-10-04 18:00:14 +02:00
4 PUSHINT
DICTUGETNEXT
NULLSWAPIFNOT
NULLSWAPIFNOT
DUP
IF:<{
2019-10-10 17:37:47 +02:00
DROP
s0 s4 PUSH2
4 PUSHINT
DICTUGET
NULLSWAPIFNOT
DUP
36 THROWIFNOT
s3 s(-1) s0 PUXC2
256 PLDU
s10 s2 s2 PUXC2
2019-10-04 18:00:14 +02:00
CHKSIGNU
37 THROWIFNOT
2019-10-11 13:31:10 +02:00
s1 s9 PUSH2
2019-10-04 18:00:14 +02:00
4 PUSHINT
2019-10-11 13:31:10 +02:00
DICTUGET
NULLSWAPIFNOT
NIP
NOT
IF:<{
s1 s2 XCHG
4 PUSHINT
s3 s10 s10 PUXC2
DICTUSET
s0 s6 XCHG
INC
}>ELSE<{
s0 s9 XCHG
s1 s7 s7 XCHG3
DROP
}>
2019-10-04 18:00:14 +02:00
}>ELSE<{
2019-10-11 13:31:10 +02:00
s0 s9 XCHG
s1 s7 s7 XCHG3
2019-10-04 18:00:14 +02:00
DROP
}>
2019-10-11 13:31:10 +02:00
s0 s8 XCHG
2019-10-04 18:00:14 +02:00
NOT
2019-10-11 13:31:10 +02:00
s6 s8 XCHG
2019-10-04 18:00:14 +02:00
}>
DROP
2019-10-10 17:37:47 +02:00
s9 POP
2019-10-11 13:31:10 +02:00
s0 s6 XCHG
2019-10-04 18:00:14 +02:00
8 LDU
LDREF
ENDS
2019-10-11 13:31:10 +02:00
s4 s3 PUSH2
GEQ
2019-10-04 18:00:14 +02:00
IF:<{
2019-10-11 13:31:10 +02:00
s4 POP
s5 POP
s6 POP
s0 s3 XCHG
SENDRAWMSG
ROT
8 PUSHPOW2
DICTUDEL
DROP
}>ELSE<{
2DROP
4 PUSHINT
2019-10-04 18:00:14 +02:00
NEWC
2019-10-11 13:31:10 +02:00
s1 s0 s4 XCHG3
STUX
s1 s4 XCHG
2019-10-04 18:00:14 +02:00
STDICT
2019-10-11 13:31:10 +02:00
s0 s5 XCHG2
STSLICER
s0 s1 s3 XCHG3
2019-10-04 18:00:14 +02:00
8 PUSHPOW2
2019-10-11 13:31:10 +02:00
DICTUSETB
2019-10-04 18:00:14 +02:00
}>
2019-10-04 19:09:10 +02:00
~collect_garbage CALLDICT
2019-10-11 13:31:10 +02:00
s0 s3 XCHG
2019-10-04 18:00:14 +02:00
INC
NEWC
32 STU
4 STU
2019-10-10 17:37:47 +02:00
STDICT
2019-10-04 18:00:14 +02:00
STDICT
ENDC
c4 POP
}>
2019-10-03 21:54:25 +02:00
seqno PROC:<{
c4 PUSH
CTOS
32 PLDU
}>
2019-10-07 17:08:09 +02:00
getKey PROC:<{
c4 PUSH
CTOS
2019-10-11 13:31:10 +02:00
40 PUSHINT
2019-10-07 17:08:09 +02:00
SDSKIPFIRST
2019-10-10 17:37:47 +02:00
PLDDICT
4 PUSHINT
DICTUGET
NULLSWAPIFNOT
DUP
NOT
IFJMP:<{
NIP
0 PUSHINT
}>
DROP
2019-10-07 17:08:09 +02:00
-1 PUSHINT
SWAP
2019-10-10 17:37:47 +02:00
256 PLDU
2019-10-07 17:08:09 +02:00
}>
getId PROC:<{
c4 PUSH
CTOS
2019-10-11 13:31:10 +02:00
40 PUSHINT
2019-10-07 17:08:09 +02:00
SDSKIPFIRST
2019-10-10 17:37:47 +02:00
PLDDICT
2019-10-07 17:08:09 +02:00
0 PUSHINT
2019-10-10 17:37:47 +02:00
DUP
2019-10-07 17:08:09 +02:00
UNTIL:<{
2019-10-10 17:37:47 +02:00
DROP
OVER
4 PUSHINT
DICTUGETNEXT
NULLSWAPIFNOT
NULLSWAPIFNOT
DUP
NOT
s0 s3 XCHG
256 PLDU
2019-10-07 21:18:31 +02:00
s5 PUSH
2019-10-07 17:08:09 +02:00
EQUAL
2019-10-10 17:37:47 +02:00
s1 s3 XCHG
2019-10-07 21:18:31 +02:00
OR
s1 s2 XCHG
}>
s2 POP
2019-10-10 17:37:47 +02:00
s2 POP
2019-10-07 21:18:31 +02:00
IFJMP:<{
-1 PUSHINT
SWAP
2019-10-07 17:08:09 +02:00
}>
2019-10-07 21:18:31 +02:00
DROP
2019-10-07 17:08:09 +02:00
0 PUSHINT
DUP
}>
getPartials PROC:<{
c4 PUSH
CTOS
2019-10-11 13:31:10 +02:00
40 PUSHINT
2019-10-07 17:08:09 +02:00
SDSKIPFIRST
2019-10-10 17:37:47 +02:00
SKIPDICT
2019-10-07 17:08:09 +02:00
PLDDICT
}>
getPartialsById PROC:<{
c4 PUSH
CTOS
2019-10-11 13:31:10 +02:00
40 PUSHINT
2019-10-07 17:08:09 +02:00
SDSKIPFIRST
2019-10-10 17:37:47 +02:00
SKIPDICT
2019-10-07 17:08:09 +02:00
PLDDICT
NEWDICT
0 PUSHINT
UNTIL:<{
s2 PUSH
8 PUSHPOW2
DICTUGETNEXT
NULLSWAPIFNOT
NULLSWAPIFNOT
DUP
IF:<{
s0 s2 XCHG
PLDREF
DUP
CTOS
PLDDICT
s6 s(-1) PUXC
4 PUSHINT
DICTUGET
2019-10-11 13:31:10 +02:00
NULLSWAPIFNOT
2019-10-07 17:08:09 +02:00
NIP
IF:<{
SWAP
8 PUSHPOW2
s1 s4 s4 PUXC2
DICTUSETREF
}>ELSE<{
s1 s3 XCHG
DROP
}>
}>ELSE<{
2SWAP
DROP
}>
SWAP
NOT
s1 s2 XCHG
}>
s1 s3 XCHG
3 BLKDROP
}>
2019-10-11 13:31:10 +02:00
getPartialByKey PROC:<{
2019-10-07 17:08:09 +02:00
getId CALLDICT
SWAP
IFNOTJMP:<{
DROP
NEWDICT
}>
getPartialsById CALLDICT
}>
2019-10-11 13:31:10 +02:00
getPartialByHash PROC:<{
2019-10-09 17:18:04 +02:00
c4 PUSH
CTOS
2019-10-11 13:31:10 +02:00
40 PUSHINT
2019-10-09 17:18:04 +02:00
SDSKIPFIRST
2019-10-10 17:37:47 +02:00
SKIPDICT
2019-10-09 17:18:04 +02:00
PLDDICT
8 PUSHPOW2
DICTUGETOPTREF
}>
2019-10-03 21:54:25 +02:00
}END>c