/* 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 declare namespace IMarketLiquidityRewards {
  export type RewardAllocationStruct = {
    allocator: AddressLike;
    rewardTokenAddress: AddressLike;
    rewardTokenAmount: BigNumberish;
    marketId: BigNumberish;
    requiredPrincipalTokenAddress: AddressLike;
    requiredCollateralTokenAddress: AddressLike;
    minimumCollateralPerPrincipalAmount: BigNumberish;
    rewardPerLoanPrincipalAmount: BigNumberish;
    bidStartTimeMin: BigNumberish;
    bidStartTimeMax: BigNumberish;
    allocationStrategy: BigNumberish;
  };

  export type RewardAllocationStructOutput = [
    allocator: string,
    rewardTokenAddress: string,
    rewardTokenAmount: bigint,
    marketId: bigint,
    requiredPrincipalTokenAddress: string,
    requiredCollateralTokenAddress: string,
    minimumCollateralPerPrincipalAmount: bigint,
    rewardPerLoanPrincipalAmount: bigint,
    bidStartTimeMin: bigint,
    bidStartTimeMax: bigint,
    allocationStrategy: bigint
  ] & {
    allocator: string;
    rewardTokenAddress: string;
    rewardTokenAmount: bigint;
    marketId: bigint;
    requiredPrincipalTokenAddress: string;
    requiredCollateralTokenAddress: string;
    minimumCollateralPerPrincipalAmount: bigint;
    rewardPerLoanPrincipalAmount: bigint;
    bidStartTimeMin: bigint;
    bidStartTimeMax: bigint;
    allocationStrategy: bigint;
  };
}

export interface MarketLiquidityRewardsInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "allocateRewards"
      | "allocatedRewards"
      | "claimRewards"
      | "deallocateRewards"
      | "getRewardTokenAmount"
      | "increaseAllocationAmount"
      | "initialize"
      | "rewardClaimedForBid"
      | "updateAllocation"
  ): FunctionFragment;

  getEvent(
    nameOrSignatureOrTopic:
      | "ClaimedRewards"
      | "CreatedAllocation"
      | "DecreasedAllocation"
      | "DeletedAllocation"
      | "IncreasedAllocation"
      | "Initialized"
      | "UpdatedAllocation"
  ): EventFragment;

  encodeFunctionData(
    functionFragment: "allocateRewards",
    values: [IMarketLiquidityRewards.RewardAllocationStruct]
  ): string;
  encodeFunctionData(
    functionFragment: "allocatedRewards",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "claimRewards",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "deallocateRewards",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getRewardTokenAmount",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "increaseAllocationAmount",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "initialize",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "rewardClaimedForBid",
    values: [BigNumberish, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "updateAllocation",
    values: [
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BigNumberish
    ]
  ): string;

  decodeFunctionResult(
    functionFragment: "allocateRewards",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "allocatedRewards",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "claimRewards",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "deallocateRewards",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getRewardTokenAmount",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "increaseAllocationAmount",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "rewardClaimedForBid",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "updateAllocation",
    data: BytesLike
  ): Result;
}

export namespace ClaimedRewardsEvent {
  export type InputTuple = [
    allocationId: BigNumberish,
    bidId: BigNumberish,
    recipient: AddressLike,
    amount: BigNumberish
  ];
  export type OutputTuple = [
    allocationId: bigint,
    bidId: bigint,
    recipient: string,
    amount: bigint
  ];
  export interface OutputObject {
    allocationId: bigint;
    bidId: bigint;
    recipient: 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 CreatedAllocationEvent {
  export type InputTuple = [
    allocationId: BigNumberish,
    allocator: AddressLike,
    marketId: BigNumberish
  ];
  export type OutputTuple = [
    allocationId: bigint,
    allocator: string,
    marketId: bigint
  ];
  export interface OutputObject {
    allocationId: bigint;
    allocator: string;
    marketId: 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 DecreasedAllocationEvent {
  export type InputTuple = [allocationId: BigNumberish, amount: BigNumberish];
  export type OutputTuple = [allocationId: bigint, amount: bigint];
  export interface OutputObject {
    allocationId: bigint;
    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 DeletedAllocationEvent {
  export type InputTuple = [allocationId: BigNumberish];
  export type OutputTuple = [allocationId: bigint];
  export interface OutputObject {
    allocationId: 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 IncreasedAllocationEvent {
  export type InputTuple = [allocationId: BigNumberish, amount: BigNumberish];
  export type OutputTuple = [allocationId: bigint, amount: bigint];
  export interface OutputObject {
    allocationId: bigint;
    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 InitializedEvent {
  export type InputTuple = [version: BigNumberish];
  export type OutputTuple = [version: bigint];
  export interface OutputObject {
    version: 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 UpdatedAllocationEvent {
  export type InputTuple = [allocationId: BigNumberish];
  export type OutputTuple = [allocationId: bigint];
  export interface OutputObject {
    allocationId: 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 MarketLiquidityRewards extends BaseContract {
  connect(runner?: ContractRunner | null): MarketLiquidityRewards;
  waitForDeployment(): Promise<this>;

  interface: MarketLiquidityRewardsInterface;

  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>;

  allocateRewards: TypedContractMethod<
    [_allocation: IMarketLiquidityRewards.RewardAllocationStruct],
    [bigint],
    "nonpayable"
  >;

  allocatedRewards: TypedContractMethod<
    [arg0: BigNumberish],
    [
      [
        string,
        string,
        bigint,
        bigint,
        string,
        string,
        bigint,
        bigint,
        bigint,
        bigint,
        bigint
      ] & {
        allocator: string;
        rewardTokenAddress: string;
        rewardTokenAmount: bigint;
        marketId: bigint;
        requiredPrincipalTokenAddress: string;
        requiredCollateralTokenAddress: string;
        minimumCollateralPerPrincipalAmount: bigint;
        rewardPerLoanPrincipalAmount: bigint;
        bidStartTimeMin: bigint;
        bidStartTimeMax: bigint;
        allocationStrategy: bigint;
      }
    ],
    "view"
  >;

  claimRewards: TypedContractMethod<
    [_allocationId: BigNumberish, _bidId: BigNumberish],
    [void],
    "nonpayable"
  >;

  deallocateRewards: TypedContractMethod<
    [_allocationId: BigNumberish, _tokenAmount: BigNumberish],
    [void],
    "nonpayable"
  >;

  getRewardTokenAmount: TypedContractMethod<
    [_allocationId: BigNumberish],
    [bigint],
    "view"
  >;

  increaseAllocationAmount: TypedContractMethod<
    [_allocationId: BigNumberish, _tokenAmount: BigNumberish],
    [void],
    "nonpayable"
  >;

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

  rewardClaimedForBid: TypedContractMethod<
    [arg0: BigNumberish, arg1: BigNumberish],
    [boolean],
    "view"
  >;

  updateAllocation: TypedContractMethod<
    [
      _allocationId: BigNumberish,
      _minimumCollateralPerPrincipalAmount: BigNumberish,
      _rewardPerLoanPrincipalAmount: BigNumberish,
      _bidStartTimeMin: BigNumberish,
      _bidStartTimeMax: BigNumberish
    ],
    [void],
    "nonpayable"
  >;

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

  getFunction(
    nameOrSignature: "allocateRewards"
  ): TypedContractMethod<
    [_allocation: IMarketLiquidityRewards.RewardAllocationStruct],
    [bigint],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "allocatedRewards"
  ): TypedContractMethod<
    [arg0: BigNumberish],
    [
      [
        string,
        string,
        bigint,
        bigint,
        string,
        string,
        bigint,
        bigint,
        bigint,
        bigint,
        bigint
      ] & {
        allocator: string;
        rewardTokenAddress: string;
        rewardTokenAmount: bigint;
        marketId: bigint;
        requiredPrincipalTokenAddress: string;
        requiredCollateralTokenAddress: string;
        minimumCollateralPerPrincipalAmount: bigint;
        rewardPerLoanPrincipalAmount: bigint;
        bidStartTimeMin: bigint;
        bidStartTimeMax: bigint;
        allocationStrategy: bigint;
      }
    ],
    "view"
  >;
  getFunction(
    nameOrSignature: "claimRewards"
  ): TypedContractMethod<
    [_allocationId: BigNumberish, _bidId: BigNumberish],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "deallocateRewards"
  ): TypedContractMethod<
    [_allocationId: BigNumberish, _tokenAmount: BigNumberish],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "getRewardTokenAmount"
  ): TypedContractMethod<[_allocationId: BigNumberish], [bigint], "view">;
  getFunction(
    nameOrSignature: "increaseAllocationAmount"
  ): TypedContractMethod<
    [_allocationId: BigNumberish, _tokenAmount: BigNumberish],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "initialize"
  ): TypedContractMethod<[], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "rewardClaimedForBid"
  ): TypedContractMethod<
    [arg0: BigNumberish, arg1: BigNumberish],
    [boolean],
    "view"
  >;
  getFunction(
    nameOrSignature: "updateAllocation"
  ): TypedContractMethod<
    [
      _allocationId: BigNumberish,
      _minimumCollateralPerPrincipalAmount: BigNumberish,
      _rewardPerLoanPrincipalAmount: BigNumberish,
      _bidStartTimeMin: BigNumberish,
      _bidStartTimeMax: BigNumberish
    ],
    [void],
    "nonpayable"
  >;

  getEvent(
    key: "ClaimedRewards"
  ): TypedContractEvent<
    ClaimedRewardsEvent.InputTuple,
    ClaimedRewardsEvent.OutputTuple,
    ClaimedRewardsEvent.OutputObject
  >;
  getEvent(
    key: "CreatedAllocation"
  ): TypedContractEvent<
    CreatedAllocationEvent.InputTuple,
    CreatedAllocationEvent.OutputTuple,
    CreatedAllocationEvent.OutputObject
  >;
  getEvent(
    key: "DecreasedAllocation"
  ): TypedContractEvent<
    DecreasedAllocationEvent.InputTuple,
    DecreasedAllocationEvent.OutputTuple,
    DecreasedAllocationEvent.OutputObject
  >;
  getEvent(
    key: "DeletedAllocation"
  ): TypedContractEvent<
    DeletedAllocationEvent.InputTuple,
    DeletedAllocationEvent.OutputTuple,
    DeletedAllocationEvent.OutputObject
  >;
  getEvent(
    key: "IncreasedAllocation"
  ): TypedContractEvent<
    IncreasedAllocationEvent.InputTuple,
    IncreasedAllocationEvent.OutputTuple,
    IncreasedAllocationEvent.OutputObject
  >;
  getEvent(
    key: "Initialized"
  ): TypedContractEvent<
    InitializedEvent.InputTuple,
    InitializedEvent.OutputTuple,
    InitializedEvent.OutputObject
  >;
  getEvent(
    key: "UpdatedAllocation"
  ): TypedContractEvent<
    UpdatedAllocationEvent.InputTuple,
    UpdatedAllocationEvent.OutputTuple,
    UpdatedAllocationEvent.OutputObject
  >;

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

    "CreatedAllocation(uint256,address,uint256)": TypedContractEvent<
      CreatedAllocationEvent.InputTuple,
      CreatedAllocationEvent.OutputTuple,
      CreatedAllocationEvent.OutputObject
    >;
    CreatedAllocation: TypedContractEvent<
      CreatedAllocationEvent.InputTuple,
      CreatedAllocationEvent.OutputTuple,
      CreatedAllocationEvent.OutputObject
    >;

    "DecreasedAllocation(uint256,uint256)": TypedContractEvent<
      DecreasedAllocationEvent.InputTuple,
      DecreasedAllocationEvent.OutputTuple,
      DecreasedAllocationEvent.OutputObject
    >;
    DecreasedAllocation: TypedContractEvent<
      DecreasedAllocationEvent.InputTuple,
      DecreasedAllocationEvent.OutputTuple,
      DecreasedAllocationEvent.OutputObject
    >;

    "DeletedAllocation(uint256)": TypedContractEvent<
      DeletedAllocationEvent.InputTuple,
      DeletedAllocationEvent.OutputTuple,
      DeletedAllocationEvent.OutputObject
    >;
    DeletedAllocation: TypedContractEvent<
      DeletedAllocationEvent.InputTuple,
      DeletedAllocationEvent.OutputTuple,
      DeletedAllocationEvent.OutputObject
    >;

    "IncreasedAllocation(uint256,uint256)": TypedContractEvent<
      IncreasedAllocationEvent.InputTuple,
      IncreasedAllocationEvent.OutputTuple,
      IncreasedAllocationEvent.OutputObject
    >;
    IncreasedAllocation: TypedContractEvent<
      IncreasedAllocationEvent.InputTuple,
      IncreasedAllocationEvent.OutputTuple,
      IncreasedAllocationEvent.OutputObject
    >;

    "Initialized(uint8)": TypedContractEvent<
      InitializedEvent.InputTuple,
      InitializedEvent.OutputTuple,
      InitializedEvent.OutputObject
    >;
    Initialized: TypedContractEvent<
      InitializedEvent.InputTuple,
      InitializedEvent.OutputTuple,
      InitializedEvent.OutputObject
    >;

    "UpdatedAllocation(uint256)": TypedContractEvent<
      UpdatedAllocationEvent.InputTuple,
      UpdatedAllocationEvent.OutputTuple,
      UpdatedAllocationEvent.OutputObject
    >;
    UpdatedAllocation: TypedContractEvent<
      UpdatedAllocationEvent.InputTuple,
      UpdatedAllocationEvent.OutputTuple,
      UpdatedAllocationEvent.OutputObject
    >;
  };
}
