Avalanche is a network composed of multiple blockchains. Each blockchain is an instance of a Virtual Machine (VM), much like an object in an object-oriented language is an instance of a class. That is, the VM defines the behavior of the blockchain. Coreth (from core Ethereum) is the Virtual Machine (VM) that defines the Contract Chain (C-Chain). This chain implements the Ethereum Virtual Machine and supports Solidity smart contracts as well as most other Ethereum client functionality.
The C-Chain runs in a separate process from the main AvalancheGo process and communicates with it over a local gRPC connection.
AvalancheGo's build script downloads Coreth, compiles it, and places the binary into the avalanchego/build/plugins
directory.
The C-Chain supports the following API namespaces:
eth
personal
txpool
debug
Only the eth
namespace is enabled by default.
To enable the other namespaces see the instructions for passing in the coreth-config
parameter to AvalancheGo: https://docs.avax.network/build/references/command-line-interface#plugins.
Full documentation for the C-Chain's API can be found here.
The C-Chain is compatible with almost all Ethereum tooling, including Remix, Metamask and Truffle.