Skip to content

AbiEvent Types

AbiEvent.AbiEvent

Root type for an AbiItem.AbiItem with an event type.

Source: src/core/AbiEvent.ts

AbiEvent.ExtractNames

Source: src/core/AbiEvent.ts

AbiEvent.FromAbi

Extracts an AbiEvent.AbiEvent item from an Abi.Abi, given a name.

Examples

import { Abi, AbiEvent } from 'ox'
 
const abi = Abi.from([
  'event Foo(string)',
  'event Bar(uint256)',
])
 
type 
type Foo = { readonly name: "Foo"; readonly type: "event"; readonly inputs: readonly [{ readonly type: "string"; }]; }
Foo
= AbiEvent.FromAbi<typeof abi, 'Foo'>

Source: src/core/AbiEvent.ts

AbiEvent.Name

Extracts the names of all AbiError.AbiError items in an Abi.Abi.

Examples

import { Abi, AbiEvent } from 'ox'
 
const abi = Abi.from([
  'event Foo(string)',
  'event Bar(uint256)',
])
 
type 
type names = "Foo" | "Bar"
names
= AbiEvent.Name<typeof abi>

Source: src/core/AbiEvent.ts