However, how can we make sure that this special case can happen exactly once and not be repeated?
One simple way to do that is to require a signature from e.g. a controller for the init case
A simple solution could be to require a specific
r.cm
to be present in the transaction viaT
s logic function
I think you cannot hardcode the commitment in the resource logic because you would have to know the commitment in advance and you can’t know it before you create the resource, for which you need the logic
I think Forall / negative checks in resource logics might be a helpful thread to read