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.

Data Types

type I

= Lifecycle

Type synonym for Lifecycle.

type V

= View

Type synonym for View.

instance HasFromAnyView Lifecycle V

data View

View for Lifecycle.

View

Field Type Description
id Id Identifier for the rule contract.
description Text Textual description.
lifecycler Party Party performing the lifecycling.

instance Eq View

instance Show View