Deploy a Chaincode on a Peer to Test the Chaincode

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

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

Complete these steps to deploy and test your chaincode.

  1. Identify the channel or create a 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. See Use Quick Deployment.

  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 start each operation.

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

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