import { GeneralCall, GetEvmClientFunction } from '../types';
import { PreparedCall } from './rpcCall';
export type Call = GeneralCall;
/** Same as Multicall viem except that the abi param is supposed to be the abi per call */
export declare const multicallViemAbiArray: (chainId: string, abi: any[], calls: Call[], getEvmClient: GetEvmClientFunction, retry?: boolean, providerId?: number, retries?: number, allowFailure?: boolean, batchSize?: number, logs?: boolean) => Promise<any[]>;
/**
 * Sharded variant of {@link multicallViemAbiArray}. Splits the flat call set
 * into batches of `batchSize` and distributes them across up to `poolSize`
 * distinct RPC endpoints (via `getEvmClient(chainId, rpcId)`, whose rpcId is
 * taken modulo the available RPC list). Batches run concurrently — one in
 * flight per endpoint — so wall-clock is roughly `(numBatches / poolSize)`
 * round-trips instead of `numBatches` on a single endpoint.
 *
 * Failover is per-batch: a failed batch is retried on the *next* rpcId (and
 * its batchSize halved on each attempt to dodge size/response limits) without
 * discarding the batches that already succeeded. Results are reassembled in
 * the original call order. If a batch still fails after `retries` failovers,
 * the error propagates (same all-or-nothing-per-chain semantics as before).
 */
export declare const multicallShardedAbiArray: (chainId: string, abi: any[], calls: Call[], getEvmClient: GetEvmClientFunction, poolSize: number, retries?: number, allowFailure?: boolean, batchSize?: number, logs?: boolean) => Promise<any[]>;
export interface MulticallConfig {
    chainId: string;
    allowFailure: boolean;
    batchSize: number;
    retries: number;
    providerId: number;
    logs: boolean;
}
export declare function prepareMulticallInputs(abi: any[], calls: Call[]): PreparedCall[];
export declare const executeMulticallViem: (preparedCalls: PreparedCall[], config: MulticallConfig, getEvmClient: GetEvmClientFunction) => Promise<any[]>;
//# sourceMappingURL=multicall.d.ts.map