1
0
mirror of https://github.com/danog/toncontest.git synced 2024-11-30 04:29:14 +01:00
This commit is contained in:
Daniil Gentili 2019-10-14 20:56:37 +02:00
parent cf9c0ab46e
commit 014b675a9f
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7
2 changed files with 20 additions and 18 deletions

View File

@ -49,4 +49,4 @@ AsmOp compile_tuple_atq(std::vector<VarDescr>& res, std::vector<VarDescr>& args)
define_builtin_func("atq", TypeExpr::new_forall({X}, TypeExpr::new_map(TupleInt, X)), compile_tuple_atq);
```
As well as tuple set primitives (which I actually intended to implement in funC and use in a previous version of the wallet smart contract, then scrapped in favor of a simple dictionary).
...as well as tuple set primitives (which I actually intended to implement in funC and use in a previous version of the wallet smart contract, then scrapped in favor of a simple dictionary).

View File

@ -107,6 +107,9 @@ Scripts:
The `test.sh` script contains a full set of commands to test every fift script.
You might want to run each command inside `test.sh` separately (there are also multiple comments explaining what each line does in detail), or run `./test.sh | less` to be able to better review the output of each command.
What follows is a line-by-line description of the actions in `test.sh`.
The script starts by creating ten public/private keypairs using `gen-pub.fif`:
```
for f in {a..j}; do fift -s ../gen-pub.fif $f;done
@ -127,7 +130,6 @@ Instead, a **key ID** is used to distinguish signatures made by certain keys: th
In this case, the `a` key was the first key (`{a..j}` in Bash is shorthand for `a b c .. j`), so the ID is `0`.
What follows is the address, the seqno, the amount of grams and the savefile (`a`) for the query.
Some helper Bash functions are defined:
```
chr() { [ "$1" -lt 256 ] || return 1; printf "\\$(printf '%03o' "$1")"; }
@ -173,7 +175,7 @@ fift -s ../test.fif \
`test-update.sh` should be run after `test.sh`, it executes a similar set of operations:
* The wallet is initialized as before (10 signatures required to send message)
* The wallet is initialized as before (**10 signatures required** to send message)
* A simple message is created with only 1 signature (`a`), sending 10 grams to the wallet itself
* This message is sent to the wallet and stored, waiting for further (9 more) signatures
* A **code upgrade** message is created with only 1 signature (`a`): the upgrade sets to 3 the minimum number of required signatures