getValidators
Type Aliases
GetValidatorsParams
type GetValidatorsParams: object;
Type declaration
Member | Type | Description |
---|---|---|
rollup | Address | Address of the rollup we're getting list of validators from |
Source
GetValidatorsReturnType
type GetValidatorsReturnType: object;
Type declaration
Member | Type | Description |
---|---|---|
isAccurate | boolean | If logs contain unknown signature, validators list might: - contain false positives (validators that were removed, but returned as validator) - contain false negatives (validators that were added, but not present in the list) |
validators | Address [] | List of validators for the given rollup |
Source
Functions
getValidators()
function getValidators<TChain>(publicClient: object, GetValidatorsParams: GetValidatorsParams): Promise<GetValidatorsReturnType>
Type parameters
Type parameter |
---|
TChain extends undefined | Chain <undefined | ChainFormatters > |
Parameters
Parameter | Type | Description |
---|---|---|
publicClient | object | The chain Viem Public Client |
GetValidatorsParams | GetValidatorsParams | GetValidatorsParams |
Returns
Promise
<GetValidatorsReturnType
>
Promise<GetValidatorsReturnType>
Remarks
validators list is not guaranteed to be exhaustive if the isAccurate
flag is false.
It might contain false positive (validators that were removed, but returned as validator)
or false negative (validators that were added, but not present in the list)
Example
const { isAccurate, validators } = getValidators(client, { rollup: '0xc47dacfbaa80bd9d8112f4e8069482c2a3221336' });
if (isAccurate) {
// Validators were all fetched properly
} else {
// Validators list is not guaranteed to be accurate
}