abstract fun upgrade(state: OldState): NewState
Upgrade contract's state object to a new state object.
IllegalArgumentException
- if the given state object is not one that can be upgraded. This can be either
that the class is incompatible, or that the data inside the state object cannot be upgraded for some reason.