Upgrading Chaincode Projects in the CLI
You can use this command to upgrade existing chaincode projects to use the new features of the updated Blockchain App Builder. This command works with both TypeScript and Go projects.
For Go projects, upgrade to a supported version of Go before you run the command to upgrade your chaincode project. Blockchain App Builder supports Go v1.23.2 or later, but not Go v1.24 or later.
Usage:
upgrade
[options]
my-mac:Project myname$ ochain upgrade -h
Usage: upgrade [options]
Upgrade App Builder chaincode project
Options :
-h, --help output command usage information
-D, --debug enable debug logging
-p, --project <path> (optional) Path to Chaincode project to upgrade. If not specified, it defaults to current directory.
-cc, --chaincode (optional) To upgrade chaincode project
Examples :
$> ochain upgrade --project <path of chaincode dir>
ochain upgrade
If you encounter problems while upgrading a chaincode project, you can use
the --debug
option to generate debug logs. On Microsoft Windows, use
Command Prompt instead of PowerShell if you specify the --debug
option.
After you upgrade a chaincode project, synchronize the specification file with the generated source code. For more information, see Synchronize Specification File Changes With Generated Source Code.