Search code examples
hyperledger-fabricchaincode

Deploying chaincode failed (Ubuntu 18.04 fabric-sample)


I'm following the Hyperledger Fabric Doc, network.sh up and network.sh createChannel is running successfully.

But when I run ./network.sh deployCC it's giving the below error

No chaincode name was provided. Valid call example: ./network.sh deployCC -ccn basic -ccp ../asset-transfer-basic/chaincode-go -ccl go
Deploying chaincode failed

error


Solution

  • It seems like no default value is set for the chaincode name. You can specify the chaincode name using the flag ccn in ./network.sh deployCC command. e.g. ./network.sh deployCC -ccn test_chaincode.

    You might have to provide values for other flags as well like for flag ccp which is chaincode path etc. Have a look at the list of all the flags here or you can just simply run ./network.sh -h to print the script help text.