/* 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 GraphPaymentsInterface extends Interface {
  getFunction(nameOrSignature: 'PROTOCOL_PAYMENT_CUT' | 'collect' | 'initialize' | 'multicall'): FunctionFragment

  getEvent(nameOrSignatureOrTopic: 'GraphDirectoryInitialized' | 'GraphPaymentCollected' | 'Initialized'): EventFragment

  encodeFunctionData(functionFragment: 'PROTOCOL_PAYMENT_CUT', values?: undefined): string
  encodeFunctionData(
    functionFragment: 'collect',
    values: [BigNumberish, AddressLike, BigNumberish, AddressLike, BigNumberish, AddressLike],
  ): string
  encodeFunctionData(functionFragment: 'initialize', values?: undefined): string
  encodeFunctionData(functionFragment: 'multicall', values: [BytesLike[]]): string

  decodeFunctionResult(functionFragment: 'PROTOCOL_PAYMENT_CUT', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'collect', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'initialize', 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 GraphPaymentCollectedEvent {
  export type InputTuple = [
    paymentType: BigNumberish,
    payer: AddressLike,
    receiver: AddressLike,
    dataService: AddressLike,
    tokens: BigNumberish,
    tokensProtocol: BigNumberish,
    tokensDataService: BigNumberish,
    tokensDelegationPool: BigNumberish,
    tokensReceiver: BigNumberish,
    receiverDestination: AddressLike,
  ]
  export type OutputTuple = [
    paymentType: bigint,
    payer: string,
    receiver: string,
    dataService: string,
    tokens: bigint,
    tokensProtocol: bigint,
    tokensDataService: bigint,
    tokensDelegationPool: bigint,
    tokensReceiver: bigint,
    receiverDestination: string,
  ]
  export interface OutputObject {
    paymentType: bigint
    payer: string
    receiver: string
    dataService: string
    tokens: bigint
    tokensProtocol: bigint
    tokensDataService: bigint
    tokensDelegationPool: bigint
    tokensReceiver: bigint
    receiverDestination: 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 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 interface GraphPayments extends BaseContract {
  connect(runner?: ContractRunner | null): GraphPayments
  waitForDeployment(): Promise<this>

  interface: GraphPaymentsInterface

  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>

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

  collect: TypedContractMethod<
    [
      paymentType: BigNumberish,
      receiver: AddressLike,
      tokens: BigNumberish,
      dataService: AddressLike,
      dataServiceCut: BigNumberish,
      receiverDestination: AddressLike,
    ],
    [void],
    'nonpayable'
  >

  initialize: TypedContractMethod<[], [void], 'nonpayable'>

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

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

  getFunction(nameOrSignature: 'PROTOCOL_PAYMENT_CUT'): TypedContractMethod<[], [bigint], 'view'>
  getFunction(
    nameOrSignature: 'collect',
  ): TypedContractMethod<
    [
      paymentType: BigNumberish,
      receiver: AddressLike,
      tokens: BigNumberish,
      dataService: AddressLike,
      dataServiceCut: BigNumberish,
      receiverDestination: AddressLike,
    ],
    [void],
    'nonpayable'
  >
  getFunction(nameOrSignature: 'initialize'): TypedContractMethod<[], [void], 'nonpayable'>
  getFunction(nameOrSignature: 'multicall'): TypedContractMethod<[data: BytesLike[]], [string[]], 'nonpayable'>

  getEvent(
    key: 'GraphDirectoryInitialized',
  ): TypedContractEvent<
    GraphDirectoryInitializedEvent.InputTuple,
    GraphDirectoryInitializedEvent.OutputTuple,
    GraphDirectoryInitializedEvent.OutputObject
  >
  getEvent(
    key: 'GraphPaymentCollected',
  ): TypedContractEvent<
    GraphPaymentCollectedEvent.InputTuple,
    GraphPaymentCollectedEvent.OutputTuple,
    GraphPaymentCollectedEvent.OutputObject
  >
  getEvent(
    key: 'Initialized',
  ): TypedContractEvent<InitializedEvent.InputTuple, InitializedEvent.OutputTuple, InitializedEvent.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
    >

    'GraphPaymentCollected(uint8,address,address,address,uint256,uint256,uint256,uint256,uint256,address)': TypedContractEvent<
      GraphPaymentCollectedEvent.InputTuple,
      GraphPaymentCollectedEvent.OutputTuple,
      GraphPaymentCollectedEvent.OutputObject
    >
    GraphPaymentCollected: TypedContractEvent<
      GraphPaymentCollectedEvent.InputTuple,
      GraphPaymentCollectedEvent.OutputTuple,
      GraphPaymentCollectedEvent.OutputObject
    >

    'Initialized(uint64)': TypedContractEvent<
      InitializedEvent.InputTuple,
      InitializedEvent.OutputTuple,
      InitializedEvent.OutputObject
    >
    Initialized: TypedContractEvent<
      InitializedEvent.InputTuple,
      InitializedEvent.OutputTuple,
      InitializedEvent.OutputObject
    >
  }
}
