Skip to content

Commit

Permalink
test 0
Browse files Browse the repository at this point in the history
  • Loading branch information
Skydev0h committed Dec 26, 2023
1 parent 4e22d7d commit 34cab7b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions contracts/task3.fc
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ cell migrate_one(cell old_storage) { return old_storage; }
;; Custom version-specific code ends >>>>>

() recv_internal(int msg_value, int balance, cell in_msg_full, slice in_msg_body) impure {
if (in_msg_body.slice_bits() < 32) { return(); } ;; deploy / ordinary
if (in_msg_body.slice_bits() < 34) { return(); } ;; deploy / ordinary
int expected_version = in_msg_body~load_uint(32);
cell expected_code = in_msg_body~load_maybe_ref();
cell migrations = in_msg_body~load_dict();
cell payload = in_msg_body~load_ref();

if (expected_version == 0) {
if (expected_code.null?()) {
if (migrations.dict_empty?()) {
;; if (expected_code.null?()) {
;; if (migrations.dict_empty?()) {
set_data(begin_cell()
.store_uint(1, 32)
.store_uint(0, 32)
.store_ref(get_data())
.end_cell()
);
return ();
}
}
;; }
;; }
}

slice ds = get_data().begin_parse();
Expand Down

0 comments on commit 34cab7b

Please sign in to comment.