/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumberish,
  BytesLike,
  FunctionFragment,
  Result,
  Interface,
  EventFragment,
  AddressLike,
  ContractRunner,
  ContractMethod,
  Listener,
} from "ethers";
import type {
  TypedContractEvent,
  TypedDeferredTopicFilter,
  TypedEventLog,
  TypedLogDescription,
  TypedListener,
  TypedContractMethod,
} from "../../common";

export interface IBaluniV1PoolInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "assetLiquidity"
      | "deposit"
      | "getAmountOut"
      | "getAssetReserve"
      | "getAssets"
      | "getDeviationForToken"
      | "getDeviations"
      | "getReserves"
      | "getSlippage"
      | "getSlippageParams"
      | "getTokenWeight"
      | "getWeights"
      | "isRebalanceNeeded"
      | "liquidity"
      | "quotePotentialSwap"
      | "rebalance"
      | "rebalanceAndDeposit"
      | "swap"
      | "totalValuation"
      | "unitPrice"
      | "withdraw"
  ): FunctionFragment;

  getEvent(
    nameOrSignatureOrTopic:
      | "Deposit"
      | "RebalancePerformed"
      | "Swap"
      | "WeightsRebalanced"
      | "Withdraw"
  ): EventFragment;

  encodeFunctionData(
    functionFragment: "assetLiquidity",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "deposit",
    values: [AddressLike, BigNumberish[], BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getAmountOut",
    values: [AddressLike, AddressLike, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getAssetReserve",
    values: [AddressLike]
  ): string;
  encodeFunctionData(functionFragment: "getAssets", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "getDeviationForToken",
    values: [AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getDeviations",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getReserves",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getSlippage",
    values: [AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getSlippageParams",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getTokenWeight",
    values: [AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "getWeights",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "isRebalanceNeeded",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "liquidity", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "quotePotentialSwap",
    values: [AddressLike, AddressLike, BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "rebalance", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "rebalanceAndDeposit",
    values: [AddressLike]
  ): string;
  encodeFunctionData(
    functionFragment: "swap",
    values: [
      AddressLike,
      AddressLike,
      BigNumberish,
      BigNumberish,
      AddressLike,
      BigNumberish
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "totalValuation",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "unitPrice", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "withdraw",
    values: [BigNumberish, AddressLike, BigNumberish]
  ): string;

  decodeFunctionResult(
    functionFragment: "assetLiquidity",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getAmountOut",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getAssetReserve",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getAssets", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getDeviationForToken",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getDeviations",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getReserves",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getSlippage",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getSlippageParams",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getTokenWeight",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "getWeights", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "isRebalanceNeeded",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "liquidity", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "quotePotentialSwap",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "rebalance", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "rebalanceAndDeposit",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "swap", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "totalValuation",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "unitPrice", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;
}

export namespace DepositEvent {
  export type InputTuple = [user: AddressLike, amount: BigNumberish];
  export type OutputTuple = [user: string, amount: bigint];
  export interface OutputObject {
    user: string;
    amount: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace RebalancePerformedEvent {
  export type InputTuple = [user: AddressLike, assets: AddressLike[]];
  export type OutputTuple = [user: string, assets: string[]];
  export interface OutputObject {
    user: string;
    assets: string[];
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace SwapEvent {
  export type InputTuple = [
    user: AddressLike,
    fromToken: AddressLike,
    toToken: AddressLike,
    amountIn: BigNumberish,
    amountOut: BigNumberish
  ];
  export type OutputTuple = [
    user: string,
    fromToken: string,
    toToken: string,
    amountIn: bigint,
    amountOut: bigint
  ];
  export interface OutputObject {
    user: string;
    fromToken: string;
    toToken: string;
    amountIn: bigint;
    amountOut: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace WeightsRebalancedEvent {
  export type InputTuple = [user: AddressLike, amountsToAdd: BigNumberish[]];
  export type OutputTuple = [user: string, amountsToAdd: bigint[]];
  export interface OutputObject {
    user: string;
    amountsToAdd: bigint[];
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace WithdrawEvent {
  export type InputTuple = [user: AddressLike, amount: BigNumberish];
  export type OutputTuple = [user: string, amount: bigint];
  export interface OutputObject {
    user: string;
    amount: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export interface IBaluniV1Pool extends BaseContract {
  connect(runner?: ContractRunner | null): IBaluniV1Pool;
  waitForDeployment(): Promise<this>;

  interface: IBaluniV1PoolInterface;

  queryFilter<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEventLog<TCEvent>>>;
  queryFilter<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined
  ): Promise<Array<TypedEventLog<TCEvent>>>;

  on<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  on<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>
  ): Promise<this>;

  once<TCEvent extends TypedContractEvent>(
    event: TCEvent,
    listener: TypedListener<TCEvent>
  ): Promise<this>;
  once<TCEvent extends TypedContractEvent>(
    filter: TypedDeferredTopicFilter<TCEvent>,
    listener: TypedListener<TCEvent>
  ): Promise<this>;

  listeners<TCEvent extends TypedContractEvent>(
    event: TCEvent
  ): Promise<Array<TypedListener<TCEvent>>>;
  listeners(eventName?: string): Promise<Array<Listener>>;
  removeAllListeners<TCEvent extends TypedContractEvent>(
    event?: TCEvent
  ): Promise<this>;

  assetLiquidity: TypedContractMethod<
    [assetIndex: BigNumberish],
    [bigint],
    "view"
  >;

  deposit: TypedContractMethod<
    [to: AddressLike, amounts: BigNumberish[], deadline: BigNumberish],
    [bigint],
    "nonpayable"
  >;

  getAmountOut: TypedContractMethod<
    [fromToken: AddressLike, toToken: AddressLike, amount: BigNumberish],
    [bigint],
    "view"
  >;

  getAssetReserve: TypedContractMethod<[asset: AddressLike], [bigint], "view">;

  getAssets: TypedContractMethod<[], [string[]], "view">;

  getDeviationForToken: TypedContractMethod<
    [token: AddressLike],
    [bigint],
    "view"
  >;

  getDeviations: TypedContractMethod<
    [],
    [[boolean[], bigint[]] & { directions: boolean[]; deviations: bigint[] }],
    "view"
  >;

  getReserves: TypedContractMethod<[], [bigint[]], "view">;

  getSlippage: TypedContractMethod<[token: AddressLike], [bigint], "view">;

  getSlippageParams: TypedContractMethod<[], [bigint[]], "view">;

  getTokenWeight: TypedContractMethod<[token: AddressLike], [bigint], "view">;

  getWeights: TypedContractMethod<[], [bigint[]], "view">;

  isRebalanceNeeded: TypedContractMethod<[], [boolean], "view">;

  liquidity: TypedContractMethod<[], [bigint], "view">;

  quotePotentialSwap: TypedContractMethod<
    [fromToken: AddressLike, toToken: AddressLike, amount: BigNumberish],
    [bigint],
    "view"
  >;

  rebalance: TypedContractMethod<[], [void], "nonpayable">;

  rebalanceAndDeposit: TypedContractMethod<
    [receiver: AddressLike],
    [bigint[]],
    "nonpayable"
  >;

  swap: TypedContractMethod<
    [
      fromToken: AddressLike,
      toToken: AddressLike,
      amount: BigNumberish,
      minAmount: BigNumberish,
      receiver: AddressLike,
      deadline: BigNumberish
    ],
    [[bigint, bigint] & { amountOut: bigint; fee: bigint }],
    "nonpayable"
  >;

  totalValuation: TypedContractMethod<
    [],
    [[bigint, bigint[]] & { totalVal: bigint; valuations: bigint[] }],
    "view"
  >;

  unitPrice: TypedContractMethod<[], [bigint], "view">;

  withdraw: TypedContractMethod<
    [share: BigNumberish, to: AddressLike, deadline: BigNumberish],
    [bigint],
    "nonpayable"
  >;

  getFunction<T extends ContractMethod = ContractMethod>(
    key: string | FunctionFragment
  ): T;

  getFunction(
    nameOrSignature: "assetLiquidity"
  ): TypedContractMethod<[assetIndex: BigNumberish], [bigint], "view">;
  getFunction(
    nameOrSignature: "deposit"
  ): TypedContractMethod<
    [to: AddressLike, amounts: BigNumberish[], deadline: BigNumberish],
    [bigint],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "getAmountOut"
  ): TypedContractMethod<
    [fromToken: AddressLike, toToken: AddressLike, amount: BigNumberish],
    [bigint],
    "view"
  >;
  getFunction(
    nameOrSignature: "getAssetReserve"
  ): TypedContractMethod<[asset: AddressLike], [bigint], "view">;
  getFunction(
    nameOrSignature: "getAssets"
  ): TypedContractMethod<[], [string[]], "view">;
  getFunction(
    nameOrSignature: "getDeviationForToken"
  ): TypedContractMethod<[token: AddressLike], [bigint], "view">;
  getFunction(
    nameOrSignature: "getDeviations"
  ): TypedContractMethod<
    [],
    [[boolean[], bigint[]] & { directions: boolean[]; deviations: bigint[] }],
    "view"
  >;
  getFunction(
    nameOrSignature: "getReserves"
  ): TypedContractMethod<[], [bigint[]], "view">;
  getFunction(
    nameOrSignature: "getSlippage"
  ): TypedContractMethod<[token: AddressLike], [bigint], "view">;
  getFunction(
    nameOrSignature: "getSlippageParams"
  ): TypedContractMethod<[], [bigint[]], "view">;
  getFunction(
    nameOrSignature: "getTokenWeight"
  ): TypedContractMethod<[token: AddressLike], [bigint], "view">;
  getFunction(
    nameOrSignature: "getWeights"
  ): TypedContractMethod<[], [bigint[]], "view">;
  getFunction(
    nameOrSignature: "isRebalanceNeeded"
  ): TypedContractMethod<[], [boolean], "view">;
  getFunction(
    nameOrSignature: "liquidity"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "quotePotentialSwap"
  ): TypedContractMethod<
    [fromToken: AddressLike, toToken: AddressLike, amount: BigNumberish],
    [bigint],
    "view"
  >;
  getFunction(
    nameOrSignature: "rebalance"
  ): TypedContractMethod<[], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "rebalanceAndDeposit"
  ): TypedContractMethod<[receiver: AddressLike], [bigint[]], "nonpayable">;
  getFunction(
    nameOrSignature: "swap"
  ): TypedContractMethod<
    [
      fromToken: AddressLike,
      toToken: AddressLike,
      amount: BigNumberish,
      minAmount: BigNumberish,
      receiver: AddressLike,
      deadline: BigNumberish
    ],
    [[bigint, bigint] & { amountOut: bigint; fee: bigint }],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "totalValuation"
  ): TypedContractMethod<
    [],
    [[bigint, bigint[]] & { totalVal: bigint; valuations: bigint[] }],
    "view"
  >;
  getFunction(
    nameOrSignature: "unitPrice"
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "withdraw"
  ): TypedContractMethod<
    [share: BigNumberish, to: AddressLike, deadline: BigNumberish],
    [bigint],
    "nonpayable"
  >;

  getEvent(
    key: "Deposit"
  ): TypedContractEvent<
    DepositEvent.InputTuple,
    DepositEvent.OutputTuple,
    DepositEvent.OutputObject
  >;
  getEvent(
    key: "RebalancePerformed"
  ): TypedContractEvent<
    RebalancePerformedEvent.InputTuple,
    RebalancePerformedEvent.OutputTuple,
    RebalancePerformedEvent.OutputObject
  >;
  getEvent(
    key: "Swap"
  ): TypedContractEvent<
    SwapEvent.InputTuple,
    SwapEvent.OutputTuple,
    SwapEvent.OutputObject
  >;
  getEvent(
    key: "WeightsRebalanced"
  ): TypedContractEvent<
    WeightsRebalancedEvent.InputTuple,
    WeightsRebalancedEvent.OutputTuple,
    WeightsRebalancedEvent.OutputObject
  >;
  getEvent(
    key: "Withdraw"
  ): TypedContractEvent<
    WithdrawEvent.InputTuple,
    WithdrawEvent.OutputTuple,
    WithdrawEvent.OutputObject
  >;

  filters: {
    "Deposit(address,uint256)": TypedContractEvent<
      DepositEvent.InputTuple,
      DepositEvent.OutputTuple,
      DepositEvent.OutputObject
    >;
    Deposit: TypedContractEvent<
      DepositEvent.InputTuple,
      DepositEvent.OutputTuple,
      DepositEvent.OutputObject
    >;

    "RebalancePerformed(address,address[])": TypedContractEvent<
      RebalancePerformedEvent.InputTuple,
      RebalancePerformedEvent.OutputTuple,
      RebalancePerformedEvent.OutputObject
    >;
    RebalancePerformed: TypedContractEvent<
      RebalancePerformedEvent.InputTuple,
      RebalancePerformedEvent.OutputTuple,
      RebalancePerformedEvent.OutputObject
    >;

    "Swap(address,address,address,uint256,uint256)": TypedContractEvent<
      SwapEvent.InputTuple,
      SwapEvent.OutputTuple,
      SwapEvent.OutputObject
    >;
    Swap: TypedContractEvent<
      SwapEvent.InputTuple,
      SwapEvent.OutputTuple,
      SwapEvent.OutputObject
    >;

    "WeightsRebalanced(address,uint256[])": TypedContractEvent<
      WeightsRebalancedEvent.InputTuple,
      WeightsRebalancedEvent.OutputTuple,
      WeightsRebalancedEvent.OutputObject
    >;
    WeightsRebalanced: TypedContractEvent<
      WeightsRebalancedEvent.InputTuple,
      WeightsRebalancedEvent.OutputTuple,
      WeightsRebalancedEvent.OutputObject
    >;

    "Withdraw(address,uint256)": TypedContractEvent<
      WithdrawEvent.InputTuple,
      WithdrawEvent.OutputTuple,
      WithdrawEvent.OutputObject
    >;
    Withdraw: TypedContractEvent<
      WithdrawEvent.InputTuple,
      WithdrawEvent.OutputTuple,
      WithdrawEvent.OutputObject
    >;
  };
}
