File tree Expand file tree Collapse file tree 2 files changed +13
-10
lines changed
target_chains/ton/contracts/contracts Expand file tree Collapse file tree 2 files changed +13
-10
lines changed Original file line number Diff line number Diff line change 29
29
return ();
30
30
}
31
31
32
- ;; * A 32-bit (big-endian) unsigned integer `op`, identifying the `operation` to be performed, or the `method` of the smart contract to be invoked.
33
- int op = in_msg_body~load_uint(32);
34
- cell data = in_msg_body~load_ref();
35
- slice data_slice = data.begin_parse();
36
-
37
32
;; Get sender address from message
38
33
slice cs = in_msg_full.begin_parse();
39
34
int flags = cs~load_uint(4);
42
37
}
43
38
slice sender_address = cs~load_msg_addr(); ;; load sender address
44
39
40
+ ;; * A 32-bit (big-endian) unsigned integer `op`, identifying the `operation` to be performed, or the `method` of the smart contract to be invoked.
41
+ int op = in_msg_body~load_uint(32);
42
+ cell data = in_msg_body~load_ref();
43
+ slice data_slice = data.begin_parse();
44
+
45
45
;; * The remainder of the message body is specific for each supported value of `op`.
46
46
if (op == OP_UPDATE_GUARDIAN_SET) {
47
47
;; @notice Updates the guardian set based on a Wormhole VAA
Original file line number Diff line number Diff line change 18
18
return ();
19
19
}
20
20
21
- int op = in_msg_body~load_uint(32);
22
- cell data = in_msg_body~load_ref();
23
- slice data_slice = data.begin_parse();
24
-
25
21
;; Get sender address from message
26
22
slice cs = in_msg_full.begin_parse();
27
- cs~skip_bits(4); ;; skip flags
23
+ int flags = cs~load_uint(4); ;; load flags
24
+ if (flags & 1) {
25
+ return ();
26
+ }
28
27
slice sender_address = cs~load_msg_addr(); ;; load sender address
29
28
29
+ int op = in_msg_body~load_uint(32);
30
+ cell data = in_msg_body~load_ref();
31
+ slice data_slice = data.begin_parse();
32
+
30
33
if (op == OP_UPDATE_GUARDIAN_SET) {
31
34
update_guardian_set(data_slice);
32
35
} elseif (op == OP_UPDATE_PRICE_FEEDS) {
You can’t perform that action at this time.
0 commit comments