Help Center > > Best Practices> Opening an Interbank Account (Demo)> Installing and Instantiating a Chaincode

Installing and Instantiating a Chaincode

Updated at: May 28, 2020 GMT+08:00

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.

Installing Chaincodes

  1. Click Manage Blockchain in the Operation column of the BCS service you just created.

  2. 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.

  3. Click in the upper left corner of the page.
  4. 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.



    Chaincode Name

    Enter fabbank.

    Chaincode Version

    Enter 1.0.

    Ledger Storage

    File database (goleveldb)

    Select All Peers

    Select the checkbox.

    Organization & Peer

    All peers have been selected automatically.


    Select Golang.

    Chaincode File

    Add the sample chaincode file package

    Chaincode Description

    Enter a description of the chaincode.

  5. Click Install to install the chaincode.

Instantiating Chaincodes

  1. After installing the chaincode, click Instantiate in the Operation column of the chaincode list.
  2. Specify the channel, chaincode version, endorsement policy, endorsing organizations, initialization function, and chaincode parameters, as described in the following table.



    Chaincode Name



    Select testchannel.

    Chaincode Version

    Select 1.0.

    Initialization Function

    Enter init.

    Chaincode Parameters

    Enter a,200,b,250.

    Endorsement Policy

    Select Endorsement from any of the following organizations.

    Endorsing Organizations

    Select all the three organizations.

    Privacy Protection

    Select No.

  3. Click Instantiate.

    Wait for 2 to 3 minutes and refresh the page. Click View more in the Instantiation column to check the instantiation status.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?

Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel