> ## Documentation Index
> Fetch the complete documentation index at: https://docs.holydocs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ContractCall

Smart contract call block for ABI-backed read or write interactions, with optional interactive execution in supported contexts.

**Interactive playground** For isolated previews, theme switching, and sandbox editing, open [the ContractCall playground on holydocs.com](https://holydocs.com/components/contract-call).

## When to use

Use this component when blockchain context, addresses, chains, token math, or wallet onboarding must stay precise and scannable.

## Live Examples

Every example below renders the real component directly inside HolyDocs, followed by the exact MDX you can paste into a page.

### Read Call

Document a view call without interactive execution.



~~~mdx
<ContractCall
  address="0x1234567890abcdef1234567890abcdef12345678"
  function="balanceOf"
  chain="ethereum"
  abi='[{"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]'
/>
~~~

### Interactive Write

Flag real transactions clearly when the component can trigger wallet confirmation.



~~~mdx
<ContractCall
  address="0x1234567890abcdef1234567890abcdef12345678"
  function="mint"
  chain="base"
  abi='[{"inputs":[{"name":"to","type":"address"},{"name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"}]'
  interactive
  requiresWallet
/>
~~~

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `address` | `string` | `--` | Contract address to target. |
| `function` | `string` | `--` | Function name to show and execute. |
| `chain` | `string` | `ethereum` | Chain key used for wallet and explorer context. |
| `abi` | `string` | `--` | Optional ABI JSON string used to build input controls. |
| `interactive` | `boolean` | `false` | Turns on inline inputs and execution controls. |
| `requiresWallet` | `boolean` | `false` | Marks the call as a write interaction that requires wallet confirmation. |

## Usage

Start from this baseline shape and then tailor the copy, data, or nesting to the page you are writing.

~~~mdx
<ContractCall
  address="0x1234567890abcdef1234567890abcdef12345678"
  function="balanceOf"
  chain="ethereum"
  abi='[{"inputs":[{"name":"account","type":"address"}],"name":"balanceOf","outputs":[{"name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]'
/>
~~~

## Tips

- Be explicit about whether the call is read-only, interactive, testnet-only, or a real transaction that can move value.
- Assume readers are one copy action away from using the value in production. Precision matters more than flair on web3 surfaces.
- Always make the target chain explicit when a component can imply a wallet, explorer, or transaction context.

## Related Components

**[Address](/components/address)**

Readable wallet or contract address with truncation, copy-to-clipboard, and optional block-explorer deep link.
**[ChainBadge](/components/chain-badge)**

Compact chain indicator for network-specific instructions, examples, and warnings.
**[RequestExample](/components/request-example)**

Pin request code examples in the right-side panel alongside API endpoint documentation.

## More

- Interactive playground: [ContractCall on holydocs.com](https://holydocs.com/components/contract-call)
- Component library index: [/components](/components)