UpgradedContractWithLegacyConstraint

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

Properties

Link copied to clipboard

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

Link copied to clipboard

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

Functions

Link copied to clipboard
abstract fun upgrade(state: OldState): NewState

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

Link copied to clipboard
abstract fun verify(tx: LedgerTransaction)

Takes an object that represents a state transition, and ensures the inputs/outputs/commands make sense. Must throw an exception if there's a problem that should prevent state transition. Takes a single object rather than an argument so that additional data can be added without breaking binary compatibility with existing contract code.