Meaning of param "deposit" in contract_create_tx

The documentation says about this param:

  • deposit will be “held by the contract” until it is deactivated

I don’t really understand the meaning of this explanation. How can a contract be deactivated and why should I lock AE that can’t be used? At least this is my understanding here.

Is deposit only being used within state channels and irrelevant for on-chain-creation of smart contracts?

There is no explicit “deposit” field in state channels, though the inititiator_amount and responder_amount are to some extent being deposited into the channel.

The deposit in a contract create is exactly this, an amount that is deposited (i.e. locked until it is later released). There are (though not in the near future!) plans to allow contracts to be (safely!) deactivated, the details are not yet worked out. If this is implemented this change will (most likely) make a sizeable deposit mandatory - in order to incentivize contract deactivation. But at the moment it can safely be put to 0, and at the moment there is no way to get back this deposit…

2 Likes

thanks for clarification!