diff --git a/contracts/task2.fc b/contracts/task2.fc index b429b41..1348014 100755 --- a/contracts/task2.fc +++ b/contracts/task2.fc @@ -9,36 +9,39 @@ slice cin_msg = in_msg_full.begin_parse(); cin_msg~load_uint(4); - slice store = get_data().begin_parse(); - - (int chain, int dir) = store~load_msg_addr().parse_std_addr(); - - cell diccionario = store~load_dict(); - + if (op == 0x368ddef3) { + slice store = get_data().begin_parse(); + (int chain, int dir) = parse_std_addr(store~load_msg_addr()); + cell diccionario = store~load_dict(); + (int chain, int dir2) = parse_std_addr(cin_msg~load_msg_addr()); throw_unless(120, dir == dir2); in_msg_body~load_uint(64); (int chain, int dir3) = parse_std_addr(in_msg_body~load_msg_addr()); - diccionario~udict_set(256, dir3, in_msg_body); set_data(begin_cell() .store_uint(1 << 10, 11) .store_uint(dir, 256) - .store_dict(diccionario) + .store_dict(diccionario~udict_set(256, dir3, in_msg_body)) .end_cell()); } if (op == 0x278205c8) { - slice dd = cin_msg~load_msg_addr(); - (int chain, int dir2) = dd.parse_std_addr(); + + slice store = get_data().begin_parse(); + (int chain, int dir) = parse_std_addr(store~load_msg_addr()); + cell diccionario = store~load_dict(); + + + + (int chain, int dir2) = parse_std_addr(cin_msg~load_msg_addr()); throw_unless(120, dir == dir2); in_msg_body~load_uint(64); - dd = in_msg_body~load_msg_addr(); - (int chain, int dir3) = dd.parse_std_addr(); + (int chain, int dir3) = parse_std_addr(in_msg_body~load_msg_addr()); throw_unless(121, diccionario~udict_delete?(256, dir3)); set_data(begin_cell() .store_uint(1 << 10, 11) @@ -49,7 +52,13 @@ if (op == 0x7362d09c) { - (int llave, slice valor, int num) = diccionario.udict_get_min?(256); + + slice store = get_data().begin_parse(); + (int chain, int dir) = parse_std_addr(store~load_msg_addr()); + cell diccionario = store~load_dict(); + + + (int llave, slice valor, int num) = diccionario.udict_get_min?(256); throw_unless(122, num); int ts = 0; while(num){ @@ -92,6 +101,13 @@ if (op == 0x68530b3) { + + slice store = get_data().begin_parse(); + (int chain, int dir) = parse_std_addr(store~load_msg_addr()); + cell diccionario = store~load_dict(); + + + (int llave, slice valor, int num) = diccionario.udict_get_min?(256); throw_unless(122, num); int ts = 0;