corda / net.corda.contracts.asset / CommodityContract / Clauses

# Clauses

`interface Clauses`

The clauses for this contract are essentially:

1. Group all commodity input and output states in a transaction by issued commodity, and then for each group: a. Check there are no zero sized output states in the group, and throw an error if so. b. Check for an issuance command, and do standard issuance checks if so, THEN STOP. Otherwise: c. Check for a move command (required) and an optional exit command, and that input and output totals are correctly conserved (output = input - exit)

### Types

ConserveAmount | `class ConserveAmount : AbstractConserveAmount<State, Commands, Commodity>` Standard clause for conserving the amount from input to output.
Group | `class Group : GroupClauseVerifier<State, Commands, Issued<Commodity>>` Grouping clause to extract input and output states into matched groups and then run a set of clauses over each group.
Issue | `class Issue : AbstractIssue<State, Commands, Commodity>` Standard issue clause, specialised to match the commodity issue command.