/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumberish,
  BytesLike,
  FunctionFragment,
  Result,
  Interface,
  AddressLike,
  ContractRunner,
  ContractMethod,
  Listener,
} from "ethers";
import type {
  TypedContractEvent,
  TypedDeferredTopicFilter,
  TypedEventLog,
  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 IMarketLiquidityRewardsInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "allocateRewards"
      | "claimRewards"
      | "deallocateRewards"
      | "getRewardTokenAmount"
      | "increaseAllocationAmount"
      | "initialize"
      | "rewardClaimedForBid"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "allocateRewards",
    values: [IMarketLiquidityRewards.RewardAllocationStruct]
  ): 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;

  decodeFunctionResult(
    functionFragment: "allocateRewards",
    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;
}

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

  interface: IMarketLiquidityRewardsInterface;

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

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

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

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

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

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

  rewardClaimedForBid: TypedContractMethod<
    [_bidId: BigNumberish, _allocationId: BigNumberish],
    [boolean],
    "view"
  >;

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

  getFunction(
    nameOrSignature: "allocateRewards"
  ): TypedContractMethod<
    [_allocation: IMarketLiquidityRewards.RewardAllocationStruct],
    [bigint],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "claimRewards"
  ): TypedContractMethod<
    [_allocationId: BigNumberish, _bidId: BigNumberish],
    [void],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "deallocateRewards"
  ): TypedContractMethod<
    [_allocationId: BigNumberish, _amount: 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<
    [_bidId: BigNumberish, _allocationId: BigNumberish],
    [boolean],
    "view"
  >;

  filters: {};
}
