Skip to content
LogoLogo

validator.get

Gets validator information by address.

Usage

import {  } from './viem.config'
 
const  = await .validator.get({
  : '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEbb',
})
 
.('Validator:', )
Validator: { publicKey: '0x...', active: true, index: 0n, validatorAddress: '0x...', inboundAddress: '...', outboundAddress: '...' }

Return Type

type ReturnType = {
  /** The validator's communication public key */
  publicKey: Hex
  /** Whether the validator is active */
  active: boolean
  /** The validator's index */
  index: bigint
  /** The validator's address */
  validatorAddress: Address
  /** The validator's inbound address for incoming connections */
  inboundAddress: string
  /** The validator's outbound IP address for firewall whitelisting */
  outboundAddress: string
}

Parameters

validator

  • Type: Address

Validator address.

blockNumber (optional)

  • Type: bigint

Block number to read the state from.

blockOverrides (optional)

  • Type: BlockOverrides

Block overrides to apply to the state.

blockTag (optional)

  • Type: BlockTag

Block tag to read the state from.

stateOverride (optional)

  • Type: StateOverride

State override to apply.