Skip to content

AbiEvent.format

Formats an AbiEvent.AbiEvent into a Human Readable ABI Error.

Imports

Named
import { AbiEvent } from 'ox'

Examples

import { AbiEvent } from 'ox'
 
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' },
  ],
})
 
const formatted: "event Transfer(address indexed from, address indexed to, uint256 value)"
formatted

Definition

function format<abiEvent>(
  abiEvent: abiEvent | AbiEvent,
): abitype.FormatAbiItem<abiEvent>

Source: src/core/AbiEvent.ts

Parameters

abiEvent

  • Type: abiEvent | AbiEvent

The ABI Event to format.

Return Type

The formatted ABI Event.

abitype.FormatAbiItem<abiEvent>