/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  BaseContract,
  ContractTransaction,
  Overrides,
  CallOverrides,
} from "ethers";
import { BytesLike } from "@ethersproject/bytes";
import { Listener, Provider } from "@ethersproject/providers";
import { FunctionFragment, EventFragment, Result } from "@ethersproject/abi";
import { TypedEventFilter, TypedEvent, TypedListener } from "./commons";

interface GraphGovernanceInterface extends ethers.utils.Interface {
  functions: {
    "acceptOwnership()": FunctionFragment;
    "acceptProxy(address)": FunctionFragment;
    "acceptProxyAndCall(address,bytes)": FunctionFragment;
    "createProposal(bytes32,bytes32,bytes32,uint8)": FunctionFragment;
    "governor()": FunctionFragment;
    "initialize(address)": FunctionFragment;
    "isProposalCreated(bytes32)": FunctionFragment;
    "pendingGovernor()": FunctionFragment;
    "proposals(bytes32)": FunctionFragment;
    "transferOwnership(address)": FunctionFragment;
    "updateProposal(bytes32,bytes32,bytes32,uint8)": FunctionFragment;
  };

  encodeFunctionData(
    functionFragment: "acceptOwnership",
    values?: undefined
  ): string;
  encodeFunctionData(functionFragment: "acceptProxy", values: [string]): string;
  encodeFunctionData(
    functionFragment: "acceptProxyAndCall",
    values: [string, BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "createProposal",
    values: [BytesLike, BytesLike, BytesLike, BigNumberish]
  ): string;
  encodeFunctionData(functionFragment: "governor", values?: undefined): string;
  encodeFunctionData(functionFragment: "initialize", values: [string]): string;
  encodeFunctionData(
    functionFragment: "isProposalCreated",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "pendingGovernor",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "proposals",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "transferOwnership",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "updateProposal",
    values: [BytesLike, BytesLike, BytesLike, BigNumberish]
  ): string;

  decodeFunctionResult(
    functionFragment: "acceptOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "acceptProxy",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "acceptProxyAndCall",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "createProposal",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "governor", data: BytesLike): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "isProposalCreated",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "pendingGovernor",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "proposals", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "transferOwnership",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "updateProposal",
    data: BytesLike
  ): Result;

  events: {
    "NewOwnership(address,address)": EventFragment;
    "NewPendingOwnership(address,address)": EventFragment;
    "ProposalCreated(bytes32,bytes32,bytes32,uint8)": EventFragment;
    "ProposalUpdated(bytes32,bytes32,bytes32,uint8)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "NewOwnership"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "NewPendingOwnership"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ProposalCreated"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ProposalUpdated"): EventFragment;
}

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

  listeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter?: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): Array<TypedListener<EventArgsArray, EventArgsObject>>;
  off<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  on<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  once<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeListener<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>,
    listener: TypedListener<EventArgsArray, EventArgsObject>
  ): this;
  removeAllListeners<EventArgsArray extends Array<any>, EventArgsObject>(
    eventFilter: TypedEventFilter<EventArgsArray, EventArgsObject>
  ): this;

  listeners(eventName?: string): Array<Listener>;
  off(eventName: string, listener: Listener): this;
  on(eventName: string, listener: Listener): this;
  once(eventName: string, listener: Listener): this;
  removeListener(eventName: string, listener: Listener): this;
  removeAllListeners(eventName?: string): this;

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

  interface: GraphGovernanceInterface;

  functions: {
    acceptOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    acceptProxy(
      _proxy: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    acceptProxyAndCall(
      _proxy: string,
      _data: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    createProposal(
      _proposalId: BytesLike,
      _votes: BytesLike,
      _metadata: BytesLike,
      _resolution: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    governor(overrides?: CallOverrides): Promise<[string]>;

    initialize(
      _governor: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    isProposalCreated(
      _proposalId: BytesLike,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    pendingGovernor(overrides?: CallOverrides): Promise<[string]>;

    proposals(
      arg0: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string, string, number] & {
        votes: string;
        metadata: string;
        resolution: number;
      }
    >;

    transferOwnership(
      _newGovernor: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    updateProposal(
      _proposalId: BytesLike,
      _votes: BytesLike,
      _metadata: BytesLike,
      _resolution: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;
  };

  acceptOwnership(
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  acceptProxy(
    _proxy: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  acceptProxyAndCall(
    _proxy: string,
    _data: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  createProposal(
    _proposalId: BytesLike,
    _votes: BytesLike,
    _metadata: BytesLike,
    _resolution: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  governor(overrides?: CallOverrides): Promise<string>;

  initialize(
    _governor: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  isProposalCreated(
    _proposalId: BytesLike,
    overrides?: CallOverrides
  ): Promise<boolean>;

  pendingGovernor(overrides?: CallOverrides): Promise<string>;

  proposals(
    arg0: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [string, string, number] & {
      votes: string;
      metadata: string;
      resolution: number;
    }
  >;

  transferOwnership(
    _newGovernor: string,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  updateProposal(
    _proposalId: BytesLike,
    _votes: BytesLike,
    _metadata: BytesLike,
    _resolution: BigNumberish,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  callStatic: {
    acceptOwnership(overrides?: CallOverrides): Promise<void>;

    acceptProxy(_proxy: string, overrides?: CallOverrides): Promise<void>;

    acceptProxyAndCall(
      _proxy: string,
      _data: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    createProposal(
      _proposalId: BytesLike,
      _votes: BytesLike,
      _metadata: BytesLike,
      _resolution: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    governor(overrides?: CallOverrides): Promise<string>;

    initialize(_governor: string, overrides?: CallOverrides): Promise<void>;

    isProposalCreated(
      _proposalId: BytesLike,
      overrides?: CallOverrides
    ): Promise<boolean>;

    pendingGovernor(overrides?: CallOverrides): Promise<string>;

    proposals(
      arg0: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string, string, number] & {
        votes: string;
        metadata: string;
        resolution: number;
      }
    >;

    transferOwnership(
      _newGovernor: string,
      overrides?: CallOverrides
    ): Promise<void>;

    updateProposal(
      _proposalId: BytesLike,
      _votes: BytesLike,
      _metadata: BytesLike,
      _resolution: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;
  };

  filters: {
    NewOwnership(
      from?: string | null,
      to?: string | null
    ): TypedEventFilter<[string, string], { from: string; to: string }>;

    NewPendingOwnership(
      from?: string | null,
      to?: string | null
    ): TypedEventFilter<[string, string], { from: string; to: string }>;

    ProposalCreated(
      proposalId?: BytesLike | null,
      votes?: null,
      metadata?: null,
      resolution?: null
    ): TypedEventFilter<
      [string, string, string, number],
      {
        proposalId: string;
        votes: string;
        metadata: string;
        resolution: number;
      }
    >;

    ProposalUpdated(
      proposalId?: BytesLike | null,
      votes?: null,
      metadata?: null,
      resolution?: null
    ): TypedEventFilter<
      [string, string, string, number],
      {
        proposalId: string;
        votes: string;
        metadata: string;
        resolution: number;
      }
    >;
  };

  estimateGas: {
    acceptOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    acceptProxy(
      _proxy: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    acceptProxyAndCall(
      _proxy: string,
      _data: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    createProposal(
      _proposalId: BytesLike,
      _votes: BytesLike,
      _metadata: BytesLike,
      _resolution: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    governor(overrides?: CallOverrides): Promise<BigNumber>;

    initialize(
      _governor: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    isProposalCreated(
      _proposalId: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    pendingGovernor(overrides?: CallOverrides): Promise<BigNumber>;

    proposals(arg0: BytesLike, overrides?: CallOverrides): Promise<BigNumber>;

    transferOwnership(
      _newGovernor: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    updateProposal(
      _proposalId: BytesLike,
      _votes: BytesLike,
      _metadata: BytesLike,
      _resolution: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    acceptOwnership(
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    acceptProxy(
      _proxy: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    acceptProxyAndCall(
      _proxy: string,
      _data: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    createProposal(
      _proposalId: BytesLike,
      _votes: BytesLike,
      _metadata: BytesLike,
      _resolution: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    governor(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    initialize(
      _governor: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    isProposalCreated(
      _proposalId: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    pendingGovernor(overrides?: CallOverrides): Promise<PopulatedTransaction>;

    proposals(
      arg0: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    transferOwnership(
      _newGovernor: string,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    updateProposal(
      _proposalId: BytesLike,
      _votes: BytesLike,
      _metadata: BytesLike,
      _resolution: BigNumberish,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;
  };
}
