/* 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 AllocationManagerInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "allocationProvisionTracker"
      | "eip712Domain"
      | "maxPOIStaleness",
  ): FunctionFragment;

  getEvent(
    nameOrSignatureOrTopic:
      | "AllocationClosed"
      | "AllocationCreated"
      | "AllocationResized"
      | "EIP712DomainChanged"
      | "GraphDirectoryInitialized"
      | "IndexingRewardsCollected"
      | "Initialized"
      | "LegacyAllocationMigrated"
      | "MaxPOIStalenessSet",
  ): EventFragment;

  encodeFunctionData(
    functionFragment: "allocationProvisionTracker",
    values: [AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "eip712Domain",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "maxPOIStaleness",
    values?: undefined,
  ): string;

  decodeFunctionResult(
    functionFragment: "allocationProvisionTracker",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "eip712Domain",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "maxPOIStaleness",
    data: BytesLike,
  ): Result;
}

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 EIP712DomainChangedEvent {
  export type InputTuple = [];
  export type OutputTuple = [];
  export interface OutputObject {}
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace GraphDirectoryInitializedEvent {
  export type InputTuple = [
    graphToken: AddressLike,
    graphStaking: AddressLike,
    graphPayments: AddressLike,
    graphEscrow: AddressLike,
    graphController: AddressLike,
    graphEpochManager: AddressLike,
    graphRewardsManager: AddressLike,
    graphTokenGateway: AddressLike,
    graphProxyAdmin: AddressLike,
    graphCuration: AddressLike,
  ];
  export type OutputTuple = [
    graphToken: string,
    graphStaking: string,
    graphPayments: string,
    graphEscrow: string,
    graphController: string,
    graphEpochManager: string,
    graphRewardsManager: string,
    graphTokenGateway: string,
    graphProxyAdmin: string,
    graphCuration: string,
  ];
  export interface OutputObject {
    graphToken: string;
    graphStaking: string;
    graphPayments: string;
    graphEscrow: string;
    graphController: string;
    graphEpochManager: string;
    graphRewardsManager: string;
    graphTokenGateway: string;
    graphProxyAdmin: string;
    graphCuration: 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 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 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 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 AllocationManager extends BaseContract {
  connect(runner?: ContractRunner | null): AllocationManager;
  waitForDeployment(): Promise<this>;

  interface: AllocationManagerInterface;

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

  allocationProvisionTracker: TypedContractMethod<
    [indexer: AddressLike],
    [bigint],
    "view"
  >;

  eip712Domain: TypedContractMethod<
    [],
    [
      [string, string, string, bigint, string, string, bigint[]] & {
        fields: string;
        name: string;
        version: string;
        chainId: bigint;
        verifyingContract: string;
        salt: string;
        extensions: bigint[];
      },
    ],
    "view"
  >;

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

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

  getFunction(
    nameOrSignature: "allocationProvisionTracker",
  ): TypedContractMethod<[indexer: AddressLike], [bigint], "view">;
  getFunction(
    nameOrSignature: "eip712Domain",
  ): TypedContractMethod<
    [],
    [
      [string, string, string, bigint, string, string, bigint[]] & {
        fields: string;
        name: string;
        version: string;
        chainId: bigint;
        verifyingContract: string;
        salt: string;
        extensions: bigint[];
      },
    ],
    "view"
  >;
  getFunction(
    nameOrSignature: "maxPOIStaleness",
  ): TypedContractMethod<[], [bigint], "view">;

  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: "EIP712DomainChanged",
  ): TypedContractEvent<
    EIP712DomainChangedEvent.InputTuple,
    EIP712DomainChangedEvent.OutputTuple,
    EIP712DomainChangedEvent.OutputObject
  >;
  getEvent(
    key: "GraphDirectoryInitialized",
  ): TypedContractEvent<
    GraphDirectoryInitializedEvent.InputTuple,
    GraphDirectoryInitializedEvent.OutputTuple,
    GraphDirectoryInitializedEvent.OutputObject
  >;
  getEvent(
    key: "IndexingRewardsCollected",
  ): TypedContractEvent<
    IndexingRewardsCollectedEvent.InputTuple,
    IndexingRewardsCollectedEvent.OutputTuple,
    IndexingRewardsCollectedEvent.OutputObject
  >;
  getEvent(
    key: "Initialized",
  ): TypedContractEvent<
    InitializedEvent.InputTuple,
    InitializedEvent.OutputTuple,
    InitializedEvent.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
    >;

    "EIP712DomainChanged()": TypedContractEvent<
      EIP712DomainChangedEvent.InputTuple,
      EIP712DomainChangedEvent.OutputTuple,
      EIP712DomainChangedEvent.OutputObject
    >;
    EIP712DomainChanged: TypedContractEvent<
      EIP712DomainChangedEvent.InputTuple,
      EIP712DomainChangedEvent.OutputTuple,
      EIP712DomainChangedEvent.OutputObject
    >;

    "GraphDirectoryInitialized(address,address,address,address,address,address,address,address,address,address)": TypedContractEvent<
      GraphDirectoryInitializedEvent.InputTuple,
      GraphDirectoryInitializedEvent.OutputTuple,
      GraphDirectoryInitializedEvent.OutputObject
    >;
    GraphDirectoryInitialized: TypedContractEvent<
      GraphDirectoryInitializedEvent.InputTuple,
      GraphDirectoryInitializedEvent.OutputTuple,
      GraphDirectoryInitializedEvent.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
    >;

    "Initialized(uint64)": TypedContractEvent<
      InitializedEvent.InputTuple,
      InitializedEvent.OutputTuple,
      InitializedEvent.OutputObject
    >;
    Initialized: TypedContractEvent<
      InitializedEvent.InputTuple,
      InitializedEvent.OutputTuple,
      InitializedEvent.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
    >;
  };
}
