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
How do I delete a smart contract?

Is there is some way to remove unused smart-contract from TestNet/MainNet to reduce the bloating of the network, and to remove its functionality?

This question was imported from Telegram Chat: https://t.me/tondev_eng/3846

Posted 10 months ago
Votes Newest


You can use send_raw_message(cell msg, int mode) within the smart contract to act as the deletion of the smart contract.

This is because mode 128 will "carry all the remaining balance of the current smart contract instead of the value originally indicated in the message", essentially removing all of the TON from the smart contract. Mode 32 will cause the "current account must be destroyed if its resulting balance is zero", which in conjunction with 128 will cause the smart contract to be deleted.

So using mode = 160 with send_raw_message will essentially delete the smart contract.

Posted 10 months ago
Edited 10 months ago
384 × 5 Administrator
1 Answer
10 months ago
10 months ago