1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-02-13 11:42:18 +00:00
ton/crypto/func/test/b3.fc

21 lines
376 B
Text
Raw Normal View History

2019-10-09 16:00:54 +00:00
;; 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);
}