Installing and Instantiating a Chaincode
A chaincode must be installed on all peers in a channel and instantiated on any one peer. To use the same chaincode, channel members must specify the same name and version for the chaincode when installing it.
- Click Manage Blockchain in the Operation column of the BCS service you just created.
- On the login page, enter the username, password, and verification code, and click Log In.
- The username is admin, and the password is the Blockchain Mgmt. Initial Password set when you bought the BCS service. If you have not set this password, use the resource access initial password.
- If you use the Internet Explorer, you may fail to open the Blockchain Management login page and see a message indicating that the certificate is untrusted. In this case, you can click here to resolve the problem.
- Click in the upper left corner of the page.
- In the Install Chaincode window, enter the chaincode name and version number, select the peers where the chaincode is to be installed, specify the programming language of the chaincode, and add the chaincode file, as described in the following table.
File database (goleveldb)
Select All Peers
Select the checkbox.
Organization & Peer
All peers have been selected automatically.
Add the sample chaincode file package fabbank.zip.
Enter a description of the chaincode.
- Click Install to install the chaincode.
- After installing the chaincode, click Instantiate in the Operation column of the chaincode list.
- Specify the channel, chaincode version, endorsement policy, endorsing organizations, initialization function, and chaincode parameters, as described in the following table.
Select Endorsement from any of the following organizations.
Select all the three organizations.
- Click Instantiate.
Wait for 2 to 3 minutes and refresh the page. Click View more in the Instantiation column to check the instantiation status.