Daml.Finance.Interface.Lifecycle.Rule.Lifecycle¶
Interfaces¶
interface Lifecycle
Interface implemented by instruments that can be lifecycled (either by the instrument itself or by a separate rule contract).
viewtype V
Choice Archive
Controller: Signatories of implementing template
Returns: ()
(no fields)
Choice Evolve
Process an event. It returns a tuple of the lifecycled instrument (or the original instrument when the former does not exist) and the effects.
Controller: (DA.Internal.Record.getField @"lifecycler" (view this))
Returns: (Optional InstrumentKey, [ContractId I])
Field Type Description eventCid ContractId I The event. instrument InstrumentKey The target instrument. observableCids [ContractId I] Set of numerical time-dependent observables. Choice GetView
Retrieves the interface view.
Controller: viewer
Returns: View
Field Type Description viewer Party The party retrieving the view. Method evolve : Evolve -> Update (Optional InstrumentKey, [ContractId I])
Implementation of the
Evolve
choice.
Typeclasses¶
class Implementation t => HasImplementation t where
Data Types¶
- type Implementation t
= HasToInterface t I
Type constraint for requiring templates to implement
Lifecycle
.
- type V
= View
Type synonym for
View
.instance HasFromAnyView Lifecycle V
data View
Functions¶
- evolve
- : Lifecycle -> Evolve -> Update (Optional InstrumentKey, [ContractId I])