Transaction State
data class TransactionState<out T : ContractState> constructor(val data: T, val contract: ContractClassName = requireNotNull(data.requiredContractClassName) {
//TODO: add link to docsite page, when there is one.
"""
Unable to infer Contract class name because state class ${data::class.java.name} is not annotated with
@BelongsToContract, and does not have an enclosing class which implements Contract. Either annotate ${data::class.java.name}
with @BelongsToContract, or supply an explicit contract parameter to TransactionState().
""".trimIndent().replace('\n', ' ')
}, val notary: Party, val encumbrance: Int? = null, val constraint: AttachmentConstraint = AutomaticPlaceholderConstraint)
A wrapper for ContractState containing additional platform-level state information and contract information. This is the definitive state that is stored on the ledger and used in transaction outputs.
Constructors
Link copied to clipboard
constructor(data: T, contract: ContractClassName = requireNotNull(data.requiredContractClassName) {
//TODO: add link to docsite page, when there is one.
"""
Unable to infer Contract class name because state class ${data::class.java.name} is not annotated with
@BelongsToContract, and does not have an enclosing class which implements Contract. Either annotate ${data::class.java.name}
with @BelongsToContract, or supply an explicit contract parameter to TransactionState().
""".trimIndent().replace('\n', ' ')
}, notary: Party, encumbrance: Int? = null, constraint: AttachmentConstraint = AutomaticPlaceholderConstraint)
Properties
Link copied to clipboard
A validator for the contract attachments on the transaction.
Link copied to clipboard
The contract class name that will verify this state that will be created via reflection. The attachment containing this class will be automatically added to the transaction at transaction creation time.
Link copied to clipboard
All contract states may be encumbered by up to one other state.