# C-Chain

### Deploying a Smart Contract <a href="#deploying-a-smart-contract" id="deploying-a-smart-contract"></a>

For a tutorial on deploying a Solidity smart contract on the C-Chain, see [here.](https://docs.avax.network/v1.0/en/tutorials/deploy-a-smart-contract/)

### Methods <a href="#methods" id="methods"></a>

This API is identical to Geth’s API except that it only supports the following services:

* `web3_`
* `net_`
* `eth_`
* `personal_`
* `txpool_`

You can interact with these services the same exact way you’d interact with Geth. See the [Ethereum Wiki’s JSON-RPC Documentation](https://eth.wiki/json-rpc/API) and [Geth’s JSON-RPC Documentation](https://geth.ethereum.org/docs/rpc/server) for a full description of this API.

### JSON-RPC Endpoints <a href="#json-rpc-endpoints" id="json-rpc-endpoints"></a>

To interact with C-Chain (the main EVM instance on Avalanche):

```
/ext/bc/C/rpc
```

To interact with other instances of the EVM:

```
/ext/bc/blockchainID/rpc
```

### Examples <a href="#examples" id="examples"></a>

#### Getting the current client version <a href="#getting-the-current-client-version" id="getting-the-current-client-version"></a>

### **Example Call**

```bash
//Request
curl -X POST --data '{
    "jsonrpc": "2.0",
    "method": "web3_clientVersion",
    "params": [],
    "id": 1
}' -H 'Content-Type: application/json' \
   -H 'cache-control: no-cache' \
https://ava-api-c-chain.bwarelabs.com/<your-endpoint-id>/ext/bc/C/rpc 
   
//Response

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "Athereum 1.0"
}  
```


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bwarelabs.com/api-docs/avalanche-api/c-chain.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
