import { ChainId } from '@pancakeswap/chains'; import { BigintIsh } from '@pancakeswap/sdk'; import { AbortControl } from '@pancakeswap/utils/abortControl'; import { PublicClient } from 'viem'; import { CallMultipleFunctionsOnSameContractParams, CallSameFunctionOnContractWithMultipleParams, CallSameFunctionOnMultipleContractsParams, IMulticallProvider, Result } from './multicallProvider'; export type PancakeMulticallConfig = { gasLimitPerCall?: BigintIsh; gasLimit?: BigintIsh; gasBuffer?: BigintIsh; dropUnexecutedCalls?: boolean; } & AbortControl; /** * The PancakeswapMulticall contract has added functionality for limiting the amount of gas * that each call within the multicall can consume. This is useful for operations where * a call could consume such a large amount of gas that it causes the node to error out * with an out of gas error. * * @export * @class PancakeMulticallProvider */ export declare class PancakeMulticallProvider extends IMulticallProvider { protected chainId: ChainId; protected provider: PublicClient | undefined; protected gasLimitPerCall: number; static abi: readonly [{ readonly inputs: readonly []; readonly name: "getCurrentBlockTimestamp"; readonly outputs: readonly [{ readonly internalType: "uint256"; readonly name: "timestamp"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly internalType: "address"; readonly name: "addr"; readonly type: "address"; }]; readonly name: "getEthBalance"; readonly outputs: readonly [{ readonly internalType: "uint256"; readonly name: "balance"; readonly type: "uint256"; }]; readonly stateMutability: "view"; readonly type: "function"; }, { readonly inputs: readonly [{ readonly components: readonly [{ readonly internalType: "address"; readonly name: "target"; readonly type: "address"; }, { readonly internalType: "uint256"; readonly name: "gasLimit"; readonly type: "uint256"; }, { readonly internalType: "bytes"; readonly name: "callData"; readonly type: "bytes"; }]; readonly internalType: "struct PancakeInterfaceMulticall.Call[]"; readonly name: "calls"; readonly type: "tuple[]"; }]; readonly name: "multicall"; readonly outputs: readonly [{ readonly internalType: "uint256"; readonly name: "blockNumber"; readonly type: "uint256"; }, { readonly components: readonly [{ readonly internalType: "bool"; readonly name: "success"; readonly type: "bool"; }, { readonly internalType: "uint256"; readonly name: "gasUsed"; readonly type: "uint256"; }, { readonly internalType: "bytes"; readonly name: "returnData"; readonly type: "bytes"; }]; readonly internalType: "struct PancakeInterfaceMulticall.Result[]"; readonly name: "returnData"; readonly type: "tuple[]"; }]; readonly stateMutability: "nonpayable"; readonly type: "function"; }]; constructor(chainId: ChainId, provider: PublicClient | undefined, gasLimitPerCall?: number); callSameFunctionOnMultipleContracts(params: CallSameFunctionOnMultipleContractsParams): Promise<{ blockNumber: bigint; results: Result[]; approxGasUsedPerSuccessCall: number; approxGasUsedPerFailCall: number; }>; callSameFunctionOnContractWithMultipleParams(params: CallSameFunctionOnContractWithMultipleParams): Promise<{ blockNumber: bigint; results: Result[]; approxGasUsedPerSuccessCall: number; approxGasUsedPerFailCall: number; }>; callMultipleFunctionsOnSameContract(params: CallMultipleFunctionsOnSameContractParams): Promise<{ blockNumber: bigint; results: Result[]; approxGasUsedPerSuccessCall: number; approxGasUsedPerFailCall: number; }>; } //# sourceMappingURL=multicallSwapProvider.d.ts.map