(Hyperledger Fabric v2.2.4) To deploy a chaincode, it must be approved by organizations and then committed to a channel. After a chaincode is deployed, peers are able to accept chaincode invocations and can endorse transactions.
- You must install the chaincode on the required peers before you can deploy it.
- You can deploy more than one chaincode on a channel.
- The process to deploy the sample chaincodes is different than the deployment process described in this topic. See Explore Oracle Blockchain Platform Using Samples (Hyperledger Fabric v2.2.4).
- Go to the console and select the Chaincodes tab.
- In the Chaincodes tab, locate
the chaincode package and click its More
Actions menu, and select
Deploy.The Deploy Chaincode dialog is displayed.
- Enter information about where and how to deploy the
Field Description Channel Select the channel for the chaincode to run on. Chaincode Name Enter a unique name, up to 64 characters long, for the deployed chaincode.
- Use ASCII alphanumeric characters, dashes (-), and underscores (_).
- The name must start and end only with ASCII alphanumeric characters.
- Dashes (-) and underscores (_) must be followed with ASCII alphanumeric characters.
Version Enter a string value, up to 64 characters long, to specify the chaincode’s version number.
- Use ASCII alphanumeric characters, dashes (-), underscores (_), periods (.) and plus signs (+).
Init-required Select if the chaincode requires initialization. If selected, the client application must invoke the
Initfunction explicitly, by specifying the
isInitflag, before calling any other function.
Endorsement Policy In this section, specify the policy required to endorse the chaincode.
If you don’t specify an endorsement policy, then the default endorsement policy is used. The default endorsement policy gets an endorsement from any peer on the network.
Private Data Collection In this section, add one or more private data collections. Private data collections specify subsets of organizations that endorse, commit, or query private data on the channel you deploy the chaincode on.
- Click Deploy.The chaincode is deployed.
- To confirm that the chaincode was deployed, go to the Channels tab and click the name of the channel that you deployed the chaincode on. Go to the Deployed Chaincodes tab and confirm that the chaincode is listed in the summary table.