case class State extends Product with Serializable
- Alphabetic
- By Inheritance
- State
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val activeState: ActiveLedgerState[Nid]
- def advance(resolver: KeyResolver, substate: State): Either[KeyInputError, State]
Let
thisstate be the result of iterating over a transactiontxuntil just before a noden.Let
thisstate be the result of iterating over a transactiontxuntil just before a noden. Letsubstatebe the state obtained after fully iterating over the subtree rooted atnstarting from State.empty. Then,advance(resolver, substate)equals the state resulting from iterating overtxuntil processing all descendants ofn.The call to
advance(resolver, substate)fails if and only if the iteration over the subtree rooted atnstarting fromthisfails, but the error may be different.- resolver
In mode ContractKeyUniquenessMode.Strict, this parameter has no effect. In mode ContractKeyUniquenessMode.Off,
resolvermust be the resolver used while iterating overtxuntil just beforen. While iterating over the subtree rooted atn, projectKeyResolver(resolver) must be used as resolver.- substate
The state obtained after fully iterating over the subtree
nstarting from State.empty. Consumed contracts (activeState.consumedBy) inthisandsubstatemust be disjoint.
- See also
com.daml.lf.transaction.HasTxNodes.contractKeyInputs for an iteration in mode com.daml.lf.transaction.ContractKeyUniquenessMode.Strict and
ContractStateMachineSpec.visitSubtree for iteration in all modes
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def beginRollback(): State
To be called when interpretation enters a try block or iteration enters a Rollback node Must be matched by endRollback or dropRollback.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- def consumedByOrInactive(cid: ContractId): Option[Either[Nid, Unit]]
The return value indicates if the given contract is either consumed, inactive, or otherwise - Some(Left(nid)) -- consumed by a specified node-id - Some(Right(())) -- inactive, because the (local) contract creation has been rolled-back - None -- neither consumed nor inactive
- def dropRollback(): State
To be called if interpretation notices that a try block did not lead to a Rollback node Must be matched by a beginRollback.
- def endRollback(): State
To be called when interpretation does insert a Rollback node or iteration leaves a Rollback node.
To be called when interpretation does insert a Rollback node or iteration leaves a Rollback node. Must be matched by a beginRollback.
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- val globalKeyInputs: Map[GlobalKey, KeyInput]
- def handleCreate(node: Create): Either[KeyInputError, State]
Visit a create node
- def handleExercise(nid: Nid, exe: Exercise): Either[KeyInputError, State]
- def handleFetch(node: Fetch): Either[KeyInputError, State]
- def handleLookup(lookup: LookupByKey): Either[KeyInputError, State]
Must be used to handle lookups iff in com.daml.lf.transaction.ContractKeyUniquenessMode.Strict mode
- def handleLookupWith(lookup: LookupByKey, keyInput: Option[ContractId]): Either[KeyInputError, State]
Must be used to handle lookups iff in com.daml.lf.transaction.ContractKeyUniquenessMode.Off mode The second argument takes the contract key resolution to be given to the Daml interpreter instead of com.daml.lf.transaction.Node.LookupByKey.result.
Must be used to handle lookups iff in com.daml.lf.transaction.ContractKeyUniquenessMode.Off mode The second argument takes the contract key resolution to be given to the Daml interpreter instead of com.daml.lf.transaction.Node.LookupByKey.result. This is because the iteration might currently be within a rollback scope that has already archived a contract with the key without a by-key operation (and for this reason the archival is not tracked in ContractStateMachine.ActiveLedgerState.keys), i.e., the lookup resolves to scala.None$ but the correct key input is scala.Some$ for some contract ID and this may matter after the rollback scope is left. Daml Engine will ask the ledger in that case to resolve the lookup and then perform an activeness check against the result potentially turning it into a negative lookup.
- def handleNode(id: Nid, node: Action, keyInput: => Option[ContractId]): Either[KeyInputError, State]
Utility method that takes a node and computes the corresponding next state.
Utility method that takes a node and computes the corresponding next state. The method does not handle any children of
node; it is up to the caller to do that.- keyInput
will only be used in mode ContractKeyUniquenessMode.Off and if the node is a lookupByKey
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val locallyCreated: Set[ContractId]
- def lookupActiveGlobalKeyInput(key: GlobalKey): Option[KeyMapping]
- def lookupActiveKey(key: GlobalKey): Option[KeyMapping]
Lookup the given key k.
Lookup the given key k. Returns - Some(KeyActive(cid)) if k maps to cid and cid is active. - Some(KeyInactive) if there is no active contract with the given key. - None if we know no mapping for that key.
- def mode: ContractKeyUniquenessMode
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- def projectKeyResolver(resolver: KeyResolver): KeyResolver
- See also
advance
- val rollbackStack: List[ActiveLedgerState[Nid]]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated