C-Chain
Deploying a Smart Contract
For a tutorial on deploying a Solidity smart contract on the C-Chain, see here.
Methods
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 and Geth’s JSON-RPC Documentation for a full description of this API.
JSON-RPC Endpoints
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
Getting the current client version
Example Call
//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"
}
Last updated
Was this helpful?