AbiFunction Types
AbiFunction.AbiFunction
Root type for an AbiItem.AbiItem
with a function
type.
Source: src/AbiFunction.ts
AbiFunction.ExtractNames
Source: src/AbiFunction.ts
AbiFunction.FromAbi
Extracts an AbiFunction.AbiFunction
item from an Abi.Abi
, given a name.
Examples
import { Abi, AbiFunction } from 'ox'
const abi = Abi.from([
'function foo(string)',
'function bar(uint256)',
])
type type Foo = {
readonly name: "foo";
readonly type: "function";
readonly stateMutability: "nonpayable";
readonly inputs: readonly [{
readonly type: "string";
}];
readonly outputs: readonly [];
}Foo = AbiFunction.FromAbi<typeof abi, 'foo'>
Source: src/AbiFunction.ts
AbiFunction.Name
Extracts the names of all AbiFunction.AbiFunction
items in an Abi.Abi
.
Examples
import { Abi, AbiFunction } from 'ox'
const abi = Abi.from([
'function foo(string)',
'function bar(uint256)',
])
type type names = "foo" | "bar"names = AbiFunction.Name<typeof abi>
Source: src/AbiFunction.ts