> For the complete documentation index, see [llms.txt](https://docs.catalyx.solutions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.catalyx.solutions/catalyx-blockchain-manager/hyperledger-fabric/version-2.4/getting-started/commit-a-chaincode-to-the-channel.md).

# Commit a Chaincode to the Channel

Chaincode is the smart contract of Hyperledger Fabric that handles the business logic of a particular application. A smart contract programmatically accesses two distinct pieces of the ledger — a blockchain that immutably records the history of all transactions, and a world state that holds a cache of the current value of these states.

The Catalyst Blockchain Manager Hyperledger Fabric service supports Hyperledger Fabric v2.0 capabilities with the following [chaincode lifecycle](https://hyperledger-fabric.readthedocs.io/en/release-2.2/chaincode_lifecycle.html#fabric-chaincode-lifecycle):

<figure><img src="https://2680825251-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsUGPGTcyMu8FXsdY8XQY%2Fuploads%2Fgit-blob-5893e083932d75a76e896e8430fb1759454d5b83%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}

#### Add a Chaincode

The current version of Catalyst Blockchain Manager supports external chaincodes. Organizations do not need to package the chaincode — they just need to create a Docker image and provide a link to the Docker repository.

See [Add a Chaincode](file:///7571772/chaincode-management/chaincode.md#add-chaincode).
{% endstep %}

{% step %}

#### Install the Chaincode on Your Peers

Every organization that will use the chaincode to endorse a transaction or query the ledger needs to complete this step.

See [Install the Chaincode](file:///7571772/chaincode-management/chaincode.md#install-the-chaincode).
{% endstep %}

{% step %}

#### Approve a Chaincode Definition for Your Organization

Every organization that will use the chaincode needs to complete this step. The chaincode definition needs to be approved by a sufficient number of organizations with endorser rights to satisfy the channel's policy before the chaincode can be started on the channel.

See [Approve a Chaincode](file:///7571772/chaincode-management/chaincode.md#approve-a-chaincode).
{% endstep %}

{% step %}

#### Commit the Chaincode Definition

Any organization can commit a chaincode if all necessary approvals were done.

See [Commit a Chaincode](file:///7571772/chaincode-management/chaincode.md#commit-a-chaincode) and [Chaincode Lifecycle](file:///7571772/chaincode-management/chaincode.md#chaincodes-lifecycle) for full details.
{% endstep %}
{% endstepper %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.catalyx.solutions/catalyx-blockchain-manager/hyperledger-fabric/version-2.4/getting-started/commit-a-chaincode-to-the-channel.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
