com.r3corda.contracts.clause / AbstractConserveAmount

AbstractConserveAmount

abstract class AbstractConserveAmount<S : FungibleAsset<T>, T : Any> : GroupClause<S, Issued<T>>

Standardised clause for checking input/output balances of fungible assets. Requires that a Move command is provided, and errors if absent. Must be the last clause under a grouping clause; errors on no-match, ends on match.



Constructors

<init> AbstractConserveAmount()

Standardised clause for checking input/output balances of fungible assets. Requires that a Move command is provided, and errors if absent. Must be the last clause under a grouping clause; errors on no-match, ends on match.

Properties

ifMatched open val ifMatched: MatchBehaviour

Behaviour if this clause is not matches

ifNotMatched open val ifNotMatched: MatchBehaviour

Behaviour if this clause is matched

requiredCommands open val requiredCommands: Set<Class<out CommandData>>

Classes for commands which must ALL be present in transaction for this clause to be triggered

Functions

verify open fun verify(tx: TransactionForContract, inputs: List<S>, outputs: List<S>, commands: Collection<AuthenticatedObject<CommandData>>, token: Issued<T>): Set<CommandData>

Inheritors

ConserveAmount class ConserveAmount : AbstractConserveAmount<State, Currency>
ConserveAmount class ConserveAmount<P> : AbstractConserveAmount<State<P>, Terms<P>>

Generic move/exit clause for fungible assets