March 2019
Intermediate to advanced
636 pages
27h 50m
English
In this section, we will implement the chaincode functions we looked at previously. To implement the chaincode functions, we will use three SHIM API functions that will read assets from the Worldstate and record changes. As we have already learned, reads and writes of these functions are recorded into ReadSet and WriteSet respectively, and the changes do not affect the state of the ledger immediately. Only after the transaction has passed through validation and has been committed into the ledger will the changes take effect.
The following snippet shows a list of asset API functions:
// Returns the value of the `key` from the Worldstate. // If the key does not exist in the Worldstate the function returns (nil, nil). ...
Read now
Unlock full access