Skip to content

AbiError Types

AbiError.AbiError

Root type for an AbiItem.AbiItem with an error type.

Source: src/AbiError.ts

AbiError.ExtractNames

Source: src/AbiError.ts

AbiError.FromAbi

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

Examples

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

Source: src/AbiError.ts

AbiError.Name

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

Examples

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

Source: src/AbiError.ts