* updated chaincodes for asset-trnsfer-basic in order to show good example on how achieving determinism in json
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
* final fixes for chaincode-java of asset-tranfer-basic
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
* removed extra unused excheptions
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
* corrected indentation of contract in the chancode-javasript of asset-trnsfer-basic
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
* last fixes for chaincode-javascript of asset-transfer-basic
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
* last last fixes for chaincode-javascript of asset-transfer-basic
Signed-off-by: fraVlaca <ocsenarf@outlook.com>
Although the current code works thanks to Go being quite
forgiving when it comes to pointers, it doesn't exhibit
the best coding style. This patch addresses this.
Signed-off-by: Arnaud J Le Hors <lehors@us.ibm.com>
There was no need for GetAllAssets to return a custom type,
it can simple return an array of all assets.
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
Many users raise questions on how to test chaincode. It used
to be much easier with the old shim, as they could directly
use the old mock stub in the shim. Now that it no longer exists
the fabcar example can provide an example of how to test chaincode.
Also worth noting is our current directory structure of our Go
chaincodes prevents the creation of mocks due to import cycles.
This change also pushes the chaincode logic down into a `chaincode`
package.
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
Cleans up the code and pushes the smart contract
implementation down into a `chaincode` package.
This is in prep for implementing unit testing in the
chaincode, as you cannot mock code that is part of
the main package.
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>