corda / net.corda.flows / ContractUpgradeFlow

ContractUpgradeFlow

object ContractUpgradeFlow

A flow to be used for upgrading state objects of an old contract to a new contract.

The Instigator assembles the transaction for contract upgrade and sends out change proposals to all participants (Acceptor) of that state. If participants agree to the proposed change, they each sign the transaction. Finally, Instigator sends the transaction containing all signatures back to each participant so they can record it and use the new updated state for future transactions.

Types

Acceptor class Acceptor : Acceptor<Class<out UpgradedContract<ContractState, *>>>
Instigator class Instigator<OldState : ContractState, out NewState : ContractState> : Instigator<OldState, NewState, Class<out UpgradedContract<OldState, NewState>>>

Functions

verify fun verify(tx: TransactionForContract): Unit
fun verify(input: ContractState, output: ContractState, commandData: Command): Unit