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

export interface IAllocationManagerInterface extends Interface {
  getEvent(
    nameOrSignatureOrTopic:
      | "AllocationClosed"
      | "AllocationCreated"
      | "AllocationResized"
      | "IndexingRewardsCollected"
      | "LegacyAllocationMigrated"
      | "MaxPOIStalenessSet",
  ): EventFragment;
}

export namespace AllocationClosedEvent {
  export type InputTuple = [
    indexer: AddressLike,
    allocationId: AddressLike,
    subgraphDeploymentId: BytesLike,
    tokens: BigNumberish,
    forceClosed: boolean,
  ];
  export type OutputTuple = [
    indexer: string,
    allocationId: string,
    subgraphDeploymentId: string,
    tokens: bigint,
    forceClosed: boolean,
  ];
  export interface OutputObject {
    indexer: string;
    allocationId: string;
    subgraphDeploymentId: string;
    tokens: bigint;
    forceClosed: boolean;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace AllocationCreatedEvent {
  export type InputTuple = [
    indexer: AddressLike,
    allocationId: AddressLike,
    subgraphDeploymentId: BytesLike,
    tokens: BigNumberish,
    currentEpoch: BigNumberish,
  ];
  export type OutputTuple = [
    indexer: string,
    allocationId: string,
    subgraphDeploymentId: string,
    tokens: bigint,
    currentEpoch: bigint,
  ];
  export interface OutputObject {
    indexer: string;
    allocationId: string;
    subgraphDeploymentId: string;
    tokens: bigint;
    currentEpoch: 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 AllocationResizedEvent {
  export type InputTuple = [
    indexer: AddressLike,
    allocationId: AddressLike,
    subgraphDeploymentId: BytesLike,
    newTokens: BigNumberish,
    oldTokens: BigNumberish,
  ];
  export type OutputTuple = [
    indexer: string,
    allocationId: string,
    subgraphDeploymentId: string,
    newTokens: bigint,
    oldTokens: bigint,
  ];
  export interface OutputObject {
    indexer: string;
    allocationId: string;
    subgraphDeploymentId: string;
    newTokens: bigint;
    oldTokens: 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 IndexingRewardsCollectedEvent {
  export type InputTuple = [
    indexer: AddressLike,
    allocationId: AddressLike,
    subgraphDeploymentId: BytesLike,
    tokensRewards: BigNumberish,
    tokensIndexerRewards: BigNumberish,
    tokensDelegationRewards: BigNumberish,
    poi: BytesLike,
    poiMetadata: BytesLike,
    currentEpoch: BigNumberish,
  ];
  export type OutputTuple = [
    indexer: string,
    allocationId: string,
    subgraphDeploymentId: string,
    tokensRewards: bigint,
    tokensIndexerRewards: bigint,
    tokensDelegationRewards: bigint,
    poi: string,
    poiMetadata: string,
    currentEpoch: bigint,
  ];
  export interface OutputObject {
    indexer: string;
    allocationId: string;
    subgraphDeploymentId: string;
    tokensRewards: bigint;
    tokensIndexerRewards: bigint;
    tokensDelegationRewards: bigint;
    poi: string;
    poiMetadata: string;
    currentEpoch: 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 LegacyAllocationMigratedEvent {
  export type InputTuple = [
    indexer: AddressLike,
    allocationId: AddressLike,
    subgraphDeploymentId: BytesLike,
  ];
  export type OutputTuple = [
    indexer: string,
    allocationId: string,
    subgraphDeploymentId: string,
  ];
  export interface OutputObject {
    indexer: string;
    allocationId: string;
    subgraphDeploymentId: 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 MaxPOIStalenessSetEvent {
  export type InputTuple = [maxPOIStaleness: BigNumberish];
  export type OutputTuple = [maxPOIStaleness: bigint];
  export interface OutputObject {
    maxPOIStaleness: 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 IAllocationManager extends BaseContract {
  connect(runner?: ContractRunner | null): IAllocationManager;
  waitForDeployment(): Promise<this>;

  interface: IAllocationManagerInterface;

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

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

  getEvent(
    key: "AllocationClosed",
  ): TypedContractEvent<
    AllocationClosedEvent.InputTuple,
    AllocationClosedEvent.OutputTuple,
    AllocationClosedEvent.OutputObject
  >;
  getEvent(
    key: "AllocationCreated",
  ): TypedContractEvent<
    AllocationCreatedEvent.InputTuple,
    AllocationCreatedEvent.OutputTuple,
    AllocationCreatedEvent.OutputObject
  >;
  getEvent(
    key: "AllocationResized",
  ): TypedContractEvent<
    AllocationResizedEvent.InputTuple,
    AllocationResizedEvent.OutputTuple,
    AllocationResizedEvent.OutputObject
  >;
  getEvent(
    key: "IndexingRewardsCollected",
  ): TypedContractEvent<
    IndexingRewardsCollectedEvent.InputTuple,
    IndexingRewardsCollectedEvent.OutputTuple,
    IndexingRewardsCollectedEvent.OutputObject
  >;
  getEvent(
    key: "LegacyAllocationMigrated",
  ): TypedContractEvent<
    LegacyAllocationMigratedEvent.InputTuple,
    LegacyAllocationMigratedEvent.OutputTuple,
    LegacyAllocationMigratedEvent.OutputObject
  >;
  getEvent(
    key: "MaxPOIStalenessSet",
  ): TypedContractEvent<
    MaxPOIStalenessSetEvent.InputTuple,
    MaxPOIStalenessSetEvent.OutputTuple,
    MaxPOIStalenessSetEvent.OutputObject
  >;

  filters: {
    "AllocationClosed(address,address,bytes32,uint256,bool)": TypedContractEvent<
      AllocationClosedEvent.InputTuple,
      AllocationClosedEvent.OutputTuple,
      AllocationClosedEvent.OutputObject
    >;
    AllocationClosed: TypedContractEvent<
      AllocationClosedEvent.InputTuple,
      AllocationClosedEvent.OutputTuple,
      AllocationClosedEvent.OutputObject
    >;

    "AllocationCreated(address,address,bytes32,uint256,uint256)": TypedContractEvent<
      AllocationCreatedEvent.InputTuple,
      AllocationCreatedEvent.OutputTuple,
      AllocationCreatedEvent.OutputObject
    >;
    AllocationCreated: TypedContractEvent<
      AllocationCreatedEvent.InputTuple,
      AllocationCreatedEvent.OutputTuple,
      AllocationCreatedEvent.OutputObject
    >;

    "AllocationResized(address,address,bytes32,uint256,uint256)": TypedContractEvent<
      AllocationResizedEvent.InputTuple,
      AllocationResizedEvent.OutputTuple,
      AllocationResizedEvent.OutputObject
    >;
    AllocationResized: TypedContractEvent<
      AllocationResizedEvent.InputTuple,
      AllocationResizedEvent.OutputTuple,
      AllocationResizedEvent.OutputObject
    >;

    "IndexingRewardsCollected(address,address,bytes32,uint256,uint256,uint256,bytes32,bytes,uint256)": TypedContractEvent<
      IndexingRewardsCollectedEvent.InputTuple,
      IndexingRewardsCollectedEvent.OutputTuple,
      IndexingRewardsCollectedEvent.OutputObject
    >;
    IndexingRewardsCollected: TypedContractEvent<
      IndexingRewardsCollectedEvent.InputTuple,
      IndexingRewardsCollectedEvent.OutputTuple,
      IndexingRewardsCollectedEvent.OutputObject
    >;

    "LegacyAllocationMigrated(address,address,bytes32)": TypedContractEvent<
      LegacyAllocationMigratedEvent.InputTuple,
      LegacyAllocationMigratedEvent.OutputTuple,
      LegacyAllocationMigratedEvent.OutputObject
    >;
    LegacyAllocationMigrated: TypedContractEvent<
      LegacyAllocationMigratedEvent.InputTuple,
      LegacyAllocationMigratedEvent.OutputTuple,
      LegacyAllocationMigratedEvent.OutputObject
    >;

    "MaxPOIStalenessSet(uint256)": TypedContractEvent<
      MaxPOIStalenessSetEvent.InputTuple,
      MaxPOIStalenessSetEvent.OutputTuple,
      MaxPOIStalenessSetEvent.OutputObject
    >;
    MaxPOIStalenessSet: TypedContractEvent<
      MaxPOIStalenessSetEvent.InputTuple,
      MaxPOIStalenessSetEvent.OutputTuple,
      MaxPOIStalenessSetEvent.OutputObject
    >;
  };
}
