gill
@gillsdk/react/Functions

useSlot

function useSlot<TConfig>(__namedParameters): 
  | {
  slot: bigint;
}
  | {
  slot: bigint;
}
  | {
  slot: bigint;
}
  | {
  slot: bigint;
}
  | {
  slot: bigint;
};

Get the current slot using the Solana RPC method of getSlot

To auto refetch the slot, provide a options.refetchInterval value

Type Parameters

Type ParameterDefault type
TConfig extends | undefined | Readonly<{ }>| undefined | Readonly<{ }>

Parameters

ParameterType
__namedParametersUseSlotInput<TConfig>

Returns

| { slot: bigint; } | { slot: bigint; } | { slot: bigint; } | { slot: bigint; } | { slot: bigint; }

On this page