1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

updated tonlib

This commit is contained in:
ton 2019-10-04 21:17:47 +04:00
parent dd745485e2
commit 7c595294b6
12 changed files with 125 additions and 14 deletions

View file

@ -39,6 +39,34 @@
// { dup abs <# #s rot sign #> nip } : (.)
// { (.) type } : ._
// { ._ space } : .
{ dup 10 < { 48 } { 55 } cond + } : Digit
{ dup 10 < { 48 } { 87 } cond + } : digit
// x s b -- x' s'
{ -rot swap rot /mod Digit rot swap hold } : B#
{ -rot swap rot /mod digit rot swap hold } : b#
{ 16 B# } : X#
{ 16 b# } : x#
// x s b -- 0 s'
{ -rot { 2 pick B# over 0<= } until rot drop } : B#s
{ -rot { 2 pick b# over 0<= } until rot drop } : b#s
{ 16 B#s } : X#s
{ 16 b#s } : x#s
variable base
{ 10 base ! } : decimal
{ 16 base ! } : hex
{ 8 base ! } : octal
{ 2 base ! } : binary
{ base @ B# } : Base#
{ base @ b# } : base#
{ base @ B#s } : Base#s
{ base @ b#s } : base#s
// x w -- s
{ over abs <# rot 1- ' X# swap times X#s rot sign #> nip } : (0X.)
{ over abs <# rot 1- ' x# swap times x#s rot sign #> nip } : (0x.)
{ (0X.) type } : 0X._
{ 0X._ space } : 0X.
{ (0x.) type } : 0x._
{ 0x._ space } : 0x.
{ bl (-trailing) } : -trailing
{ char 0 (-trailing) } : -trailing0
{ char " word 1 ' $+ } ::_ +"

View file

@ -33,7 +33,7 @@ library TonUtil // TON Blockchain Fift Library
} : parse-smc-addr
// ( wc addr -- ) Show address in <workchain>:<account> form
{ swap ._ .":" x. } : .addr
{ swap ._ .":" 64 0x. } : .addr
// ( wc addr flags -- ) Show address in base64url form
{ smca>$ type } : .Addr
// ( wc addr fname -- ) Save address to file in 36-byte format