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

export interface IGovernedInterface extends Interface {
  getFunction(
    nameOrSignature: 'acceptOwnership' | 'governor' | 'pendingGovernor' | 'transferOwnership',
  ): FunctionFragment

  getEvent(nameOrSignatureOrTopic: 'NewOwnership' | 'NewPendingOwnership'): EventFragment

  encodeFunctionData(functionFragment: 'acceptOwnership', values?: undefined): string
  encodeFunctionData(functionFragment: 'governor', values?: undefined): string
  encodeFunctionData(functionFragment: 'pendingGovernor', values?: undefined): string
  encodeFunctionData(functionFragment: 'transferOwnership', values: [AddressLike]): string

  decodeFunctionResult(functionFragment: 'acceptOwnership', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'governor', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'pendingGovernor', data: BytesLike): Result
  decodeFunctionResult(functionFragment: 'transferOwnership', data: BytesLike): Result
}

export namespace NewOwnershipEvent {
  export type InputTuple = [from: AddressLike, to: AddressLike]
  export type OutputTuple = [from: string, to: string]
  export interface OutputObject {
    from: string
    to: 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 NewPendingOwnershipEvent {
  export type InputTuple = [from: AddressLike, to: AddressLike]
  export type OutputTuple = [from: string, to: string]
  export interface OutputObject {
    from: string
    to: string
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>
  export type Filter = TypedDeferredTopicFilter<Event>
  export type Log = TypedEventLog<Event>
  export type LogDescription = TypedLogDescription<Event>
}

export interface IGoverned extends BaseContract {
  connect(runner?: ContractRunner | null): IGoverned
  waitForDeployment(): Promise<this>

  interface: IGovernedInterface

  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>

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

  governor: TypedContractMethod<[], [string], 'view'>

  pendingGovernor: TypedContractMethod<[], [string], 'view'>

  transferOwnership: TypedContractMethod<[newGovernor: AddressLike], [void], 'nonpayable'>

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

  getFunction(nameOrSignature: 'acceptOwnership'): TypedContractMethod<[], [void], 'nonpayable'>
  getFunction(nameOrSignature: 'governor'): TypedContractMethod<[], [string], 'view'>
  getFunction(nameOrSignature: 'pendingGovernor'): TypedContractMethod<[], [string], 'view'>
  getFunction(
    nameOrSignature: 'transferOwnership',
  ): TypedContractMethod<[newGovernor: AddressLike], [void], 'nonpayable'>

  getEvent(
    key: 'NewOwnership',
  ): TypedContractEvent<NewOwnershipEvent.InputTuple, NewOwnershipEvent.OutputTuple, NewOwnershipEvent.OutputObject>
  getEvent(
    key: 'NewPendingOwnership',
  ): TypedContractEvent<
    NewPendingOwnershipEvent.InputTuple,
    NewPendingOwnershipEvent.OutputTuple,
    NewPendingOwnershipEvent.OutputObject
  >

  filters: {
    'NewOwnership(address,address)': TypedContractEvent<
      NewOwnershipEvent.InputTuple,
      NewOwnershipEvent.OutputTuple,
      NewOwnershipEvent.OutputObject
    >
    NewOwnership: TypedContractEvent<
      NewOwnershipEvent.InputTuple,
      NewOwnershipEvent.OutputTuple,
      NewOwnershipEvent.OutputObject
    >

    'NewPendingOwnership(address,address)': TypedContractEvent<
      NewPendingOwnershipEvent.InputTuple,
      NewPendingOwnershipEvent.OutputTuple,
      NewPendingOwnershipEvent.OutputObject
    >
    NewPendingOwnership: TypedContractEvent<
      NewPendingOwnershipEvent.InputTuple,
      NewPendingOwnershipEvent.OutputTuple,
      NewPendingOwnershipEvent.OutputObject
    >
  }
}
