corda / net.corda.core.contracts / UpgradedContractWithLegacyConstraint

UpgradedContractWithLegacyConstraint

interface UpgradedContractWithLegacyConstraint<in OldState : ContractState, out NewState : ContractState> : UpgradedContract<OldState, NewState>

This interface allows specifying a custom legacy contract constraint for upgraded contracts. The default for UpgradedContract is WhitelistedByZoneAttachmentConstraint.

Properties

legacyContractConstraint

abstract val legacyContractConstraint: AttachmentConstraint

A validator for the legacy (pre-upgrade) contract attachments on the transaction.

Inherited Properties

legacyContract

abstract val legacyContract: ContractClassName

Name of the contract this is an upgraded version of, used as part of verification of upgrade transactions.

Inherited Functions

upgrade

abstract fun upgrade(state: OldState): NewState

Upgrade contract's state object to a new state object.

Extension Functions

contextLogger

fun Any.contextLogger(): <ERROR CLASS>

When called from a companion object, returns the logger for the enclosing class.