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.
abstract val legacyContractConstraint: AttachmentConstraint
A validator for the legacy (pre-upgrade) contract attachments on the transaction. |
abstract val legacyContract: ContractClassName
Name of the contract this is an upgraded version of, used as part of verification of upgrade transactions. |
abstract fun upgrade(state: OldState): NewState
Upgrade contract's state object to a new state object. |
fun Any.contextLogger(): <ERROR CLASS>
When called from a companion object, returns the logger for the enclosing class. |