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(): Logger

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

Inheritors

DummyContractV2

class DummyContractV2 : UpgradedContractWithLegacyConstraint<State, State>

Dummy contract state for testing of the upgrade process.

DummyContractV3

class DummyContractV3 : UpgradedContractWithLegacyConstraint<State, State>

Dummy contract state for testing of the upgrade process.