/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumber,
  BigNumberish,
  BytesLike,
  CallOverrides,
  ContractTransaction,
  Overrides,
  PopulatedTransaction,
  Signer,
  utils,
} from "ethers";
import type {
  FunctionFragment,
  Result,
  EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
  TypedEventFilter,
  TypedEvent,
  TypedListener,
  OnEvent,
  PromiseOrValue,
} from "../../../common";

export declare namespace IStakingData {
  export type AllocationStruct = {
    indexer: PromiseOrValue<string>;
    subgraphDeploymentID: PromiseOrValue<BytesLike>;
    tokens: PromiseOrValue<BigNumberish>;
    createdAtEpoch: PromiseOrValue<BigNumberish>;
    closedAtEpoch: PromiseOrValue<BigNumberish>;
    collectedFees: PromiseOrValue<BigNumberish>;
    __DEPRECATED_effectiveAllocation: PromiseOrValue<BigNumberish>;
    accRewardsPerAllocatedToken: PromiseOrValue<BigNumberish>;
    distributedRebates: PromiseOrValue<BigNumberish>;
  };

  export type AllocationStructOutput = [
    string,
    string,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
  ] & {
    indexer: string;
    subgraphDeploymentID: string;
    tokens: BigNumber;
    createdAtEpoch: BigNumber;
    closedAtEpoch: BigNumber;
    collectedFees: BigNumber;
    __DEPRECATED_effectiveAllocation: BigNumber;
    accRewardsPerAllocatedToken: BigNumber;
    distributedRebates: BigNumber;
  };

  export type RebatesParametersStruct = {
    alphaNumerator: PromiseOrValue<BigNumberish>;
    alphaDenominator: PromiseOrValue<BigNumberish>;
    lambdaNumerator: PromiseOrValue<BigNumberish>;
    lambdaDenominator: PromiseOrValue<BigNumberish>;
  };

  export type RebatesParametersStructOutput = [
    number,
    number,
    number,
    number,
  ] & {
    alphaNumerator: number;
    alphaDenominator: number;
    lambdaNumerator: number;
    lambdaDenominator: number;
  };
}

export interface IStakingBaseInterface extends utils.Interface {
  functions: {
    "allocate(bytes32,uint256,address,bytes32,bytes)": FunctionFragment;
    "allocateFrom(address,bytes32,uint256,address,bytes32,bytes)": FunctionFragment;
    "closeAllocation(address,bytes32)": FunctionFragment;
    "collect(uint256,address)": FunctionFragment;
    "getAllocation(address)": FunctionFragment;
    "getAllocationData(address)": FunctionFragment;
    "getAllocationState(address)": FunctionFragment;
    "getIndexerCapacity(address)": FunctionFragment;
    "getIndexerStakedTokens(address)": FunctionFragment;
    "getSubgraphAllocatedTokens(bytes32)": FunctionFragment;
    "hasStake(address)": FunctionFragment;
    "initialize(address,uint256,uint32,uint32,uint32,uint32,uint32,uint32,(uint32,uint32,uint32,uint32),address)": FunctionFragment;
    "isActiveAllocation(address)": FunctionFragment;
    "isAllocation(address)": FunctionFragment;
    "isOperator(address,address)": FunctionFragment;
    "setCounterpartStakingAddress(address)": FunctionFragment;
    "setCurationPercentage(uint32)": FunctionFragment;
    "setDelegationParameters(uint32,uint32,uint32)": FunctionFragment;
    "setExtensionImpl(address)": FunctionFragment;
    "setMaxAllocationEpochs(uint32)": FunctionFragment;
    "setMinimumIndexerStake(uint256)": FunctionFragment;
    "setOperator(address,bool)": FunctionFragment;
    "setProtocolPercentage(uint32)": FunctionFragment;
    "setRebateParameters(uint32,uint32,uint32,uint32)": FunctionFragment;
    "setRewardsDestination(address)": FunctionFragment;
    "setThawingPeriod(uint32)": FunctionFragment;
    "stake(uint256)": FunctionFragment;
    "stakeTo(address,uint256)": FunctionFragment;
    "unstake(uint256)": FunctionFragment;
    "withdraw()": FunctionFragment;
  };

  getFunction(
    nameOrSignatureOrTopic:
      | "allocate"
      | "allocateFrom"
      | "closeAllocation"
      | "collect"
      | "getAllocation"
      | "getAllocationData"
      | "getAllocationState"
      | "getIndexerCapacity"
      | "getIndexerStakedTokens"
      | "getSubgraphAllocatedTokens"
      | "hasStake"
      | "initialize"
      | "isActiveAllocation"
      | "isAllocation"
      | "isOperator"
      | "setCounterpartStakingAddress"
      | "setCurationPercentage"
      | "setDelegationParameters"
      | "setExtensionImpl"
      | "setMaxAllocationEpochs"
      | "setMinimumIndexerStake"
      | "setOperator"
      | "setProtocolPercentage"
      | "setRebateParameters"
      | "setRewardsDestination"
      | "setThawingPeriod"
      | "stake"
      | "stakeTo"
      | "unstake"
      | "withdraw",
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "allocate",
    values: [
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<string>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BytesLike>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "allocateFrom",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<string>,
      PromiseOrValue<BytesLike>,
      PromiseOrValue<BytesLike>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "closeAllocation",
    values: [PromiseOrValue<string>, PromiseOrValue<BytesLike>],
  ): string;
  encodeFunctionData(
    functionFragment: "collect",
    values: [PromiseOrValue<BigNumberish>, PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "getAllocation",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "getAllocationData",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "getAllocationState",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "getIndexerCapacity",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "getIndexerStakedTokens",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "getSubgraphAllocatedTokens",
    values: [PromiseOrValue<BytesLike>],
  ): string;
  encodeFunctionData(
    functionFragment: "hasStake",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "initialize",
    values: [
      PromiseOrValue<string>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
      IStakingData.RebatesParametersStruct,
      PromiseOrValue<string>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "isActiveAllocation",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "isAllocation",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "isOperator",
    values: [PromiseOrValue<string>, PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "setCounterpartStakingAddress",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "setCurationPercentage",
    values: [PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(
    functionFragment: "setDelegationParameters",
    values: [
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "setExtensionImpl",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "setMaxAllocationEpochs",
    values: [PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(
    functionFragment: "setMinimumIndexerStake",
    values: [PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(
    functionFragment: "setOperator",
    values: [PromiseOrValue<string>, PromiseOrValue<boolean>],
  ): string;
  encodeFunctionData(
    functionFragment: "setProtocolPercentage",
    values: [PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(
    functionFragment: "setRebateParameters",
    values: [
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
      PromiseOrValue<BigNumberish>,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "setRewardsDestination",
    values: [PromiseOrValue<string>],
  ): string;
  encodeFunctionData(
    functionFragment: "setThawingPeriod",
    values: [PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(
    functionFragment: "stake",
    values: [PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(
    functionFragment: "stakeTo",
    values: [PromiseOrValue<string>, PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(
    functionFragment: "unstake",
    values: [PromiseOrValue<BigNumberish>],
  ): string;
  encodeFunctionData(functionFragment: "withdraw", values?: undefined): string;

  decodeFunctionResult(functionFragment: "allocate", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "allocateFrom",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "closeAllocation",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(functionFragment: "collect", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getAllocation",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "getAllocationData",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "getAllocationState",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "getIndexerCapacity",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "getIndexerStakedTokens",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "getSubgraphAllocatedTokens",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(functionFragment: "hasStake", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "isActiveAllocation",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "isAllocation",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(functionFragment: "isOperator", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "setCounterpartStakingAddress",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setCurationPercentage",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setDelegationParameters",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setExtensionImpl",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setMaxAllocationEpochs",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setMinimumIndexerStake",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setOperator",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setProtocolPercentage",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setRebateParameters",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setRewardsDestination",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setThawingPeriod",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(functionFragment: "stake", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "stakeTo", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "unstake", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "withdraw", data: BytesLike): Result;

  events: {
    "AllocationClosed(address,bytes32,uint256,uint256,address,address,bytes32,bool)": EventFragment;
    "AllocationCreated(address,bytes32,uint256,uint256,address,bytes32)": EventFragment;
    "DelegationParametersUpdated(address,uint32,uint32,uint32)": EventFragment;
    "ExtensionImplementationSet(address)": EventFragment;
    "RebateCollected(address,address,bytes32,address,uint256,uint256,uint256,uint256,uint256,uint256,uint256)": EventFragment;
    "SetOperator(address,address,bool)": EventFragment;
    "SetRewardsDestination(address,address)": EventFragment;
    "StakeDeposited(address,uint256)": EventFragment;
    "StakeLocked(address,uint256,uint256)": EventFragment;
    "StakeWithdrawn(address,uint256)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "AllocationClosed"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "AllocationCreated"): EventFragment;
  getEvent(
    nameOrSignatureOrTopic: "DelegationParametersUpdated",
  ): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ExtensionImplementationSet"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "RebateCollected"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetOperator"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "SetRewardsDestination"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "StakeDeposited"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "StakeLocked"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "StakeWithdrawn"): EventFragment;
}

export interface AllocationClosedEventObject {
  indexer: string;
  subgraphDeploymentID: string;
  epoch: BigNumber;
  tokens: BigNumber;
  allocationID: string;
  sender: string;
  poi: string;
  isPublic: boolean;
}
export type AllocationClosedEvent = TypedEvent<
  [string, string, BigNumber, BigNumber, string, string, string, boolean],
  AllocationClosedEventObject
>;

export type AllocationClosedEventFilter =
  TypedEventFilter<AllocationClosedEvent>;

export interface AllocationCreatedEventObject {
  indexer: string;
  subgraphDeploymentID: string;
  epoch: BigNumber;
  tokens: BigNumber;
  allocationID: string;
  metadata: string;
}
export type AllocationCreatedEvent = TypedEvent<
  [string, string, BigNumber, BigNumber, string, string],
  AllocationCreatedEventObject
>;

export type AllocationCreatedEventFilter =
  TypedEventFilter<AllocationCreatedEvent>;

export interface DelegationParametersUpdatedEventObject {
  indexer: string;
  indexingRewardCut: number;
  queryFeeCut: number;
  __DEPRECATED_cooldownBlocks: number;
}
export type DelegationParametersUpdatedEvent = TypedEvent<
  [string, number, number, number],
  DelegationParametersUpdatedEventObject
>;

export type DelegationParametersUpdatedEventFilter =
  TypedEventFilter<DelegationParametersUpdatedEvent>;

export interface ExtensionImplementationSetEventObject {
  extensionImpl: string;
}
export type ExtensionImplementationSetEvent = TypedEvent<
  [string],
  ExtensionImplementationSetEventObject
>;

export type ExtensionImplementationSetEventFilter =
  TypedEventFilter<ExtensionImplementationSetEvent>;

export interface RebateCollectedEventObject {
  assetHolder: string;
  indexer: string;
  subgraphDeploymentID: string;
  allocationID: string;
  epoch: BigNumber;
  tokens: BigNumber;
  protocolTax: BigNumber;
  curationFees: BigNumber;
  queryFees: BigNumber;
  queryRebates: BigNumber;
  delegationRewards: BigNumber;
}
export type RebateCollectedEvent = TypedEvent<
  [
    string,
    string,
    string,
    string,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
    BigNumber,
  ],
  RebateCollectedEventObject
>;

export type RebateCollectedEventFilter = TypedEventFilter<RebateCollectedEvent>;

export interface SetOperatorEventObject {
  indexer: string;
  operator: string;
  allowed: boolean;
}
export type SetOperatorEvent = TypedEvent<
  [string, string, boolean],
  SetOperatorEventObject
>;

export type SetOperatorEventFilter = TypedEventFilter<SetOperatorEvent>;

export interface SetRewardsDestinationEventObject {
  indexer: string;
  destination: string;
}
export type SetRewardsDestinationEvent = TypedEvent<
  [string, string],
  SetRewardsDestinationEventObject
>;

export type SetRewardsDestinationEventFilter =
  TypedEventFilter<SetRewardsDestinationEvent>;

export interface StakeDepositedEventObject {
  indexer: string;
  tokens: BigNumber;
}
export type StakeDepositedEvent = TypedEvent<
  [string, BigNumber],
  StakeDepositedEventObject
>;

export type StakeDepositedEventFilter = TypedEventFilter<StakeDepositedEvent>;

export interface StakeLockedEventObject {
  indexer: string;
  tokens: BigNumber;
  until: BigNumber;
}
export type StakeLockedEvent = TypedEvent<
  [string, BigNumber, BigNumber],
  StakeLockedEventObject
>;

export type StakeLockedEventFilter = TypedEventFilter<StakeLockedEvent>;

export interface StakeWithdrawnEventObject {
  indexer: string;
  tokens: BigNumber;
}
export type StakeWithdrawnEvent = TypedEvent<
  [string, BigNumber],
  StakeWithdrawnEventObject
>;

export type StakeWithdrawnEventFilter = TypedEventFilter<StakeWithdrawnEvent>;

export interface IStakingBase extends BaseContract {
  connect(signerOrProvider: Signer | Provider | string): this;
  attach(addressOrName: string): this;
  deployed(): Promise<this>;

  interface: IStakingBaseInterface;

  queryFilter<TEvent extends TypedEvent>(
    event: TypedEventFilter<TEvent>,
    fromBlockOrBlockhash?: string | number | undefined,
    toBlock?: string | number | undefined,
  ): Promise<Array<TEvent>>;

  listeners<TEvent extends TypedEvent>(
    eventFilter?: TypedEventFilter<TEvent>,
  ): Array<TypedListener<TEvent>>;
  listeners(eventName?: string): Array<Listener>;
  removeAllListeners<TEvent extends TypedEvent>(
    eventFilter: TypedEventFilter<TEvent>,
  ): this;
  removeAllListeners(eventName?: string): this;
  off: OnEvent<this>;
  on: OnEvent<this>;
  once: OnEvent<this>;
  removeListener: OnEvent<this>;

  functions: {
    allocate(
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      metadata: PromiseOrValue<BytesLike>,
      proof: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    allocateFrom(
      indexer: PromiseOrValue<string>,
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      metadata: PromiseOrValue<BytesLike>,
      proof: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    closeAllocation(
      allocationID: PromiseOrValue<string>,
      poi: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    collect(
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    getAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[IStakingData.AllocationStructOutput]>;

    getAllocationData(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[boolean, string, string, BigNumber, BigNumber, BigNumber]>;

    getAllocationState(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[number]>;

    getIndexerCapacity(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[BigNumber]>;

    getIndexerStakedTokens(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[BigNumber]>;

    getSubgraphAllocatedTokens(
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<[BigNumber]>;

    hasStake(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[boolean]>;

    initialize(
      controller: PromiseOrValue<string>,
      minimumIndexerStake: PromiseOrValue<BigNumberish>,
      thawingPeriod: PromiseOrValue<BigNumberish>,
      protocolPercentage: PromiseOrValue<BigNumberish>,
      curationPercentage: PromiseOrValue<BigNumberish>,
      maxAllocationEpochs: PromiseOrValue<BigNumberish>,
      delegationUnbondingPeriod: PromiseOrValue<BigNumberish>,
      delegationRatio: PromiseOrValue<BigNumberish>,
      rebatesParameters: IStakingData.RebatesParametersStruct,
      extensionImpl: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    isActiveAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[boolean]>;

    isAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[boolean]>;

    isOperator(
      operator: PromiseOrValue<string>,
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[boolean]>;

    setCounterpartStakingAddress(
      counterpart: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setCurationPercentage(
      percentage: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setDelegationParameters(
      indexingRewardCut: PromiseOrValue<BigNumberish>,
      queryFeeCut: PromiseOrValue<BigNumberish>,
      arg2: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setExtensionImpl(
      extensionImpl: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setMaxAllocationEpochs(
      maxAllocationEpochs: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setMinimumIndexerStake(
      minimumIndexerStake: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setOperator(
      operator: PromiseOrValue<string>,
      allowed: PromiseOrValue<boolean>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setProtocolPercentage(
      percentage: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setRebateParameters(
      alphaNumerator: PromiseOrValue<BigNumberish>,
      alphaDenominator: PromiseOrValue<BigNumberish>,
      lambdaNumerator: PromiseOrValue<BigNumberish>,
      lambdaDenominator: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setRewardsDestination(
      destination: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    setThawingPeriod(
      thawingPeriod: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    stake(
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    stakeTo(
      indexer: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    unstake(
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;

    withdraw(
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<ContractTransaction>;
  };

  allocate(
    subgraphDeploymentID: PromiseOrValue<BytesLike>,
    tokens: PromiseOrValue<BigNumberish>,
    allocationID: PromiseOrValue<string>,
    metadata: PromiseOrValue<BytesLike>,
    proof: PromiseOrValue<BytesLike>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  allocateFrom(
    indexer: PromiseOrValue<string>,
    subgraphDeploymentID: PromiseOrValue<BytesLike>,
    tokens: PromiseOrValue<BigNumberish>,
    allocationID: PromiseOrValue<string>,
    metadata: PromiseOrValue<BytesLike>,
    proof: PromiseOrValue<BytesLike>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  closeAllocation(
    allocationID: PromiseOrValue<string>,
    poi: PromiseOrValue<BytesLike>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  collect(
    tokens: PromiseOrValue<BigNumberish>,
    allocationID: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  getAllocation(
    allocationID: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<IStakingData.AllocationStructOutput>;

  getAllocationData(
    allocationID: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<[boolean, string, string, BigNumber, BigNumber, BigNumber]>;

  getAllocationState(
    allocationID: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<number>;

  getIndexerCapacity(
    indexer: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<BigNumber>;

  getIndexerStakedTokens(
    indexer: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<BigNumber>;

  getSubgraphAllocatedTokens(
    subgraphDeploymentID: PromiseOrValue<BytesLike>,
    overrides?: CallOverrides,
  ): Promise<BigNumber>;

  hasStake(
    indexer: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<boolean>;

  initialize(
    controller: PromiseOrValue<string>,
    minimumIndexerStake: PromiseOrValue<BigNumberish>,
    thawingPeriod: PromiseOrValue<BigNumberish>,
    protocolPercentage: PromiseOrValue<BigNumberish>,
    curationPercentage: PromiseOrValue<BigNumberish>,
    maxAllocationEpochs: PromiseOrValue<BigNumberish>,
    delegationUnbondingPeriod: PromiseOrValue<BigNumberish>,
    delegationRatio: PromiseOrValue<BigNumberish>,
    rebatesParameters: IStakingData.RebatesParametersStruct,
    extensionImpl: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  isActiveAllocation(
    allocationID: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<boolean>;

  isAllocation(
    allocationID: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<boolean>;

  isOperator(
    operator: PromiseOrValue<string>,
    indexer: PromiseOrValue<string>,
    overrides?: CallOverrides,
  ): Promise<boolean>;

  setCounterpartStakingAddress(
    counterpart: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setCurationPercentage(
    percentage: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setDelegationParameters(
    indexingRewardCut: PromiseOrValue<BigNumberish>,
    queryFeeCut: PromiseOrValue<BigNumberish>,
    arg2: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setExtensionImpl(
    extensionImpl: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setMaxAllocationEpochs(
    maxAllocationEpochs: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setMinimumIndexerStake(
    minimumIndexerStake: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setOperator(
    operator: PromiseOrValue<string>,
    allowed: PromiseOrValue<boolean>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setProtocolPercentage(
    percentage: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setRebateParameters(
    alphaNumerator: PromiseOrValue<BigNumberish>,
    alphaDenominator: PromiseOrValue<BigNumberish>,
    lambdaNumerator: PromiseOrValue<BigNumberish>,
    lambdaDenominator: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setRewardsDestination(
    destination: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  setThawingPeriod(
    thawingPeriod: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  stake(
    tokens: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  stakeTo(
    indexer: PromiseOrValue<string>,
    tokens: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  unstake(
    tokens: PromiseOrValue<BigNumberish>,
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  withdraw(
    overrides?: Overrides & { from?: PromiseOrValue<string> },
  ): Promise<ContractTransaction>;

  callStatic: {
    allocate(
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      metadata: PromiseOrValue<BytesLike>,
      proof: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<void>;

    allocateFrom(
      indexer: PromiseOrValue<string>,
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      metadata: PromiseOrValue<BytesLike>,
      proof: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<void>;

    closeAllocation(
      allocationID: PromiseOrValue<string>,
      poi: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<void>;

    collect(
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<void>;

    getAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<IStakingData.AllocationStructOutput>;

    getAllocationData(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<[boolean, string, string, BigNumber, BigNumber, BigNumber]>;

    getAllocationState(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<number>;

    getIndexerCapacity(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getIndexerStakedTokens(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getSubgraphAllocatedTokens(
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    hasStake(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<boolean>;

    initialize(
      controller: PromiseOrValue<string>,
      minimumIndexerStake: PromiseOrValue<BigNumberish>,
      thawingPeriod: PromiseOrValue<BigNumberish>,
      protocolPercentage: PromiseOrValue<BigNumberish>,
      curationPercentage: PromiseOrValue<BigNumberish>,
      maxAllocationEpochs: PromiseOrValue<BigNumberish>,
      delegationUnbondingPeriod: PromiseOrValue<BigNumberish>,
      delegationRatio: PromiseOrValue<BigNumberish>,
      rebatesParameters: IStakingData.RebatesParametersStruct,
      extensionImpl: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<void>;

    isActiveAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<boolean>;

    isAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<boolean>;

    isOperator(
      operator: PromiseOrValue<string>,
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<boolean>;

    setCounterpartStakingAddress(
      counterpart: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setCurationPercentage(
      percentage: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setDelegationParameters(
      indexingRewardCut: PromiseOrValue<BigNumberish>,
      queryFeeCut: PromiseOrValue<BigNumberish>,
      arg2: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setExtensionImpl(
      extensionImpl: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setMaxAllocationEpochs(
      maxAllocationEpochs: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setMinimumIndexerStake(
      minimumIndexerStake: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setOperator(
      operator: PromiseOrValue<string>,
      allowed: PromiseOrValue<boolean>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setProtocolPercentage(
      percentage: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setRebateParameters(
      alphaNumerator: PromiseOrValue<BigNumberish>,
      alphaDenominator: PromiseOrValue<BigNumberish>,
      lambdaNumerator: PromiseOrValue<BigNumberish>,
      lambdaDenominator: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setRewardsDestination(
      destination: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<void>;

    setThawingPeriod(
      thawingPeriod: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    stake(
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    stakeTo(
      indexer: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    unstake(
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: CallOverrides,
    ): Promise<void>;

    withdraw(overrides?: CallOverrides): Promise<void>;
  };

  filters: {
    "AllocationClosed(address,bytes32,uint256,uint256,address,address,bytes32,bool)"(
      indexer?: PromiseOrValue<string> | null,
      subgraphDeploymentID?: PromiseOrValue<BytesLike> | null,
      epoch?: null,
      tokens?: null,
      allocationID?: PromiseOrValue<string> | null,
      sender?: null,
      poi?: null,
      isPublic?: null,
    ): AllocationClosedEventFilter;
    AllocationClosed(
      indexer?: PromiseOrValue<string> | null,
      subgraphDeploymentID?: PromiseOrValue<BytesLike> | null,
      epoch?: null,
      tokens?: null,
      allocationID?: PromiseOrValue<string> | null,
      sender?: null,
      poi?: null,
      isPublic?: null,
    ): AllocationClosedEventFilter;

    "AllocationCreated(address,bytes32,uint256,uint256,address,bytes32)"(
      indexer?: PromiseOrValue<string> | null,
      subgraphDeploymentID?: PromiseOrValue<BytesLike> | null,
      epoch?: null,
      tokens?: null,
      allocationID?: PromiseOrValue<string> | null,
      metadata?: null,
    ): AllocationCreatedEventFilter;
    AllocationCreated(
      indexer?: PromiseOrValue<string> | null,
      subgraphDeploymentID?: PromiseOrValue<BytesLike> | null,
      epoch?: null,
      tokens?: null,
      allocationID?: PromiseOrValue<string> | null,
      metadata?: null,
    ): AllocationCreatedEventFilter;

    "DelegationParametersUpdated(address,uint32,uint32,uint32)"(
      indexer?: PromiseOrValue<string> | null,
      indexingRewardCut?: null,
      queryFeeCut?: null,
      __DEPRECATED_cooldownBlocks?: null,
    ): DelegationParametersUpdatedEventFilter;
    DelegationParametersUpdated(
      indexer?: PromiseOrValue<string> | null,
      indexingRewardCut?: null,
      queryFeeCut?: null,
      __DEPRECATED_cooldownBlocks?: null,
    ): DelegationParametersUpdatedEventFilter;

    "ExtensionImplementationSet(address)"(
      extensionImpl?: PromiseOrValue<string> | null,
    ): ExtensionImplementationSetEventFilter;
    ExtensionImplementationSet(
      extensionImpl?: PromiseOrValue<string> | null,
    ): ExtensionImplementationSetEventFilter;

    "RebateCollected(address,address,bytes32,address,uint256,uint256,uint256,uint256,uint256,uint256,uint256)"(
      assetHolder?: null,
      indexer?: PromiseOrValue<string> | null,
      subgraphDeploymentID?: PromiseOrValue<BytesLike> | null,
      allocationID?: PromiseOrValue<string> | null,
      epoch?: null,
      tokens?: null,
      protocolTax?: null,
      curationFees?: null,
      queryFees?: null,
      queryRebates?: null,
      delegationRewards?: null,
    ): RebateCollectedEventFilter;
    RebateCollected(
      assetHolder?: null,
      indexer?: PromiseOrValue<string> | null,
      subgraphDeploymentID?: PromiseOrValue<BytesLike> | null,
      allocationID?: PromiseOrValue<string> | null,
      epoch?: null,
      tokens?: null,
      protocolTax?: null,
      curationFees?: null,
      queryFees?: null,
      queryRebates?: null,
      delegationRewards?: null,
    ): RebateCollectedEventFilter;

    "SetOperator(address,address,bool)"(
      indexer?: PromiseOrValue<string> | null,
      operator?: PromiseOrValue<string> | null,
      allowed?: null,
    ): SetOperatorEventFilter;
    SetOperator(
      indexer?: PromiseOrValue<string> | null,
      operator?: PromiseOrValue<string> | null,
      allowed?: null,
    ): SetOperatorEventFilter;

    "SetRewardsDestination(address,address)"(
      indexer?: PromiseOrValue<string> | null,
      destination?: PromiseOrValue<string> | null,
    ): SetRewardsDestinationEventFilter;
    SetRewardsDestination(
      indexer?: PromiseOrValue<string> | null,
      destination?: PromiseOrValue<string> | null,
    ): SetRewardsDestinationEventFilter;

    "StakeDeposited(address,uint256)"(
      indexer?: PromiseOrValue<string> | null,
      tokens?: null,
    ): StakeDepositedEventFilter;
    StakeDeposited(
      indexer?: PromiseOrValue<string> | null,
      tokens?: null,
    ): StakeDepositedEventFilter;

    "StakeLocked(address,uint256,uint256)"(
      indexer?: PromiseOrValue<string> | null,
      tokens?: null,
      until?: null,
    ): StakeLockedEventFilter;
    StakeLocked(
      indexer?: PromiseOrValue<string> | null,
      tokens?: null,
      until?: null,
    ): StakeLockedEventFilter;

    "StakeWithdrawn(address,uint256)"(
      indexer?: PromiseOrValue<string> | null,
      tokens?: null,
    ): StakeWithdrawnEventFilter;
    StakeWithdrawn(
      indexer?: PromiseOrValue<string> | null,
      tokens?: null,
    ): StakeWithdrawnEventFilter;
  };

  estimateGas: {
    allocate(
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      metadata: PromiseOrValue<BytesLike>,
      proof: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    allocateFrom(
      indexer: PromiseOrValue<string>,
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      metadata: PromiseOrValue<BytesLike>,
      proof: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    closeAllocation(
      allocationID: PromiseOrValue<string>,
      poi: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    collect(
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    getAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getAllocationData(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getAllocationState(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getIndexerCapacity(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getIndexerStakedTokens(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    getSubgraphAllocatedTokens(
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    hasStake(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    initialize(
      controller: PromiseOrValue<string>,
      minimumIndexerStake: PromiseOrValue<BigNumberish>,
      thawingPeriod: PromiseOrValue<BigNumberish>,
      protocolPercentage: PromiseOrValue<BigNumberish>,
      curationPercentage: PromiseOrValue<BigNumberish>,
      maxAllocationEpochs: PromiseOrValue<BigNumberish>,
      delegationUnbondingPeriod: PromiseOrValue<BigNumberish>,
      delegationRatio: PromiseOrValue<BigNumberish>,
      rebatesParameters: IStakingData.RebatesParametersStruct,
      extensionImpl: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    isActiveAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    isAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    isOperator(
      operator: PromiseOrValue<string>,
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<BigNumber>;

    setCounterpartStakingAddress(
      counterpart: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setCurationPercentage(
      percentage: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setDelegationParameters(
      indexingRewardCut: PromiseOrValue<BigNumberish>,
      queryFeeCut: PromiseOrValue<BigNumberish>,
      arg2: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setExtensionImpl(
      extensionImpl: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setMaxAllocationEpochs(
      maxAllocationEpochs: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setMinimumIndexerStake(
      minimumIndexerStake: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setOperator(
      operator: PromiseOrValue<string>,
      allowed: PromiseOrValue<boolean>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setProtocolPercentage(
      percentage: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setRebateParameters(
      alphaNumerator: PromiseOrValue<BigNumberish>,
      alphaDenominator: PromiseOrValue<BigNumberish>,
      lambdaNumerator: PromiseOrValue<BigNumberish>,
      lambdaDenominator: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setRewardsDestination(
      destination: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    setThawingPeriod(
      thawingPeriod: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    stake(
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    stakeTo(
      indexer: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    unstake(
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;

    withdraw(
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    allocate(
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      metadata: PromiseOrValue<BytesLike>,
      proof: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    allocateFrom(
      indexer: PromiseOrValue<string>,
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      metadata: PromiseOrValue<BytesLike>,
      proof: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    closeAllocation(
      allocationID: PromiseOrValue<string>,
      poi: PromiseOrValue<BytesLike>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    collect(
      tokens: PromiseOrValue<BigNumberish>,
      allocationID: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    getAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    getAllocationData(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    getAllocationState(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    getIndexerCapacity(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    getIndexerStakedTokens(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    getSubgraphAllocatedTokens(
      subgraphDeploymentID: PromiseOrValue<BytesLike>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    hasStake(
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    initialize(
      controller: PromiseOrValue<string>,
      minimumIndexerStake: PromiseOrValue<BigNumberish>,
      thawingPeriod: PromiseOrValue<BigNumberish>,
      protocolPercentage: PromiseOrValue<BigNumberish>,
      curationPercentage: PromiseOrValue<BigNumberish>,
      maxAllocationEpochs: PromiseOrValue<BigNumberish>,
      delegationUnbondingPeriod: PromiseOrValue<BigNumberish>,
      delegationRatio: PromiseOrValue<BigNumberish>,
      rebatesParameters: IStakingData.RebatesParametersStruct,
      extensionImpl: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    isActiveAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    isAllocation(
      allocationID: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    isOperator(
      operator: PromiseOrValue<string>,
      indexer: PromiseOrValue<string>,
      overrides?: CallOverrides,
    ): Promise<PopulatedTransaction>;

    setCounterpartStakingAddress(
      counterpart: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setCurationPercentage(
      percentage: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setDelegationParameters(
      indexingRewardCut: PromiseOrValue<BigNumberish>,
      queryFeeCut: PromiseOrValue<BigNumberish>,
      arg2: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setExtensionImpl(
      extensionImpl: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setMaxAllocationEpochs(
      maxAllocationEpochs: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setMinimumIndexerStake(
      minimumIndexerStake: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setOperator(
      operator: PromiseOrValue<string>,
      allowed: PromiseOrValue<boolean>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setProtocolPercentage(
      percentage: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setRebateParameters(
      alphaNumerator: PromiseOrValue<BigNumberish>,
      alphaDenominator: PromiseOrValue<BigNumberish>,
      lambdaNumerator: PromiseOrValue<BigNumberish>,
      lambdaDenominator: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setRewardsDestination(
      destination: PromiseOrValue<string>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    setThawingPeriod(
      thawingPeriod: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    stake(
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    stakeTo(
      indexer: PromiseOrValue<string>,
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    unstake(
      tokens: PromiseOrValue<BigNumberish>,
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;

    withdraw(
      overrides?: Overrides & { from?: PromiseOrValue<string> },
    ): Promise<PopulatedTransaction>;
  };
}
