> **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.

# AbiFunction Types

:::info
`AbiFunction` is a re-export of ox's [`AbiFunction`](https://oxlib.sh/api/AbiFunction/types). Refer to the ox documentation for the full reference.
:::

## `AbiFunction.AbiFunction`

Root type for an [`AbiItem.AbiItem`](/docs/utilities/abiitem/types#abiitem) with a `function` type.

## `AbiFunction.ExtractNames`

## `AbiFunction.FromAbi`

Extracts an [`AbiFunction.AbiFunction`](/docs/utilities/abifunction/types#abifunction) item from an [`Abi.Abi`](/docs/utilities/abi/types#abi), given a name.

### Examples

```ts twoslash
// @noErrors
import { Abi, AbiFunction } from 'viem/utils'

const abi = Abi.from([
  'function foo(string)',
  'function bar(uint256)'
])

type Foo = AbiFunction.FromAbi<typeof abi, 'foo'>
//   ^?
```

## `AbiFunction.Name`

Extracts the names of all [`AbiFunction.AbiFunction`](/docs/utilities/abifunction/types#abifunction) items in an [`Abi.Abi`](/docs/utilities/abi/types#abi).

### Examples

```ts twoslash
// @noErrors
import { Abi, AbiFunction } from 'viem/utils'

const abi = Abi.from([
  'function foo(string)',
  'function bar(uint256)'
])

type names = AbiFunction.Name<typeof abi>
//   ^?
```
