@cdr-kit/react/Hooks/useDiscoverVaults
useDiscoverVaults
One-shot historical scan of the factory's VaultCreated events. Paginates inside a bounded RPC window. For live feeds, pair with useVaultEvents.
import { useDiscoverVaults } from "@cdr-kit/react"
Signature
function useDiscoverVaults(opts?: {
fromBlock?: bigint;
enabled?: boolean; // skip the scan entirely (mock mode)
}): {
vaults: VaultCreatedEvent[];
isLoading: boolean;
error?: Error;
};