import type { BaseContract, BigNumber, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers"; import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi"; import type { Listener, Provider } from "@ethersproject/providers"; import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "./common"; export type SwapInfoStruct = { swapTarget: string; token: string; swapCallData: BytesLike; }; export type SwapInfoStructOutput = [string, string, string] & { swapTarget: string; token: string; swapCallData: string; }; export interface SwapperAbiInterface extends utils.Interface { functions: { "isExchangeAllowed(address)": FunctionFragment; "swap(address[],(address,address,bytes)[],address,address)": FunctionFragment; "updateExchangeAllowlist(address[],bool[])": FunctionFragment; }; getFunction(nameOrSignatureOrTopic: "isExchangeAllowed" | "swap" | "updateExchangeAllowlist"): FunctionFragment; encodeFunctionData(functionFragment: "isExchangeAllowed", values: [string]): string; encodeFunctionData(functionFragment: "swap", values: [string[], SwapInfoStruct[], string, string]): string; encodeFunctionData(functionFragment: "updateExchangeAllowlist", values: [string[], boolean[]]): string; decodeFunctionResult(functionFragment: "isExchangeAllowed", data: BytesLike): Result; decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result; decodeFunctionResult(functionFragment: "updateExchangeAllowlist", data: BytesLike): Result; events: { "ExchangeAllowlistUpdated(address,bool)": EventFragment; "Swapped(address,address[],address,uint256[],uint256)": EventFragment; }; getEvent(nameOrSignatureOrTopic: "ExchangeAllowlistUpdated"): EventFragment; getEvent(nameOrSignatureOrTopic: "Swapped"): EventFragment; } export interface ExchangeAllowlistUpdatedEventObject { exchange: string; isAllowed: boolean; } export type ExchangeAllowlistUpdatedEvent = TypedEvent<[ string, boolean ], ExchangeAllowlistUpdatedEventObject>; export type ExchangeAllowlistUpdatedEventFilter = TypedEventFilter; export interface SwappedEventObject { receiver: string; tokensIn: string[]; tokenOut: string; amountsIn: BigNumber[]; amountOut: BigNumber; } export type SwappedEvent = TypedEvent<[ string, string[], string, BigNumber[], BigNumber ], SwappedEventObject>; export type SwappedEventFilter = TypedEventFilter; export interface SwapperAbi extends BaseContract { connect(signerOrProvider: Signer | Provider | string): this; attach(addressOrName: string): this; deployed(): Promise; interface: SwapperAbiInterface; queryFilter(event: TypedEventFilter, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise>; listeners(eventFilter?: TypedEventFilter): Array>; listeners(eventName?: string): Array; removeAllListeners(eventFilter: TypedEventFilter): this; removeAllListeners(eventName?: string): this; off: OnEvent; on: OnEvent; once: OnEvent; removeListener: OnEvent; functions: { isExchangeAllowed(exchange: string, overrides?: CallOverrides): Promise<[boolean] & { isAllowed: boolean; }>; swap(tokensIn: string[], swapInfo: SwapInfoStruct[], tokenOut: string, receiver: string, overrides?: Overrides & { from?: string; }): Promise; updateExchangeAllowlist(exchanges: string[], allowed: boolean[], overrides?: Overrides & { from?: string; }): Promise; }; isExchangeAllowed(exchange: string, overrides?: CallOverrides): Promise; swap(tokensIn: string[], swapInfo: SwapInfoStruct[], tokenOut: string, receiver: string, overrides?: Overrides & { from?: string; }): Promise; updateExchangeAllowlist(exchanges: string[], allowed: boolean[], overrides?: Overrides & { from?: string; }): Promise; callStatic: { isExchangeAllowed(exchange: string, overrides?: CallOverrides): Promise; swap(tokensIn: string[], swapInfo: SwapInfoStruct[], tokenOut: string, receiver: string, overrides?: CallOverrides): Promise; updateExchangeAllowlist(exchanges: string[], allowed: boolean[], overrides?: CallOverrides): Promise; }; filters: { "ExchangeAllowlistUpdated(address,bool)"(exchange?: string | null, isAllowed?: null): ExchangeAllowlistUpdatedEventFilter; ExchangeAllowlistUpdated(exchange?: string | null, isAllowed?: null): ExchangeAllowlistUpdatedEventFilter; "Swapped(address,address[],address,uint256[],uint256)"(receiver?: string | null, tokensIn?: null, tokenOut?: null, amountsIn?: null, amountOut?: null): SwappedEventFilter; Swapped(receiver?: string | null, tokensIn?: null, tokenOut?: null, amountsIn?: null, amountOut?: null): SwappedEventFilter; }; estimateGas: { isExchangeAllowed(exchange: string, overrides?: CallOverrides): Promise; swap(tokensIn: string[], swapInfo: SwapInfoStruct[], tokenOut: string, receiver: string, overrides?: Overrides & { from?: string; }): Promise; updateExchangeAllowlist(exchanges: string[], allowed: boolean[], overrides?: Overrides & { from?: string; }): Promise; }; populateTransaction: { isExchangeAllowed(exchange: string, overrides?: CallOverrides): Promise; swap(tokensIn: string[], swapInfo: SwapInfoStruct[], tokenOut: string, receiver: string, overrides?: Overrides & { from?: string; }): Promise; updateExchangeAllowlist(exchanges: string[], allowed: boolean[], overrides?: Overrides & { from?: string; }): Promise; }; }