Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Back to post

Revisions 2

one year ago
A problem with parsing the commentaries
Парсинг комментариев
For some reason I can't parse commentary that I receive in a transaction. This commentary is specified when sending ton coins from a wallet to a smart contract. Here is the code of the contract: ```func int balance() inline_ref method_id { return get_balance().pair_first(); } (int) load_data() inline { var ds = get_data().begin_parse(); return (ds~load_uint(8)); } int test() method_id { var (test) = load_data(); return test; } () recv_internal (int msg_value, cell in_msg_full, slice in_msg) impure { int op = in_msg~load_uint(32); if (op == 0) { int kek = in_msg~load_uint(8); set_data(begin_cell().store_uint(kek, 8).end_cell()); } } ``` When I call the `test`getter I always get 0. I know about the unicode encoding, I've tried to load different size from in_msg. What can cause the problem?
Добрый день! Не понимаю почему не получается распарсить комментарий, который приходит в транзакции Комментарий указаывается при отправке граммов с кошелька на смартконтракт. Прикладываю код смартконтракта: ``` int balance() inline_ref method_id { return get_balance().pair_first(); } (int) load_data() inline { var ds = get_data().begin_parse(); return (ds~load_uint(8)); } int test() method_id { var (test) = load_data(); return test; } () recv_internal (int msg_value, cell in_msg_full, slice in_msg) impure { int op = in_msg~load_uint(32); if (op == 0) { int kek = in_msg~load_uint(8); set_data(begin_cell().store_uint(kek, 8).end_cell()); } } ``` Вызывая геттер test, всегда получаю 0. про кодирование unicode знаю, пробовал разный размер грузить из in_msg. Буду благодарен за помощь
#errors #func
#
one year ago
Original
Парсинг комментариев

Добрый день! Не понимаю почему не получается распарсить комментарий, который приходит в транзакции Комментарий указаывается при отправке граммов с кошелька на смартконтракт. Прикладываю код смартконтракта: ``` int balance() inline_ref method_id { return get_balance().pair_first(); } (int) load_data() inline { var ds = get_data().begin_parse(); return (ds~load_uint(8)); } int test() method_id { var (test) = load_data(); return test; } () recv_internal (int msg_value, cell in_msg_full, slice in_msg) impure { int op = in_msg~load_uint(32); if (op == 0) { int kek = in_msg~load_uint(8); set_data(begin_cell().store_uint(kek, 8).end_cell()); } } ``` Вызывая геттер test, всегда получаю 0. про кодирование unicode знаю, пробовал разный размер грузить из in_msg. Буду благодарен за помощь
#