/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumber,
  BytesLike,
  CallOverrides,
  ContractTransaction,
  Overrides,
  PopulatedTransaction,
  Signer,
  utils,
} from "ethers";
import type { FunctionFragment, Result } from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
  TypedEventFilter,
  TypedEvent,
  TypedListener,
  OnEvent,
  PromiseOrValue,
} from "../../common";

export declare namespace Multicall {
  export type CallStruct = {
    target: PromiseOrValue<string>;
    callData: PromiseOrValue<BytesLike>;
  };

  export type CallStructOutput = [string, string] & {
    target: string;
    callData: string;
  };

  export type ResultStruct = {
    success: PromiseOrValue<boolean>;
    returnData: PromiseOrValue<BytesLike>;
  };

  export type ResultStructOutput = [boolean, string] & {
    success: boolean;
    returnData: string;
  };
}

export interface MulticallInterface extends utils.Interface {
  functions: {
    "mtc1((address,bytes)[])": FunctionFragment;
    "mtc2((address,bytes)[])": FunctionFragment;
  };

  getFunction(nameOrSignatureOrTopic: "mtc1" | "mtc2"): FunctionFragment;

  encodeFunctionData(
    functionFragment: "mtc1",
    values: [Multicall.CallStruct[]]
  ): string;
  encodeFunctionData(
    functionFragment: "mtc2",
    values: [Multicall.CallStruct[]]
  ): string;

  decodeFunctionResult(functionFragment: "mtc1", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "mtc2", data: BytesLike): Result;

  events: {};
}

export interface Multicall extends BaseContract {
  connect(signerOrProvider: Signer | Provider | string): this;
  attach(addressOrName: string): this;
  deployed(): Promise<this>;

  interface: MulticallInterface;

  queryFilter<TEvent extends TypedEvent>(
    event: TypedEventFilter<TEvent>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TEvent>>;

  listeners<TEvent extends TypedEvent>(
    eventFilter?: TypedEventFilter<TEvent>
  ): Array<TypedListener<TEvent>>;
  listeners(eventName?: string): Array<Listener>;
  removeAllListeners<TEvent extends TypedEvent>(
    eventFilter: TypedEventFilter<TEvent>
  ): this;
  removeAllListeners(eventName?: string): this;
  off: OnEvent<this>;
  on: OnEvent<this>;
  once: OnEvent<this>;
  removeListener: OnEvent<this>;

  functions: {
    mtc1(
      calls: Multicall.CallStruct[],
      overrides?: Overrides & { from?: PromiseOrValue<string> }
    ): Promise<ContractTransaction>;

    mtc2(
      calls: Multicall.CallStruct[],
      overrides?: Overrides & { from?: PromiseOrValue<string> }
    ): Promise<ContractTransaction>;
  };

  mtc1(
    calls: Multicall.CallStruct[],
    overrides?: Overrides & { from?: PromiseOrValue<string> }
  ): Promise<ContractTransaction>;

  mtc2(
    calls: Multicall.CallStruct[],
    overrides?: Overrides & { from?: PromiseOrValue<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    mtc1(
      calls: Multicall.CallStruct[],
      overrides?: CallOverrides
    ): Promise<[BigNumber, string[]]>;

    mtc2(
      calls: Multicall.CallStruct[],
      overrides?: CallOverrides
    ): Promise<[BigNumber, string, Multicall.ResultStructOutput[]]>;
  };

  filters: {};

  estimateGas: {
    mtc1(
      calls: Multicall.CallStruct[],
      overrides?: Overrides & { from?: PromiseOrValue<string> }
    ): Promise<BigNumber>;

    mtc2(
      calls: Multicall.CallStruct[],
      overrides?: Overrides & { from?: PromiseOrValue<string> }
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    mtc1(
      calls: Multicall.CallStruct[],
      overrides?: Overrides & { from?: PromiseOrValue<string> }
    ): Promise<PopulatedTransaction>;

    mtc2(
      calls: Multicall.CallStruct[],
      overrides?: Overrides & { from?: PromiseOrValue<string> }
    ): Promise<PopulatedTransaction>;
  };
}
