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
Answered
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 one year ago
Votes Newest

Answers


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 one year ago
Edited one year ago
Jeremy
404 × 5 Administrator
4K Views
1 Answer
one year ago
one year ago
Tags