Use the CLI/Vagrant env for these steps to run in --peer-chaincodedev mode in 1.0 The steps assume vagrant ssh is in the "fabric/" folder. The steps require 4 vagrant windows. Vagrant window 1 - build peer ---------------------------- make peer Vagrant window 2 - start orderer -------------------------------- cd orderer go build ./orderer Vagrant window 2 - start peer in dev mode ----------------------------------------- cd peer peer node start --peer-chaincodedev Vagrant window 3 - start chaincode example02 in dev mode -------------------------------------------------------- cd examples/chaincode/go/chaincode_example02 go build CORE_PEER_ADDRESS=127.0.0.1:7051 CORE_CHAINCODE_ID_NAME=mycc:0/**TEST_CHAINID** ./chaincode_example02 #note that **TEST_CHAINID** is a chain the SOLO orderer creates automatically. This may go away in #future Vagrant window 4 - initialize the chaincode using the "deploy" command ---------------------------------------------------------------------- cd peer CORE_CHAINCODE_MODE=dev peer chaincode deploy -n mycc -c '{"Args":["init","a","100","b","200"]}' #CORE_CHAINCODE_MODE=dev is needed in 1.0 with chaincode deploy. Unlike 0.6/0.7, 1.0 builds the #chaincode in the deploy command. CORE_CHAINCODE_MODE=dev is needed to tell the deploy command #to skip build related activities as the chaincode is already built and run by the user #wait for about 10seconds Vagrant window 3 - restart chaincode ------------------------------------ #!!!!!! IMPORTANT !!!!!!!!! #use Ctrl-C to kill chaincode_example02 and start it again #This is needed - for now - as the fabric deregisters the chaincode after deploy Ctrl-C running chaincode CORE_PEER_ADDRESS=127.0.0.1:7051 CORE_CHAINCODE_ID_NAME=mycc ./chaincode_example02 ########### now you can send invokes and queries from window 4 ######## Vagrant window 4 - send an invoke --------------------------------- cd peer CORE_CHAINCODE_MODE=dev peer chaincode invoke -n mycc -c '{"Args":["invoke","a","b","10"]}' #wait for about 10seconds for invoke transaction to be committed Vagrant window 4 - send a query ------------------------------- cd peer CORE_CHAINCODE_MODE=dev peer chaincode query -n mycc -c '{"Args":["query","a"]}'