Deploy a Chaincode on a Peer to Test the Chaincode

After you create a chaincode, you must install, deploy, and invoke it to test that it works correctly.

To learn more about writing a chaincode, see Write a Chaincode.

Follow these steps to deploy and test your chaincode.

  1. Identify the channel or create a new channel and add peers to it. See Join a Peer to a Channel.

  2. Install the chaincode on the peers and deploy it on the channel.
  3. Use the Invoke and query REST APIs to test the chaincode with cURL through the REST proxy. See REST API for Oracle Blockchain Platform for descriptions of each endpoint and correct cURL syntax to invoke each operation.

  4. Go to the Channels tab in the console and locate and click the name of the channel running the blockchain.

  5. In the channel’s Ledger pane, view the chaincode’s ledger summary.