-
Notifications
You must be signed in to change notification settings - Fork 114
Expand file tree
/
Copy pathcompile.fif
More file actions
45 lines (30 loc) · 772 Bytes
/
compile.fif
File metadata and controls
45 lines (30 loc) · 772 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"contracts/highload-wallet-v3.fif" include
."⏳ Compiling..." cr cr
// convert code cell to hex and base64
2 boc+>B =: code-bytes
code-bytes B>x =: code-hex
code-bytes B>base64 =: code-base64
."✅ Compiled successfully! Cell BOC hex result:" cr cr
code-hex type cr cr
."⏳ Creating json output..." cr cr
// create json template
$<<"""
{
"hex": "",
"base64": ""
}
"""
12 $| 16 $|
=: json-template-part3
=: json-template-part2
=: json-template-part1
// create final json
json-template-part1
code-hex
json-template-part2
code-base64
json-template-part3
$+ $+ $+ $+ =: code-json
// write json to file
code-json $>B "build/HighloadWalletV3.compiled.json" B>file
."✅ Wrote compilation artifact to build/HighloadWalletV3.compiled.json" cr