UpgradedContractWithLegacyConstraint
Keywords: net.corda.core.contracts.UpgradedContractWithLegacyConstraint interface
Date: 2023-09-18

net.corda.core.contracts

## Interface UpgradedContractWithLegacyConstraint<OldState extends ContractState,NewState extends ContractState>

- All Superinterfaces:
    Contract, UpgradedContract<OldState,NewState>

      public UpgradedContractWithLegacyConstraint<OldState extends ContractState,NewState extends ContractState>
      extends UpgradedContract<OldState,NewState>

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

  See Also:
    `interface UpgradedContract`, `class WhitelistedByZoneAttachmentConstraint`

- - ### Constructor Detail

    - #### UpgradedContractWithLegacyConstraint

          public UpgradedContractWithLegacyConstraint()

  - ### Method Detail

    - #### getLegacyContractConstraint

          @NotNull
          AttachmentConstraint getLegacyContractConstraint()

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