abstract class AbstractIssue<in S : ContractState, C : CommandData, T : Any> : ConcreteClause<S, C, Issued<T>>
Standard issue clause for contracts that issue fungible assets.
S
- the type of contract state which is being issued.T
- the token underlying the issued state.sum
- function to convert a list of states into an amount of the token. Must error if there are no states in
the list.sumOrZero
- function to convert a list of states into an amount of the token, and returns zero if there are
no states in the list. Takes in an instance of the token definition for constructing the zero amount if needed.<init> |
AbstractIssue(sum: List<S>.() -> Amount<Issued<T>>, sumOrZero: List<S>.(Issued<T>) -> Amount<Issued<T>>) Standard issue clause for contracts that issue fungible assets. |
sum |
val sum: List<S>.() -> Amount<Issued<T>> |
sumOrZero |
val sumOrZero: List<S>.(Issued<T>) -> Amount<Issued<T>> |
requiredCommands |
open val requiredCommands: Set<Class<out CommandData>> Determine whether this clause runs or not |
verify |
open fun verify(tx: TransactionForContract, inputs: List<S>, outputs: List<S>, commands: List<AuthenticatedObject<C>>, groupingKey: Issued<T>?): Set<C> Verify the transaction matches the conditions from this clause. For example, a "no zero amount output" clause would check each of the output states that it applies to, looking for a zero amount, and throw IllegalStateException if any matched. |
matches |
fun <C : CommandData> Clause<*, C, *>.matches(commands: List<AuthenticatedObject<C>>): Boolean Determine if the given list of commands matches the required commands for a clause to trigger. |
Issue |
class Issue : AbstractIssue<State, Commands, Currency> |
Issue |
class Issue : AbstractIssue<State, Commands, Commodity> Standard issue clause, specialised to match the commodity issue command. |
Issue |
class Issue<P> : AbstractIssue<State<P>, Commands, Terms<P>> Generic issuance clause |
Issue |
class Issue : AbstractIssue<State, Commands, Terms> |