> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Contract Interactions

## Overview

Contract Actions combine an ABI, address, and Client to provide end-to-end type inference. Viem
infers function names, positional arguments, event names, and return values from the ABI.

Reads, simulations, writes, deployments, and logs remain separate operations.

:::code-group
```ts twoslash [example.ts]
import { Abis } from 'viem/utils'
import { client } from './viem.config'

const balance = await client.contract.read({
  abi: Abis.erc20,
  address: '0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48',
  args: ['0xA0Cf798816D4b9b9866b5330EEa46a18382f251e'],
  functionName: 'balanceOf',
})
```

```ts twoslash [viem.config.ts] filename="viem.config.ts"
// [!include ~/snippets/docs/public.config.ts:setup]
```
:::

<Cards>
  <Card icon="lucide:book-open" title="Read Contracts" description="Call view and pure functions without sending a transaction." to="/docs/guides/contracts/read" />

  <Card icon="lucide:send" title="Write & Simulate Contracts" description="Simulate a write, submit it, and wait for its receipt." to="/docs/guides/contracts/write-simulate" />

  <Card icon="lucide:rocket" title="Deploy Contracts" description="Encode constructor arguments and deploy contract bytecode." to="/docs/guides/contracts/deploy" />

  <Card icon="lucide:list-tree" title="Batch Contract Reads" description="Read several contracts in one multicall operation." to="/docs/guides/contracts/batch-reads" />

  <Card icon="lucide:box" title="Contract Instances" description="Bind an ABI, address, and Client to a reusable interface." to="/docs/guides/contracts/instances" />

  <Card icon="lucide:radio" title="Contract Events" description="Query historical logs and watch newly emitted events." to="/docs/guides/contracts/events" />

  <Card icon="lucide:braces" title="Low-Level Calls" description="Use raw calldata when an ABI is unavailable or unnecessary." to="/docs/guides/contracts/calls" />
</Cards>
