mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
updated smartcontract code
updated lite-client and configuration smartcontract updated tonlib code
This commit is contained in:
parent
8e5bd938aa
commit
bce33f588a
46 changed files with 677 additions and 299 deletions
|
@ -96,8 +96,8 @@ dictnew constant special-dict
|
|||
1 'nop
|
||||
} ::_ sg~
|
||||
|
||||
// gas_price gas_limit gas_credit block_gas_limit freeze_due_limit delete_due_limit -- c
|
||||
{ 6 0 reverse <b x{dd} s, swap 64 u, swap 64 u, swap 64 u, swap 64 u, swap 64 u, swap 64 u, b>
|
||||
// gas_price gas_limit spec_limit gas_credit block_gas_limit freeze_due_limit delete_due_limit -- c
|
||||
{ 7 0 reverse <b x{de} s, { swap 64 u, } 7 times b>
|
||||
} : make-gas-prices
|
||||
{ make-gas-prices 20 config! } : config.mc_gas_prices!
|
||||
{ make-gas-prices 21 config! } : config.gas_prices!
|
||||
|
@ -136,7 +136,6 @@ dictnew constant special-dict
|
|||
|
||||
{ <b swap dict, b> 7 config! } : config.to_mint!
|
||||
|
||||
|
||||
1000000000 constant Gram
|
||||
1000000 constant mGram
|
||||
1000 constant uGram
|
||||
|
@ -149,6 +148,7 @@ dictnew constant special-dict
|
|||
{ mGram swap */r } : mGram*/
|
||||
{ uGram swap */r } : uGram*/
|
||||
{ /r } : nGram*/
|
||||
|
||||
// GR$.17 is equivalent to 170000000
|
||||
{ bl word (number) ?dup 0= abort"not a valid Gram amount"
|
||||
1- { Gram swap */r } { Gram * } cond
|
||||
|
@ -157,8 +157,16 @@ dictnew constant special-dict
|
|||
|
||||
{ 10 << } : *Ki
|
||||
{ 20 << } : *Mi
|
||||
{ 30 << } : *Gi
|
||||
{ 10 <</r } : */Ki
|
||||
{ 20 <</r } : */Mi
|
||||
{ 30 <</r } : */Gi
|
||||
{ 1000 * } : *K
|
||||
{ 1000000 * } : *M
|
||||
{ 1000000000 * } : *G
|
||||
{ 1000 swap */r } : */K
|
||||
{ 1000000 swap */r } : */M
|
||||
{ 1000000000 swap */r } : */G
|
||||
|
||||
0 constant recv_internal
|
||||
-1 constant recv_external
|
||||
|
|
|
@ -168,9 +168,9 @@ elector_addr config.elector_smc!
|
|||
1 500 1000 500000 config.storage_prices!
|
||||
config.special!
|
||||
|
||||
// gas_price gas_limit gas_credit block_gas_limit freeze_due_limit delete_due_limit --
|
||||
1000 sg* 1000000 10000 10000000 GR$0.1 GR$1.0 config.gas_prices!
|
||||
10000 sg* 1000000 10000 10000000 GR$0.1 GR$1.0 config.mc_gas_prices!
|
||||
// gas_price gas_limit special_gas_limit gas_credit block_gas_limit freeze_due_limit delete_due_limit --
|
||||
1000 sg* 1 *M dup 10000 10 *M GR$0.1 GR$1.0 config.gas_prices!
|
||||
10000 sg* 1 *M 10 *M 10000 10 *M GR$0.1 GR$1.0 config.mc_gas_prices!
|
||||
// lump_price bit_price cell_price ihr_factor first_frac next_frac
|
||||
1000000 1000 sg* 100000 sg* 3/2 sg*/ 1/3 sg*/ 1/3 sg*/ config.fwd_prices!
|
||||
10000000 10000 sg* 1000000 sg* 3/2 sg*/ 1/3 sg*/ 1/3 sg*/ config.mc_fwd_prices!
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
"Asm.fif" include
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
"Asm.fif" include
|
||||
|
||||
|
@ -6,10 +6,9 @@
|
|||
."Creates a new wallet in specified workchain, with private key saved to or loaded from <filename-base>.pk" cr
|
||||
."('new-wallet.pk' by default)" cr 1 halt
|
||||
} : usage
|
||||
def? $# { @' $# 1- -2 and ' usage if } if
|
||||
$# 1- -2 and ' usage if
|
||||
|
||||
Basechain constant wc // create a wallet in workchain 0 (basechain)
|
||||
def? $1 { @' $1 parse-workchain-id =: wc } if // set workchain id from command line argument
|
||||
$1 parse-workchain-id =: wc // set workchain id from command line argument
|
||||
def? $2 { @' $2 } { "new-wallet" } cond constant file-base
|
||||
|
||||
."Creating new wallet in workchain " wc . cr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
|
||||
{ ."usage: " @' $0 type ." [<savefile>]" cr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
|
||||
{ ."usage: " @' $0 type ." <filename-base>" cr
|
||||
|
|
|
@ -1,29 +1,21 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
|
||||
{ ."usage: " @' $0 type ." <dest-addr> <seqno> <amount> [<savefile>]" cr
|
||||
."Creates a request to TestGiver and saves it into <savefile>.boc" cr
|
||||
."('testgiver-query.boc' by default)" cr 1 halt
|
||||
} : usage
|
||||
def? $# { @' $# 3 - -2 and ' usage if } if
|
||||
|
||||
$# 3 - -2 and ' usage if
|
||||
|
||||
// "testgiver.addr" load-address
|
||||
Masterchain 0x8156775b79325e5d62e742d9b96c30b6515a5cd2f1f64c5da4b193c03f070e0d
|
||||
2constant giver_addr
|
||||
."Test giver address = " giver_addr 2dup .addr cr 6 .Addr cr
|
||||
|
||||
Basechain 0x60c04141c6a7b96d68615e7a91d265ad0f3a9a922e9ae9c901d4fa83f5d3c0d0
|
||||
2constant dest_addr
|
||||
false constant bounce
|
||||
|
||||
0 constant seqno
|
||||
GR$6.666 constant amount
|
||||
|
||||
def? $3 {
|
||||
@' $1 bounce parse-load-address =: bounce 2=: dest_addr
|
||||
@' $2 parse-int =: seqno
|
||||
@' $3 $>GR =: amount
|
||||
} if
|
||||
$1 true parse-load-address =: bounce 2=: dest_addr
|
||||
$2 parse-int =: seqno
|
||||
$3 $>GR =: amount
|
||||
def? $4 { @' $4 } { "testgiver-query" } cond constant savefile
|
||||
|
||||
."Requesting " amount .GR ."to account "
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
|
||||
{ ."usage: " @' $0 type ." <filename-base> <seqno> [<savefile>]" cr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
|
||||
{ ."usage: " @' $0 type ." <filename-base> <seqno> <index> <new-value-boc> [<savefile>]" cr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
|
||||
{ ."usage: " @' $0 type ." <filename-base> <seqno> [<savefile>]" cr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
|
||||
{ ."usage: " @' $0 type ." <wallet-addr> <elect-utime> <max-factor> <adnl-addr> [<savefile>]" cr
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
|
||||
{ ."usage: " @' $0 type ." <wallet-addr> <elect-utime> <max-factor> <adnl-addr> <validator-pubkey> <validator-signature> [<savefile>]" cr
|
||||
|
|
|
@ -1,26 +1,20 @@
|
|||
#!/usr/bin/fift -s
|
||||
#!/usr/bin/env fift -s
|
||||
"TonUtil.fif" include
|
||||
|
||||
{ ."usage: " @' $0 type ." <filename-base> <dest-addr> <seqno> <amount> [-B <body-boc>] [<savefile>]" cr
|
||||
."Creates a request to simple wallet created by new-wallet.fif, with private key loaded from file <filename-base>.pk "
|
||||
."and address from <filename-base>.addr, and saves it into <savefile>.boc ('wallet-query.boc' by default)" cr 1 halt
|
||||
} : usage
|
||||
$# dup 4 < swap 5 > or ' usage if
|
||||
def? $6 { @' $5 "-B" $= { @' $6 =: body-boc-file [forget] $6 def? $7 { @' $7 =: $5 [forget] $7 } { [forget] $5 } cond
|
||||
@' $# 2- =: $# } if } if
|
||||
def? $# { @' $# dup 4 < swap 5 > or ' usage if } if
|
||||
|
||||
"new-wallet" constant file-base
|
||||
Basechain 0x13CB612A00A7C092C7DFD2EA45D603A9B54591BA4C88F71E707E009B879F0FB2 2constant dest_addr
|
||||
0 constant seqno
|
||||
GR$.666 constant amount
|
||||
true constant bounce
|
||||
|
||||
def? $4 {
|
||||
@' $1 =: file-base
|
||||
@' $2 bounce parse-load-address =: bounce 2=: dest_addr
|
||||
@' $3 parse-int =: seqno
|
||||
@' $4 $>GR =: amount
|
||||
} if
|
||||
$1 =: file-base
|
||||
$2 bounce parse-load-address =: bounce 2=: dest_addr
|
||||
$3 parse-int =: seqno
|
||||
$4 $>GR =: amount
|
||||
def? $5 { @' $5 } { "wallet-query" } cond constant savefile
|
||||
|
||||
file-base +".addr" load-address
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue