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
Unanswered
Is it possible to change a deployed smart contract on TON?


Yes, it is possible to change the contract code in TON. Just implement it inside your smart contract that will be updating contract's code using FunC Standard Library (stdlib.fc) function:

() set_code(cell new_code) impure asm "SETCODE";

Simple implementation inside recv_internal:

#include "stdlib.fc";

global slice ctx_owner;

() recv_internal(int my_balance, int msg_value, cell in_msg_full, slice in_msg_body) impure {
	slice cs = in_msg_full.begin_parse();
	int flags = cs~load_uint(4);
	
	if (flags & 1) { ;; ignore all bounced messages
		return ();
	}
	
	;; Admin methods
	;; if the in_msg_body is empty, then it is a simple money transfer
	if (equal_slice_bits(sender_addr, ctx_owner) & (~ in_msg_body.slice_empty?())) {
		int op = in_msg_body~load_uint(32);
	
		if (op == "op::update_code"c) {
			set_code(in_msg_body~load_ref());
		}
	}
}

Also, you can find specification of set_code here: https://ton.org/docs/develop/func/stdlib/#set_code

  
  

Thanks for the mention! Just updated the answer!

Daniel   one year ago Report
224 Views
0 Answers
one year ago
one year ago