Skip to content

Types

Glossary of Types in viem.

Abi

Type matching the Contract ABI Specification

Re-exported from ABIType.

AbiError

ABI Error type.

Re-exported from ABIType.

AbiEvent

ABI Event type.

Re-exported from ABIType.

AbiFunction

ABI Function type.

Re-exported from ABIType.

AbiParameter

inputs and ouputs item for ABI functions, events, and errors.

Re-exported from ABIType.

AbiParameterToPrimitiveTypes

Converts AbiParameter to corresponding TypeScript primitive type.

See more

AbiParametersToPrimitiveTypes

Converts array of AbiParameter to corresponding TypeScript primitive types.

See more

AccessList

An access list.

Address

An address.

Re-exported from ABIType.

Block

A type for a Block.

See Type

Chain

A type for a Chain.

See Type

CompactSignature

A type for EIP-2098 compact signatures.

See Type

FeeHistory

A type for fee history.

See Type

FeeValues

A type for fee values.

See Type

Filter

A type for a Filter.

See Type

Hash

Type for a hashed value – a "0x"-prefixed string: "0x${string}"

Hex

Type for a hex value – a "0x"-prefixed string: "0x${string}"

Log

A type for Event Logs.

See Type

Signature

A type for a structured signature.

See Type

Transaction

A type for Transactions.

See Type

TransactionReceipt

A type for Transaction Receipts.

See Type

Transport

A type for Transports.

See Type

WalletPermission

A type for wallet (JSON-RPC Account) permissions.

See Type

TransactionSerializedEIP1559

EIP-1559 transaction hex value – a "0x02"-prefixed string: "0x02${string}"

TransactionSerializedEIP2930

EIP-2930 transaction hex value – a "0x01"-prefixed string: "0x01${string}"

TransactionSerializedLegacy

Legacy transaction hex value – a "0x"-prefixed string: "0x${string}"

TransactionType

All types of transactions. "eip1559" | "eip2930" | "eip4844" | "legacy"

TransactionRequest

A type for all transaction requests.

See Type.

StateOverride

A type defining state overrides for eth_call method. See more