Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Chaincode for asset-transfer-basic

This is the chaincode from the asset-transfer-basic example (because it was easier to adapt the existing example rather than starting from scratch). It can be installed into the fabric test network by overwriting fabric-samples/asset-transfer-basic/chaincode-java with the content of this directory and running the test network with it:

cd fabric-samples/test-network
./network.sh up createChannel -ca
./network.sh deployCC -ccn basic -ccl java

A wallet can be then generated by:

cd ../asset-transfer-basic/application-java
./gradlew run

The only interesting change in the chaincode is the new transaction Claim. All other transactions are unused. At some point soon, Claim should be moved into a new contract.

    @Transaction(intent = Transaction.TYPE.SUBMIT)
    public String Claim(final Context ctx, final String claim) {