1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-13 03:32:22 +00:00
ton/crypto/func/test/b3.fc
2019-10-09 20:00:54 +04:00

20 lines
376 B
Text

;; inline test
_ unpack() inline {
var ds = get_data().begin_parse();
var res = (ds~load_uint(8), ds~load_int(32), ds~load_int(32));
return res;
}
() pack(a, x, y) impure inline_ref {
set_data(begin_cell()
.store_uint(a, 8)
.store_int(x, 32)
.store_int(y, 32)
.end_cell());
}
() main() impure {
var (a, x, y) = unpack();
x += y;
pack(a, x, y);
}