# \`Update\` in \`ensure\` clause

**URL:** <https://forum.canton.network/t/update-in-ensure-clause/116>\
**Category:** App Development\
**Created:** [April 14, 2020, 11:53am UTC](https://forum.canton.network/t/update-in-ensure-clause/116 "2020-04-14T11:53:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![cocreature](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/cocreature/32/36_2.png) [@cocreature](https://forum.canton.network/u/cocreature)\
**Post date:** [April 14, 2020, 12:00pm UTC](https://forum.canton.network/t/update-in-ensure-clause/116/2 "2020-04-14T12:00:59Z")

</div>

The `ensure` clause is supposed to to hold during the entire lifetime of a contract. Currently this is enforced by checking it at contract creation and because it can only depend on the template data instead of an arbitrary `Update` expression this is guaranteed to never be invalidated if it holds at contract creation.

Now consider an `ensureA` that allows for an `Update` expression like the `fetch` in your example. This could hold at contract creation but if the contract gets archived later it will not hold anymore. For this reason we currently do not have such a construct.

If you do only want to check a condition at the time of contract creation, you might be able to create that contract from a choice and enforce the condition in that choice. One example of this are role contracts with multiple signatories and a nonconsuming choice for creating a contract. You can find more information on that pattern at [https://docs.daml.com/daml/intro/6\_Parties.html#use-role-contracts-for-ongoing-authorization](https://docs.daml.com/daml/intro/6_Parties.html#use-role-contracts-for-ongoing-authorization).

---

_[View the full topic](https://forum.canton.network/t/update-in-ensure-clause/116)._
