Supported File Formats - ZIP format
Last updated
Last updated
We only accept ZIP format at this moment for all languages.
When creating the zip file from the chaincode, make sure all the contents are at the root of the zip file and not inside a directory. Eg: https://github.com/hyperledger/fabric-samples/tree/release-2.2/asset-transfer-basic/chaincode-go
Please ZIP the files of the source code directly, NOT the folder containing the files.
When creating a ZIP file for the chaincode in Hyperledger Fabric, it is important to ensure that all the contents are placed directly at the root level of the ZIP file and not within a directory. For example, if you are zipping the asset-transfer-basic chaincode from the fabric-samples repository, the ZIP file should include the following files and folders directly inside it:
chaincode (directory)
assetTransfer.go (file)
go.mod (file)
go.sum (file)
Please refrain from including the chaincode-go directory within the ZIP file. Similarly, the META-INF folder containing the CouchDB index should also be placed directly inside the ZIP file.
This structure ensures that the chaincode can be correctly installed and deployed on the Hyperledger Fabric network.
It should NOT contain the chaincode-go directory inside the zip like this:
The META-INF folder containing couchdb index can also be placed immediately inside the zip like this:
If you want to upload the custom chaincode in Binary format, please refer Building in Binary format