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

# AbiEvent.format

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

Formats an [`AbiEvent.AbiEvent`](/docs/utilities/abievent/types#abievent) into a **Human Readable ABI Error**.

## Imports

```ts
import { AbiEvent } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { AbiEvent } from 'viem/utils'

const formatted = AbiEvent.format({
  type: 'event',
  name: 'Transfer',
  inputs: [
    { name: 'from', type: 'address', indexed: true },
    { name: 'to', type: 'address', indexed: true },
    { name: 'value', type: 'uint256' }
  ]
})

formatted
//    ^?
```

## Definition

```ts
function format<abiEvent>(
  abiEvent: abiEvent | AbiEvent,
): format.ReturnType<abiEvent>
```

## Parameters

### abiEvent

* **Type:** `abiEvent | AbiEvent`

The ABI Event to format.

## Return Type

The formatted ABI Event.

`format.ReturnType<abiEvent>`
