1
0
mirror of https://github.com/danog/toncontest.git synced 2024-11-26 20:15:01 +01:00
This commit is contained in:
Daniil Gentili 2019-09-29 14:08:38 +02:00
parent 6a5a7f9c3c
commit f5e5f6b0e7
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
6 changed files with 84 additions and 2 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
ton-db-dir

View File

@ -1,3 +1,3 @@
#!/bin/bash -e
$TONLIB_HOME/build/fift "$@"
$TONLIB_HOME/build/crypto/fift "$@"

View File

@ -1,3 +1,8 @@
#!/bin/bash -e
/home/daniil/repos/ton/build/crypto/func -WRS -o "$(basename $1 .fc).fif" "$TONLIB_HOME/crypto/smartcont/stdlib.fc" "$@"
[ $# -eq 0 ] && {
echo "No arguments provided!"
exit 1
}
$TONLIB_HOME/build/crypto/func -WRS -o "$(basename $1 .fc 2>/dev/null).fif" "$TONLIB_HOME/crypto/smartcont/stdlib.fc" "$@"

3
toolchain/bin/lite-client Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash -e
$TONLIB_HOME/build/crypto/lite-client/lite-client -C $TONLIB_HOME/build/ton-lite-client-test1.config.json -D $TONLIB_HOME/../ton-db-dir "$@"

View File

@ -24,4 +24,11 @@ cmake --build . --target lite-client
cmake --build . --target fift
cmake --build . --target func
rm -f ton-lite-client-test1.config.json
wget https://test.ton.org/ton-lite-client-test1.config.json
cd ../..
echo ""
echo "DONE! Restart your shell to apply changes and use the new fift, funcompile and lite-client commands."
echo ""

66
wallet-code.fif Normal file
View File

@ -0,0 +1,66 @@
"Asm.fif" include
// automatically generated from `/home/daniil/repos/contest/lib/crypto/smartcont/stdlib.fc` `wallet-code.fc`
PROGRAM{
DECLPROC recv_internal
DECLPROC recv_external
85143 DECLMETHOD seqno
recv_internal PROC:<{
DROP
}>
recv_external PROC:<{
9 PUSHPOW2
LDSLICEX
DUP
32 LDU
32 LDU
NOW
s1 s2 XCHG
LEQ
35 THROWIF
c4 PUSH
CTOS
32 LDU
256 LDU
ENDS
s3 s1 XCPU
EQUAL
33 THROWIFNOT
s0 s3 XCHG
HASHSU
s0 s4 s2 XC2PU
CHKSIGNU
34 THROWIFNOT
ACCEPT
s0 s2 XCHG
8 LDU
SWAP
1 EQINT
IF:<{
LDREF
SWAP
SETCODE
}>ELSE<{
WHILEEND:<{
DUP
SREFS
}>
8 LDU
LDREF
s0 s2 XCHG
SENDRAWMSG
}>
ENDS
INC
NEWC
32 STU
256 STU
ENDC
c4 POP
}>
seqno PROC:<{
c4 PUSH
CTOS
32 PLDU
}>
}END>c
2 boc+>B "RS" B>file