Skip to content

Commit

Permalink
experiment
Browse files Browse the repository at this point in the history
  • Loading branch information
Skydev0h committed Dec 26, 2023
1 parent 9f56e6e commit bd02525
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion contracts/task3.fc
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,12 @@ 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 @@ -49,7 +53,6 @@ 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 Down

0 comments on commit bd02525

Please sign in to comment.