Now let’s assume Alex moves to Canada. It’s cold in the Winter, so now Alex needs a hybrid instead of an all-electric Tesla. If Alex wants to buy Valeria’s Prius, we’ll need to update the blockchain to reflect this change.
Task: update car0 - set owner: Valeria to Alex
- Application layer calls ( Smart Contract SDK ).changeCarOwner with the new object
- The SDK processes this object and generates a new transaction that issues a change of the color to red
- Now, the state database updates to include the new transaction, similar to the UTXO calculation in bitcoin, and updates the color to match the new transaction
- Then, once all of this is complete, the chaincode SDK will return a success response to the application layer