Posts

Showing posts with the label corda

How to upgrade stateV1 to V2 without changing the Contract version?

How to upgrade stateV1 to V2 without changing the Contract version? I have an ObligationV1 and two states ObligationStateV1 and ObligationStateV2 . ObligationV1 ObligationStateV1 ObligationStateV2 How do I achieve A state is upgraded while the contract stays the same. where the state goes from V1 to V2 without changing the contract version. Based on the examples exampleLink, docs A state is upgraded while the contract stays the same. It seems that the code will end up looking like this where you have a new ObligationContractV2? The example was trying to achieve This CorDapp shows how to upgrade a state without upgrading the Contract. But I don't see how does the implementation actually prove that the new states is still referring to the old contract? This CorDapp shows how to upgrade a state without upgrading the Contract. 1 Answer 1 The contract class must change whenever you upgrade a stat...