import { GMX_CHAIN_ID } from '../constants'; import { CacheKey, MulticallRequestConfig, MulticallResult, SkipKey } from '../types'; /** * A hook to fetch data from contracts via multicall. * Preferably wrapped in custom hooks, such as useMarkets, usePositions, etc. * * @param chainId - on which network the request should be executed * @param name - an unique name for the request, used as a part of swr cache key * @param params.key - the cache key as an array, if a falsy value is passed, the request will be skipped * @param params.request - contract calls config or callback which returns it * @param params.parseResponse - optional callback to pre-process and format the response */ export declare function runMulticall, TResult = MulticallResult>(chainId: GMX_CHAIN_ID, name: string, library: any, params: { key: CacheKey | SkipKey; refreshInterval?: number | null; clearUnusedKeys?: boolean; keepPreviousData?: boolean; request: TConfig | ((chainId: number, key: CacheKey) => TConfig); parseResponse?: (result: MulticallResult, chainId: number, key: CacheKey) => TResult; }): Promise<{ data: MulticallResult | TResult; isLoading: boolean; }>;