<p>I don't think &quot;disabling&quot; a contract is possible since a &quot;contract&quot; in Cardano is not deployed anywhere on chain. The script/contract is supplied with a transaction that wants to spend UTXOs sitting at the contract address (which is basically a hash of the script code). Anybody can construct such at transaction at any time and the validator node will need to validate it.</p>
<p>The network will not be congested because as others have pointed out &quot;contracts&quot; in Cardano are completely passive and do not run on their own. They only run if a transaction wants to spend UTXOs sitting at the script address. If somebody would want to attack the network and construct millions of such transactions to run the code it would ruin him because each transaction has to pay fees and the fees are based on the resources needed to run the script. The more computational/memory heavy the script is the more fees you have to pay.</p>

CC BY-SA 4.0
2021-08-13T14:40:21.520Z
2021-08-13T14:40:21.520Z
Piotr Gorzelany
<blockquote>
<p>I would think that if the contract gets needlessly validated (for the rest of eternity [yikes!])</p>
</blockquote>
<p>Ah. This is a misunderstanding. <em>Scripts are completely passive.</em> Nothing gets run unless a transaction interacts with it.</p>
<p>So, in the case of a contract that pays a beneficiary, the script doesn't do that for you, it includes a validator that says &quot;yes&quot; or &quot;no&quot; to anyone trying to spend the UTxOs at the script address.</p>

CC BY-SA 4.0
2021-08-12T18:55:08.377Z
Ok, so allow me to rephrase: Is it correct that if all the constraints of the submitted tran end up being satisfied, then the tran stops being validated?
Kwaggy
CC BY-SA 4.0
2021-08-12T19:10:43.617Z
"constraints of the submitted tran end up being satisfied." You can build a transaction that satisfies whatever constraints you give it, but you can only interact with scripts with transactions that meet the constraints of scripts' validators. "then the tran stops being validated?" Do you mean the transaction is invalid? Any transaction that meets the constraints of the script's validator can spend UTxOs (either to take them or to update the state) from the script address. In perpetuity. That being said, there would be no reason to interact with a script that doesn't have anything to spend.
Mitchell Turner
CC BY-SA 4.0
2021-08-12T18:23:51.173Z
2021-08-12T18:23:51.173Z
Mitchell Turner
<p>After a contract has fulfilled its mission in life (such as pay beneficiary), is it proper to delete or disable said contract? If so, how exactly is this done?</p>
<p>Offhand, I would think that if the contract gets needlessly validated (for the rest of eternity [yikes!]) it would needlessly clog up the system.</p>

<plutus>
Disable contract after purpose achieved
# Disable contract after purpose achieved

(Asked by: username_0 on 2021-08-12)

After a contract has fulfilled its mission in life (such as pay beneficiary), is it proper to delete or disable said contract? If so, how exactly is this done?

Offhand, I would think that if the contract gets needlessly validated (for the rest of eternity [yikes!]) it would needlessly clog up the system.

**Tags:** plutus

---

## 2 answers

### Answer by username_1 on 2021-08-13. Score: 1 | Accepted answer

I don't think "disabling" a contract is possible since a "contract" in Cardano is not deployed anywhere on chain. The script/contract is supplied with a transaction that wants to spend UTXOs sitting at the contract address (which is basically a hash of the script code). Anybody can construct such at transaction at any time and the validator node will need to validate it.

The network will not be congested because as others have pointed out "contracts" in Cardano are completely passive and do not run on their own. They only run if a transaction wants to spend UTXOs sitting at the script address. If somebody would want to attack the network and construct millions of such transactions to run the code it would ruin him because each transaction has to pay fees and the fees are based on the resources needed to run the script. The more computational/memory heavy the script is the more fees you have to pay.


---

### Answer by username_2 on 2021-08-12. Score: 1

> I would think that if the contract gets needlessly validated (for the rest of eternity [yikes!])

Ah. This is a misunderstanding. *Scripts are completely passive.* Nothing gets run unless a transaction interacts with it.

So, in the case of a contract that pays a beneficiary, the script doesn't do that for you, it includes a validator that says "yes" or "no" to anyone trying to spend the UTxOs at the script address.

> **Comments:**
> **username_0**: Ok, so allow me to rephrase: Is it correct that if all the constraints of the submitted tran end up being satisfied, then the tran stops being validated?  
> **username_2**: "constraints of the submitted tran end up being satisfied." You can build a transaction that satisfies whatever constraints you give it, but you can only interact with scripts with transactions that meet the constraints of scripts' validators. "then the tran stops being validated?" Do you mean the transaction is invalid? Any transaction that meets the constraints of the script's validator can spend UTxOs (either to take them or to update the state) from the script address. In perpetuity. That being said, there would be no reason to interact with a script that doesn't have anything to spend.  

---

