/* 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 IHorizonStakingTypes {
  export type DelegationStruct = { shares: BigNumberish }

  export type DelegationStructOutput = [shares: bigint] & { shares: bigint }

  export type DelegationPoolStruct = {
    tokens: BigNumberish
    shares: BigNumberish
    tokensThawing: BigNumberish
    sharesThawing: BigNumberish
    thawingNonce: BigNumberish
  }

  export type DelegationPoolStructOutput = [
    tokens: bigint,
    shares: bigint,
    tokensThawing: bigint,
    sharesThawing: bigint,
    thawingNonce: bigint,
  ] & {
    tokens: bigint
    shares: bigint
    tokensThawing: bigint
    sharesThawing: bigint
    thawingNonce: bigint
  }

  export type ProvisionStruct = {
    tokens: BigNumberish
    tokensThawing: BigNumberish
    sharesThawing: BigNumberish
    maxVerifierCut: BigNumberish
    thawingPeriod: BigNumberish
    createdAt: BigNumberish
    maxVerifierCutPending: BigNumberish
    thawingPeriodPending: BigNumberish
    lastParametersStagedAt: BigNumberish
    thawingNonce: BigNumberish
  }

  export type ProvisionStructOutput = [
    tokens: bigint,
    tokensThawing: bigint,
    sharesThawing: bigint,
    maxVerifierCut: bigint,
    thawingPeriod: bigint,
    createdAt: bigint,
    maxVerifierCutPending: bigint,
    thawingPeriodPending: bigint,
    lastParametersStagedAt: bigint,
    thawingNonce: bigint,
  ] & {
    tokens: bigint
    tokensThawing: bigint
    sharesThawing: bigint
    maxVerifierCut: bigint
    thawingPeriod: bigint
    createdAt: bigint
    maxVerifierCutPending: bigint
    thawingPeriodPending: bigint
    lastParametersStagedAt: bigint
    thawingNonce: bigint
  }

  export type ServiceProviderStruct = {
    tokensStaked: BigNumberish
    tokensProvisioned: BigNumberish
  }

  export type ServiceProviderStructOutput = [tokensStaked: bigint, tokensProvisioned: bigint] & {
    tokensStaked: bigint
    tokensProvisioned: bigint
  }

  export type ThawRequestStruct = {
    shares: BigNumberish
    thawingUntil: BigNumberish
    nextRequest: BytesLike
    thawingNonce: BigNumberish
  }

  export type ThawRequestStructOutput = [
    shares: bigint,
    thawingUntil: bigint,
    nextRequest: string,
    thawingNonce: bigint,
  ] & {
    shares: bigint
    thawingUntil: bigint
    nextRequest: string
    thawingNonce: bigint
  }
}

export declare namespace ILinkedList {
  export type ListStruct = {
    head: BytesLike
    tail: BytesLike
    nonce: BigNumberish
    count: BigNumberish
  }

  export type ListStructOutput = [head: string, tail: string, nonce: bigint, count: bigint] & {
    head: string
    tail: string
    nonce: bigint
    count: bigint
  }
}

export interface HorizonStakingBaseInterface extends Interface {
  getFunction(
    nameOrSignature:
      | 'acceptProxy'
      | 'acceptProxyAndCall'
      | 'getDelegatedTokensAvailable'
      | 'getDelegation'
      | 'getDelegationFeeCut'
      | 'getDelegationPool'
      | 'getIdleStake'
      | 'getMaxThawingPeriod'
      | 'getProviderTokensAvailable'
      | 'getProvision'
      | 'getServiceProvider'
      | 'getStake'
      | 'getThawRequest'
      | 'getThawRequestList'
      | 'getThawedTokens'
      | 'getTokensAvailable'
      | 'isAllowedLockedVerifier'
      | 'isDelegationSlashingEnabled'
      | 'multicall',
  ): FunctionFragment

  getEvent(nameOrSignatureOrTopic: 'GraphDirectoryInitialized' | 'HorizonStakeDeposited'): EventFragment

  encodeFunctionData(functionFragment: 'acceptProxy', values: [AddressLike]): string
  encodeFunctionData(functionFragment: 'acceptProxyAndCall', values: [AddressLike, BytesLike]): string
  encodeFunctionData(functionFragment: 'getDelegatedTokensAvailable', values: [AddressLike, AddressLike]): string
  encodeFunctionData(functionFragment: 'getDelegation', values: [AddressLike, AddressLike, AddressLike]): string
  encodeFunctionData(functionFragment: 'getDelegationFeeCut', values: [AddressLike, AddressLike, BigNumberish]): string
  encodeFunctionData(functionFragment: 'getDelegationPool', values: [AddressLike, AddressLike]): string
  encodeFunctionData(functionFragment: 'getIdleStake', values: [AddressLike]): string
  encodeFunctionData(functionFragment: 'getMaxThawingPeriod', values?: undefined): string
  encodeFunctionData(functionFragment: 'getProviderTokensAvailable', values: [AddressLike, AddressLike]): string
  encodeFunctionData(functionFragment: 'getProvision', values: [AddressLike, AddressLike]): string
  encodeFunctionData(functionFragment: 'getServiceProvider', values: [AddressLike]): string
  encodeFunctionData(functionFragment: 'getStake', values: [AddressLike]): string
  encodeFunctionData(functionFragment: 'getThawRequest', values: [BigNumberish, BytesLike]): string
  encodeFunctionData(
    functionFragment: 'getThawRequestList',
    values: [BigNumberish, AddressLike, AddressLike, AddressLike],
  ): string
  encodeFunctionData(
    functionFragment: 'getThawedTokens',
    values: [BigNumberish, AddressLike, AddressLike, AddressLike],
  ): string
  encodeFunctionData(functionFragment: 'getTokensAvailable', values: [AddressLike, AddressLike, BigNumberish]): string
  encodeFunctionData(functionFragment: 'isAllowedLockedVerifier', values: [AddressLike]): string
  encodeFunctionData(functionFragment: 'isDelegationSlashingEnabled', values?: undefined): string
  encodeFunctionData(functionFragment: 'multicall', values: [BytesLike[]]): string

  decodeFunctionResult(functionFragment: 'acceptProxy', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'acceptProxyAndCall', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getDelegatedTokensAvailable', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getDelegation', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getDelegationFeeCut', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getDelegationPool', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getIdleStake', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getMaxThawingPeriod', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getProviderTokensAvailable', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getProvision', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getServiceProvider', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getStake', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getThawRequest', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getThawRequestList', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getThawedTokens', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'getTokensAvailable', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'isAllowedLockedVerifier', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'isDelegationSlashingEnabled', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'multicall', data: BytesLike): Result
}

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 HorizonStakeDepositedEvent {
  export type InputTuple = [serviceProvider: AddressLike, tokens: BigNumberish]
  export type OutputTuple = [serviceProvider: string, tokens: bigint]
  export interface OutputObject {
    serviceProvider: string
    tokens: 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 HorizonStakingBase extends BaseContract {
  connect(runner?: ContractRunner | null): HorizonStakingBase
  waitForDeployment(): Promise<this>

  interface: HorizonStakingBaseInterface

  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>

  acceptProxy: TypedContractMethod<[_proxy: AddressLike], [void], 'nonpayable'>

  acceptProxyAndCall: TypedContractMethod<[_proxy: AddressLike, _data: BytesLike], [void], 'nonpayable'>

  getDelegatedTokensAvailable: TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike],
    [bigint],
    'view'
  >

  getDelegation: TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike, delegator: AddressLike],
    [IHorizonStakingTypes.DelegationStructOutput],
    'view'
  >

  getDelegationFeeCut: TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike, paymentType: BigNumberish],
    [bigint],
    'view'
  >

  getDelegationPool: TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike],
    [IHorizonStakingTypes.DelegationPoolStructOutput],
    'view'
  >

  getIdleStake: TypedContractMethod<[serviceProvider: AddressLike], [bigint], 'view'>

  getMaxThawingPeriod: TypedContractMethod<[], [bigint], 'view'>

  getProviderTokensAvailable: TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike],
    [bigint],
    'view'
  >

  getProvision: TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike],
    [IHorizonStakingTypes.ProvisionStructOutput],
    'view'
  >

  getServiceProvider: TypedContractMethod<
    [serviceProvider: AddressLike],
    [IHorizonStakingTypes.ServiceProviderStructOutput],
    'view'
  >

  getStake: TypedContractMethod<[serviceProvider: AddressLike], [bigint], 'view'>

  getThawRequest: TypedContractMethod<
    [requestType: BigNumberish, thawRequestId: BytesLike],
    [IHorizonStakingTypes.ThawRequestStructOutput],
    'view'
  >

  getThawRequestList: TypedContractMethod<
    [requestType: BigNumberish, serviceProvider: AddressLike, verifier: AddressLike, owner: AddressLike],
    [ILinkedList.ListStructOutput],
    'view'
  >

  getThawedTokens: TypedContractMethod<
    [requestType: BigNumberish, serviceProvider: AddressLike, verifier: AddressLike, owner: AddressLike],
    [bigint],
    'view'
  >

  getTokensAvailable: TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike, delegationRatio: BigNumberish],
    [bigint],
    'view'
  >

  isAllowedLockedVerifier: TypedContractMethod<[verifier: AddressLike], [boolean], 'view'>

  isDelegationSlashingEnabled: TypedContractMethod<[], [boolean], 'view'>

  multicall: TypedContractMethod<[data: BytesLike[]], [string[]], 'nonpayable'>

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

  getFunction(nameOrSignature: 'acceptProxy'): TypedContractMethod<[_proxy: AddressLike], [void], 'nonpayable'>
  getFunction(
    nameOrSignature: 'acceptProxyAndCall',
  ): TypedContractMethod<[_proxy: AddressLike, _data: BytesLike], [void], 'nonpayable'>
  getFunction(
    nameOrSignature: 'getDelegatedTokensAvailable',
  ): TypedContractMethod<[serviceProvider: AddressLike, verifier: AddressLike], [bigint], 'view'>
  getFunction(
    nameOrSignature: 'getDelegation',
  ): TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike, delegator: AddressLike],
    [IHorizonStakingTypes.DelegationStructOutput],
    'view'
  >
  getFunction(
    nameOrSignature: 'getDelegationFeeCut',
  ): TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike, paymentType: BigNumberish],
    [bigint],
    'view'
  >
  getFunction(
    nameOrSignature: 'getDelegationPool',
  ): TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike],
    [IHorizonStakingTypes.DelegationPoolStructOutput],
    'view'
  >
  getFunction(nameOrSignature: 'getIdleStake'): TypedContractMethod<[serviceProvider: AddressLike], [bigint], 'view'>
  getFunction(nameOrSignature: 'getMaxThawingPeriod'): TypedContractMethod<[], [bigint], 'view'>
  getFunction(
    nameOrSignature: 'getProviderTokensAvailable',
  ): TypedContractMethod<[serviceProvider: AddressLike, verifier: AddressLike], [bigint], 'view'>
  getFunction(
    nameOrSignature: 'getProvision',
  ): TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike],
    [IHorizonStakingTypes.ProvisionStructOutput],
    'view'
  >
  getFunction(
    nameOrSignature: 'getServiceProvider',
  ): TypedContractMethod<[serviceProvider: AddressLike], [IHorizonStakingTypes.ServiceProviderStructOutput], 'view'>
  getFunction(nameOrSignature: 'getStake'): TypedContractMethod<[serviceProvider: AddressLike], [bigint], 'view'>
  getFunction(
    nameOrSignature: 'getThawRequest',
  ): TypedContractMethod<
    [requestType: BigNumberish, thawRequestId: BytesLike],
    [IHorizonStakingTypes.ThawRequestStructOutput],
    'view'
  >
  getFunction(
    nameOrSignature: 'getThawRequestList',
  ): TypedContractMethod<
    [requestType: BigNumberish, serviceProvider: AddressLike, verifier: AddressLike, owner: AddressLike],
    [ILinkedList.ListStructOutput],
    'view'
  >
  getFunction(
    nameOrSignature: 'getThawedTokens',
  ): TypedContractMethod<
    [requestType: BigNumberish, serviceProvider: AddressLike, verifier: AddressLike, owner: AddressLike],
    [bigint],
    'view'
  >
  getFunction(
    nameOrSignature: 'getTokensAvailable',
  ): TypedContractMethod<
    [serviceProvider: AddressLike, verifier: AddressLike, delegationRatio: BigNumberish],
    [bigint],
    'view'
  >
  getFunction(
    nameOrSignature: 'isAllowedLockedVerifier',
  ): TypedContractMethod<[verifier: AddressLike], [boolean], 'view'>
  getFunction(nameOrSignature: 'isDelegationSlashingEnabled'): TypedContractMethod<[], [boolean], 'view'>
  getFunction(nameOrSignature: 'multicall'): TypedContractMethod<[data: BytesLike[]], [string[]], 'nonpayable'>

  getEvent(
    key: 'GraphDirectoryInitialized',
  ): TypedContractEvent<
    GraphDirectoryInitializedEvent.InputTuple,
    GraphDirectoryInitializedEvent.OutputTuple,
    GraphDirectoryInitializedEvent.OutputObject
  >
  getEvent(
    key: 'HorizonStakeDeposited',
  ): TypedContractEvent<
    HorizonStakeDepositedEvent.InputTuple,
    HorizonStakeDepositedEvent.OutputTuple,
    HorizonStakeDepositedEvent.OutputObject
  >

  filters: {
    '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
    >

    'HorizonStakeDeposited(address,uint256)': TypedContractEvent<
      HorizonStakeDepositedEvent.InputTuple,
      HorizonStakeDepositedEvent.OutputTuple,
      HorizonStakeDepositedEvent.OutputObject
    >
    HorizonStakeDeposited: TypedContractEvent<
      HorizonStakeDepositedEvent.InputTuple,
      HorizonStakeDepositedEvent.OutputTuple,
      HorizonStakeDepositedEvent.OutputObject
    >
  }
}
