Skip to content

Commit

Permalink
excs
Browse files Browse the repository at this point in the history
  • Loading branch information
Skydev0h committed Dec 26, 2023
1 parent bd02525 commit 5fbe154
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contracts/task3.fc
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@ cell migrate_one(cell old_storage) { ;; it's just a placeholder that is required
() 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
int expected_version = in_msg_body~load_uint(32);
cell expected_code = in_msg_body~load_maybe_ref();

if (expected_version == 0) {
ifnot (expected_code.null?()) {
set_code(expected_code);
}
set_data(begin_cell()
.store_uint(1, 32)
.store_ref(get_data())
Expand All @@ -53,6 +49,7 @@ cell migrate_one(cell old_storage) { ;; it's just a placeholder that is required
return();
}

cell expected_code = in_msg_body~load_maybe_ref();
cell migrations = in_msg_body~load_dict();
cell payload = in_msg_body~load_ref();

Expand All @@ -77,6 +74,7 @@ cell migrate_one(cell old_storage) { ;; it's just a placeholder that is required
set_c3(mc.begin_parse().bless());
storage = migrate_one(storage);
}
throw_if(400, version == next);
version = next;
}

Expand Down

0 comments on commit 5fbe154

Please sign in to comment.