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

import {
  ethers,
  EventFilter,
  Signer,
  BigNumber,
  BigNumberish,
  PopulatedTransaction,
  BaseContract,
  ContractTransaction,
  Overrides,
  PayableOverrides,
  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 MockImplementationInterface extends ethers.utils.Interface {
  functions: {
    "chainId()": FunctionFragment;
    "getCurrentGuardianSetIndex()": FunctionFragment;
    "getGuardianSet(uint32)": FunctionFragment;
    "getGuardianSetExpiry()": FunctionFragment;
    "governanceActionIsConsumed(bytes32)": FunctionFragment;
    "governanceChainId()": FunctionFragment;
    "governanceContract()": FunctionFragment;
    "initialize()": FunctionFragment;
    "isInitialized(address)": FunctionFragment;
    "messageFee()": FunctionFragment;
    "nextSequence(address,uint16)": FunctionFragment;
    "parseAndVerifyVM(bytes)": FunctionFragment;
    "parseContractUpgrade(bytes)": FunctionFragment;
    "parseGuardianSetUpgrade(bytes)": FunctionFragment;
    "parseSetMessageFee(bytes)": FunctionFragment;
    "parseTransferFees(bytes)": FunctionFragment;
    "parseVM(bytes)": FunctionFragment;
    "publishMessage(uint16,uint32,bytes,uint8)": FunctionFragment;
    "quorum(uint256)": FunctionFragment;
    "submitContractUpgrade(bytes)": FunctionFragment;
    "submitNewGuardianSet(bytes)": FunctionFragment;
    "submitSetMessageFee(bytes)": FunctionFragment;
    "submitTransferFees(bytes)": FunctionFragment;
    "verifySignatures(bytes32,tuple[],tuple)": FunctionFragment;
    "verifyVM(tuple)": FunctionFragment;
    "testNewImplementationActive()": FunctionFragment;
  };

  encodeFunctionData(functionFragment: "chainId", values?: undefined): string;
  encodeFunctionData(
    functionFragment: "getCurrentGuardianSetIndex",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "getGuardianSet",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "getGuardianSetExpiry",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "governanceActionIsConsumed",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "governanceChainId",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "governanceContract",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "initialize",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "isInitialized",
    values: [string]
  ): string;
  encodeFunctionData(
    functionFragment: "messageFee",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "nextSequence",
    values: [string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "parseAndVerifyVM",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "parseContractUpgrade",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "parseGuardianSetUpgrade",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "parseSetMessageFee",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "parseTransferFees",
    values: [BytesLike]
  ): string;
  encodeFunctionData(functionFragment: "parseVM", values: [BytesLike]): string;
  encodeFunctionData(
    functionFragment: "publishMessage",
    values: [BigNumberish, BigNumberish, BytesLike, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "quorum",
    values: [BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "submitContractUpgrade",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "submitNewGuardianSet",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "submitSetMessageFee",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "submitTransferFees",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "verifySignatures",
    values: [
      BytesLike,
      {
        r: BytesLike;
        s: BytesLike;
        v: BigNumberish;
        guardianIndex: BigNumberish;
      }[],
      { keys: string[]; expirationTime: BigNumberish }
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "verifyVM",
    values: [
      {
        version: BigNumberish;
        timestamp: BigNumberish;
        nonce: BigNumberish;
        emitterChainId: BigNumberish;
        targetChainId: BigNumberish;
        emitterAddress: BytesLike;
        sequence: BigNumberish;
        consistencyLevel: BigNumberish;
        payload: BytesLike;
        guardianSetIndex: BigNumberish;
        signatures: {
          r: BytesLike;
          s: BytesLike;
          v: BigNumberish;
          guardianIndex: BigNumberish;
        }[];
        hash: BytesLike;
      }
    ]
  ): string;
  encodeFunctionData(
    functionFragment: "testNewImplementationActive",
    values?: undefined
  ): string;

  decodeFunctionResult(functionFragment: "chainId", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "getCurrentGuardianSetIndex",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getGuardianSet",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "getGuardianSetExpiry",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "governanceActionIsConsumed",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "governanceChainId",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "governanceContract",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "isInitialized",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "messageFee", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "nextSequence",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "parseAndVerifyVM",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "parseContractUpgrade",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "parseGuardianSetUpgrade",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "parseSetMessageFee",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "parseTransferFees",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "parseVM", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "publishMessage",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "quorum", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "submitContractUpgrade",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "submitNewGuardianSet",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "submitSetMessageFee",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "submitTransferFees",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "verifySignatures",
    data: BytesLike
  ): Result;
  decodeFunctionResult(functionFragment: "verifyVM", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "testNewImplementationActive",
    data: BytesLike
  ): Result;

  events: {
    "AdminChanged(address,address)": EventFragment;
    "BeaconUpgraded(address)": EventFragment;
    "ContractUpgraded(address,address)": EventFragment;
    "GuardianSetAdded(uint32)": EventFragment;
    "LogMessagePublished(address,uint16,uint64,uint32,bytes,uint8)": EventFragment;
    "Upgraded(address)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "AdminChanged"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "BeaconUpgraded"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "ContractUpgraded"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "GuardianSetAdded"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "LogMessagePublished"): EventFragment;
  getEvent(nameOrSignatureOrTopic: "Upgraded"): EventFragment;
}

export class MockImplementation 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: MockImplementationInterface;

  functions: {
    chainId(overrides?: CallOverrides): Promise<[number]>;

    getCurrentGuardianSetIndex(overrides?: CallOverrides): Promise<[number]>;

    getGuardianSet(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<
      [[string[], number] & { keys: string[]; expirationTime: number }]
    >;

    getGuardianSetExpiry(overrides?: CallOverrides): Promise<[number]>;

    governanceActionIsConsumed(
      hash: BytesLike,
      overrides?: CallOverrides
    ): Promise<[boolean]>;

    governanceChainId(overrides?: CallOverrides): Promise<[number]>;

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

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

    isInitialized(impl: string, overrides?: CallOverrides): Promise<[boolean]>;

    messageFee(overrides?: CallOverrides): Promise<[BigNumber]>;

    nextSequence(
      emitter: string,
      targetChainId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber]>;

    /**
     * parseAndVerifyVM serves to parse an encodedVM and wholy validate it for consumption
     */
    parseAndVerifyVM(
      encodedVM: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        [
          number,
          number,
          number,
          number,
          number,
          string,
          BigNumber,
          number,
          string,
          number,
          ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[],
          string
        ] & {
          version: number;
          timestamp: number;
          nonce: number;
          emitterChainId: number;
          targetChainId: number;
          emitterAddress: string;
          sequence: BigNumber;
          consistencyLevel: number;
          payload: string;
          guardianSetIndex: number;
          signatures: ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[];
          hash: string;
        },
        boolean,
        string
      ] & {
        vm: [
          number,
          number,
          number,
          number,
          number,
          string,
          BigNumber,
          number,
          string,
          number,
          ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[],
          string
        ] & {
          version: number;
          timestamp: number;
          nonce: number;
          emitterChainId: number;
          targetChainId: number;
          emitterAddress: string;
          sequence: BigNumber;
          consistencyLevel: number;
          payload: string;
          guardianSetIndex: number;
          signatures: ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[];
          hash: string;
        };
        valid: boolean;
        reason: string;
      }
    >;

    parseContractUpgrade(
      encodedUpgrade: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        [string, number, string] & {
          module: string;
          action: number;
          newContract: string;
        }
      ] & {
        cu: [string, number, string] & {
          module: string;
          action: number;
          newContract: string;
        };
      }
    >;

    parseGuardianSetUpgrade(
      encodedUpgrade: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        [
          string,
          number,
          [string[], number] & { keys: string[]; expirationTime: number },
          number
        ] & {
          module: string;
          action: number;
          newGuardianSet: [string[], number] & {
            keys: string[];
            expirationTime: number;
          };
          newGuardianSetIndex: number;
        }
      ] & {
        gsu: [
          string,
          number,
          [string[], number] & { keys: string[]; expirationTime: number },
          number
        ] & {
          module: string;
          action: number;
          newGuardianSet: [string[], number] & {
            keys: string[];
            expirationTime: number;
          };
          newGuardianSetIndex: number;
        };
      }
    >;

    parseSetMessageFee(
      encodedSetMessageFee: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        [string, number, BigNumber] & {
          module: string;
          action: number;
          messageFee: BigNumber;
        }
      ] & {
        smf: [string, number, BigNumber] & {
          module: string;
          action: number;
          messageFee: BigNumber;
        };
      }
    >;

    parseTransferFees(
      encodedTransferFees: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        [string, number, BigNumber, string] & {
          module: string;
          action: number;
          amount: BigNumber;
          recipient: string;
        }
      ] & {
        tf: [string, number, BigNumber, string] & {
          module: string;
          action: number;
          amount: BigNumber;
          recipient: string;
        };
      }
    >;

    /**
     * parseVM serves to parse an encodedVM into a vm struct  - it intentionally performs no validation functions, it simply parses raw into a struct
     */
    parseVM(
      encodedVM: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        [
          number,
          number,
          number,
          number,
          number,
          string,
          BigNumber,
          number,
          string,
          number,
          ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[],
          string
        ] & {
          version: number;
          timestamp: number;
          nonce: number;
          emitterChainId: number;
          targetChainId: number;
          emitterAddress: string;
          sequence: BigNumber;
          consistencyLevel: number;
          payload: string;
          guardianSetIndex: number;
          signatures: ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[];
          hash: string;
        }
      ] & {
        vm: [
          number,
          number,
          number,
          number,
          number,
          string,
          BigNumber,
          number,
          string,
          number,
          ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[],
          string
        ] & {
          version: number;
          timestamp: number;
          nonce: number;
          emitterChainId: number;
          targetChainId: number;
          emitterAddress: string;
          sequence: BigNumber;
          consistencyLevel: number;
          payload: string;
          guardianSetIndex: number;
          signatures: ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[];
          hash: string;
        };
      }
    >;

    publishMessage(
      targetChainId: BigNumberish,
      nonce: BigNumberish,
      payload: BytesLike,
      consistencyLevel: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    /**
     * quorum serves solely to determine the number of signatures required to acheive quorum
     */
    quorum(
      numGuardians: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[BigNumber] & { numSignaturesRequiredForQuorum: BigNumber }>;

    submitContractUpgrade(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    submitNewGuardianSet(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    submitSetMessageFee(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    submitTransferFees(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<ContractTransaction>;

    verifySignatures(
      hash: BytesLike,
      signatures: {
        r: BytesLike;
        s: BytesLike;
        v: BigNumberish;
        guardianIndex: BigNumberish;
      }[],
      guardianSet: { keys: string[]; expirationTime: BigNumberish },
      overrides?: CallOverrides
    ): Promise<[boolean, string] & { valid: boolean; reason: string }>;

    verifyVM(
      vm: {
        version: BigNumberish;
        timestamp: BigNumberish;
        nonce: BigNumberish;
        emitterChainId: BigNumberish;
        targetChainId: BigNumberish;
        emitterAddress: BytesLike;
        sequence: BigNumberish;
        consistencyLevel: BigNumberish;
        payload: BytesLike;
        guardianSetIndex: BigNumberish;
        signatures: {
          r: BytesLike;
          s: BytesLike;
          v: BigNumberish;
          guardianIndex: BigNumberish;
        }[];
        hash: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<[boolean, string] & { valid: boolean; reason: string }>;

    testNewImplementationActive(overrides?: CallOverrides): Promise<[boolean]>;
  };

  chainId(overrides?: CallOverrides): Promise<number>;

  getCurrentGuardianSetIndex(overrides?: CallOverrides): Promise<number>;

  getGuardianSet(
    index: BigNumberish,
    overrides?: CallOverrides
  ): Promise<[string[], number] & { keys: string[]; expirationTime: number }>;

  getGuardianSetExpiry(overrides?: CallOverrides): Promise<number>;

  governanceActionIsConsumed(
    hash: BytesLike,
    overrides?: CallOverrides
  ): Promise<boolean>;

  governanceChainId(overrides?: CallOverrides): Promise<number>;

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

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

  isInitialized(impl: string, overrides?: CallOverrides): Promise<boolean>;

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

  nextSequence(
    emitter: string,
    targetChainId: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  /**
   * parseAndVerifyVM serves to parse an encodedVM and wholy validate it for consumption
   */
  parseAndVerifyVM(
    encodedVM: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [
      [
        number,
        number,
        number,
        number,
        number,
        string,
        BigNumber,
        number,
        string,
        number,
        ([string, string, number, number] & {
          r: string;
          s: string;
          v: number;
          guardianIndex: number;
        })[],
        string
      ] & {
        version: number;
        timestamp: number;
        nonce: number;
        emitterChainId: number;
        targetChainId: number;
        emitterAddress: string;
        sequence: BigNumber;
        consistencyLevel: number;
        payload: string;
        guardianSetIndex: number;
        signatures: ([string, string, number, number] & {
          r: string;
          s: string;
          v: number;
          guardianIndex: number;
        })[];
        hash: string;
      },
      boolean,
      string
    ] & {
      vm: [
        number,
        number,
        number,
        number,
        number,
        string,
        BigNumber,
        number,
        string,
        number,
        ([string, string, number, number] & {
          r: string;
          s: string;
          v: number;
          guardianIndex: number;
        })[],
        string
      ] & {
        version: number;
        timestamp: number;
        nonce: number;
        emitterChainId: number;
        targetChainId: number;
        emitterAddress: string;
        sequence: BigNumber;
        consistencyLevel: number;
        payload: string;
        guardianSetIndex: number;
        signatures: ([string, string, number, number] & {
          r: string;
          s: string;
          v: number;
          guardianIndex: number;
        })[];
        hash: string;
      };
      valid: boolean;
      reason: string;
    }
  >;

  parseContractUpgrade(
    encodedUpgrade: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [string, number, string] & {
      module: string;
      action: number;
      newContract: string;
    }
  >;

  parseGuardianSetUpgrade(
    encodedUpgrade: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [
      string,
      number,
      [string[], number] & { keys: string[]; expirationTime: number },
      number
    ] & {
      module: string;
      action: number;
      newGuardianSet: [string[], number] & {
        keys: string[];
        expirationTime: number;
      };
      newGuardianSetIndex: number;
    }
  >;

  parseSetMessageFee(
    encodedSetMessageFee: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [string, number, BigNumber] & {
      module: string;
      action: number;
      messageFee: BigNumber;
    }
  >;

  parseTransferFees(
    encodedTransferFees: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [string, number, BigNumber, string] & {
      module: string;
      action: number;
      amount: BigNumber;
      recipient: string;
    }
  >;

  /**
   * parseVM serves to parse an encodedVM into a vm struct  - it intentionally performs no validation functions, it simply parses raw into a struct
   */
  parseVM(
    encodedVM: BytesLike,
    overrides?: CallOverrides
  ): Promise<
    [
      number,
      number,
      number,
      number,
      number,
      string,
      BigNumber,
      number,
      string,
      number,
      ([string, string, number, number] & {
        r: string;
        s: string;
        v: number;
        guardianIndex: number;
      })[],
      string
    ] & {
      version: number;
      timestamp: number;
      nonce: number;
      emitterChainId: number;
      targetChainId: number;
      emitterAddress: string;
      sequence: BigNumber;
      consistencyLevel: number;
      payload: string;
      guardianSetIndex: number;
      signatures: ([string, string, number, number] & {
        r: string;
        s: string;
        v: number;
        guardianIndex: number;
      })[];
      hash: string;
    }
  >;

  publishMessage(
    targetChainId: BigNumberish,
    nonce: BigNumberish,
    payload: BytesLike,
    consistencyLevel: BigNumberish,
    overrides?: PayableOverrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  /**
   * quorum serves solely to determine the number of signatures required to acheive quorum
   */
  quorum(
    numGuardians: BigNumberish,
    overrides?: CallOverrides
  ): Promise<BigNumber>;

  submitContractUpgrade(
    _vm: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  submitNewGuardianSet(
    _vm: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  submitSetMessageFee(
    _vm: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  submitTransferFees(
    _vm: BytesLike,
    overrides?: Overrides & { from?: string | Promise<string> }
  ): Promise<ContractTransaction>;

  verifySignatures(
    hash: BytesLike,
    signatures: {
      r: BytesLike;
      s: BytesLike;
      v: BigNumberish;
      guardianIndex: BigNumberish;
    }[],
    guardianSet: { keys: string[]; expirationTime: BigNumberish },
    overrides?: CallOverrides
  ): Promise<[boolean, string] & { valid: boolean; reason: string }>;

  verifyVM(
    vm: {
      version: BigNumberish;
      timestamp: BigNumberish;
      nonce: BigNumberish;
      emitterChainId: BigNumberish;
      targetChainId: BigNumberish;
      emitterAddress: BytesLike;
      sequence: BigNumberish;
      consistencyLevel: BigNumberish;
      payload: BytesLike;
      guardianSetIndex: BigNumberish;
      signatures: {
        r: BytesLike;
        s: BytesLike;
        v: BigNumberish;
        guardianIndex: BigNumberish;
      }[];
      hash: BytesLike;
    },
    overrides?: CallOverrides
  ): Promise<[boolean, string] & { valid: boolean; reason: string }>;

  testNewImplementationActive(overrides?: CallOverrides): Promise<boolean>;

  callStatic: {
    chainId(overrides?: CallOverrides): Promise<number>;

    getCurrentGuardianSetIndex(overrides?: CallOverrides): Promise<number>;

    getGuardianSet(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<[string[], number] & { keys: string[]; expirationTime: number }>;

    getGuardianSetExpiry(overrides?: CallOverrides): Promise<number>;

    governanceActionIsConsumed(
      hash: BytesLike,
      overrides?: CallOverrides
    ): Promise<boolean>;

    governanceChainId(overrides?: CallOverrides): Promise<number>;

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

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

    isInitialized(impl: string, overrides?: CallOverrides): Promise<boolean>;

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

    nextSequence(
      emitter: string,
      targetChainId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * parseAndVerifyVM serves to parse an encodedVM and wholy validate it for consumption
     */
    parseAndVerifyVM(
      encodedVM: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        [
          number,
          number,
          number,
          number,
          number,
          string,
          BigNumber,
          number,
          string,
          number,
          ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[],
          string
        ] & {
          version: number;
          timestamp: number;
          nonce: number;
          emitterChainId: number;
          targetChainId: number;
          emitterAddress: string;
          sequence: BigNumber;
          consistencyLevel: number;
          payload: string;
          guardianSetIndex: number;
          signatures: ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[];
          hash: string;
        },
        boolean,
        string
      ] & {
        vm: [
          number,
          number,
          number,
          number,
          number,
          string,
          BigNumber,
          number,
          string,
          number,
          ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[],
          string
        ] & {
          version: number;
          timestamp: number;
          nonce: number;
          emitterChainId: number;
          targetChainId: number;
          emitterAddress: string;
          sequence: BigNumber;
          consistencyLevel: number;
          payload: string;
          guardianSetIndex: number;
          signatures: ([string, string, number, number] & {
            r: string;
            s: string;
            v: number;
            guardianIndex: number;
          })[];
          hash: string;
        };
        valid: boolean;
        reason: string;
      }
    >;

    parseContractUpgrade(
      encodedUpgrade: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string, number, string] & {
        module: string;
        action: number;
        newContract: string;
      }
    >;

    parseGuardianSetUpgrade(
      encodedUpgrade: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        string,
        number,
        [string[], number] & { keys: string[]; expirationTime: number },
        number
      ] & {
        module: string;
        action: number;
        newGuardianSet: [string[], number] & {
          keys: string[];
          expirationTime: number;
        };
        newGuardianSetIndex: number;
      }
    >;

    parseSetMessageFee(
      encodedSetMessageFee: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string, number, BigNumber] & {
        module: string;
        action: number;
        messageFee: BigNumber;
      }
    >;

    parseTransferFees(
      encodedTransferFees: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [string, number, BigNumber, string] & {
        module: string;
        action: number;
        amount: BigNumber;
        recipient: string;
      }
    >;

    /**
     * parseVM serves to parse an encodedVM into a vm struct  - it intentionally performs no validation functions, it simply parses raw into a struct
     */
    parseVM(
      encodedVM: BytesLike,
      overrides?: CallOverrides
    ): Promise<
      [
        number,
        number,
        number,
        number,
        number,
        string,
        BigNumber,
        number,
        string,
        number,
        ([string, string, number, number] & {
          r: string;
          s: string;
          v: number;
          guardianIndex: number;
        })[],
        string
      ] & {
        version: number;
        timestamp: number;
        nonce: number;
        emitterChainId: number;
        targetChainId: number;
        emitterAddress: string;
        sequence: BigNumber;
        consistencyLevel: number;
        payload: string;
        guardianSetIndex: number;
        signatures: ([string, string, number, number] & {
          r: string;
          s: string;
          v: number;
          guardianIndex: number;
        })[];
        hash: string;
      }
    >;

    publishMessage(
      targetChainId: BigNumberish,
      nonce: BigNumberish,
      payload: BytesLike,
      consistencyLevel: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * quorum serves solely to determine the number of signatures required to acheive quorum
     */
    quorum(
      numGuardians: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    submitContractUpgrade(
      _vm: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    submitNewGuardianSet(
      _vm: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    submitSetMessageFee(
      _vm: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    submitTransferFees(
      _vm: BytesLike,
      overrides?: CallOverrides
    ): Promise<void>;

    verifySignatures(
      hash: BytesLike,
      signatures: {
        r: BytesLike;
        s: BytesLike;
        v: BigNumberish;
        guardianIndex: BigNumberish;
      }[],
      guardianSet: { keys: string[]; expirationTime: BigNumberish },
      overrides?: CallOverrides
    ): Promise<[boolean, string] & { valid: boolean; reason: string }>;

    verifyVM(
      vm: {
        version: BigNumberish;
        timestamp: BigNumberish;
        nonce: BigNumberish;
        emitterChainId: BigNumberish;
        targetChainId: BigNumberish;
        emitterAddress: BytesLike;
        sequence: BigNumberish;
        consistencyLevel: BigNumberish;
        payload: BytesLike;
        guardianSetIndex: BigNumberish;
        signatures: {
          r: BytesLike;
          s: BytesLike;
          v: BigNumberish;
          guardianIndex: BigNumberish;
        }[];
        hash: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<[boolean, string] & { valid: boolean; reason: string }>;

    testNewImplementationActive(overrides?: CallOverrides): Promise<boolean>;
  };

  filters: {
    AdminChanged(
      previousAdmin?: null,
      newAdmin?: null
    ): TypedEventFilter<
      [string, string],
      { previousAdmin: string; newAdmin: string }
    >;

    BeaconUpgraded(
      beacon?: string | null
    ): TypedEventFilter<[string], { beacon: string }>;

    ContractUpgraded(
      oldContract?: string | null,
      newContract?: string | null
    ): TypedEventFilter<
      [string, string],
      { oldContract: string; newContract: string }
    >;

    GuardianSetAdded(
      index?: BigNumberish | null
    ): TypedEventFilter<[number], { index: number }>;

    LogMessagePublished(
      sender?: string | null,
      targetChainId?: null,
      sequence?: null,
      nonce?: null,
      payload?: null,
      consistencyLevel?: null
    ): TypedEventFilter<
      [string, number, BigNumber, number, string, number],
      {
        sender: string;
        targetChainId: number;
        sequence: BigNumber;
        nonce: number;
        payload: string;
        consistencyLevel: number;
      }
    >;

    Upgraded(
      implementation?: string | null
    ): TypedEventFilter<[string], { implementation: string }>;
  };

  estimateGas: {
    chainId(overrides?: CallOverrides): Promise<BigNumber>;

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

    getGuardianSet(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

    governanceActionIsConsumed(
      hash: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

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

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

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

    isInitialized(impl: string, overrides?: CallOverrides): Promise<BigNumber>;

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

    nextSequence(
      emitter: string,
      targetChainId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * parseAndVerifyVM serves to parse an encodedVM and wholy validate it for consumption
     */
    parseAndVerifyVM(
      encodedVM: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    parseContractUpgrade(
      encodedUpgrade: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    parseGuardianSetUpgrade(
      encodedUpgrade: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    parseSetMessageFee(
      encodedSetMessageFee: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    parseTransferFees(
      encodedTransferFees: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    /**
     * parseVM serves to parse an encodedVM into a vm struct  - it intentionally performs no validation functions, it simply parses raw into a struct
     */
    parseVM(
      encodedVM: BytesLike,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    publishMessage(
      targetChainId: BigNumberish,
      nonce: BigNumberish,
      payload: BytesLike,
      consistencyLevel: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    /**
     * quorum serves solely to determine the number of signatures required to acheive quorum
     */
    quorum(
      numGuardians: BigNumberish,
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    submitContractUpgrade(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    submitNewGuardianSet(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    submitSetMessageFee(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    submitTransferFees(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<BigNumber>;

    verifySignatures(
      hash: BytesLike,
      signatures: {
        r: BytesLike;
        s: BytesLike;
        v: BigNumberish;
        guardianIndex: BigNumberish;
      }[],
      guardianSet: { keys: string[]; expirationTime: BigNumberish },
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    verifyVM(
      vm: {
        version: BigNumberish;
        timestamp: BigNumberish;
        nonce: BigNumberish;
        emitterChainId: BigNumberish;
        targetChainId: BigNumberish;
        emitterAddress: BytesLike;
        sequence: BigNumberish;
        consistencyLevel: BigNumberish;
        payload: BytesLike;
        guardianSetIndex: BigNumberish;
        signatures: {
          r: BytesLike;
          s: BytesLike;
          v: BigNumberish;
          guardianIndex: BigNumberish;
        }[];
        hash: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<BigNumber>;

    testNewImplementationActive(overrides?: CallOverrides): Promise<BigNumber>;
  };

  populateTransaction: {
    chainId(overrides?: CallOverrides): Promise<PopulatedTransaction>;

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

    getGuardianSet(
      index: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

    governanceActionIsConsumed(
      hash: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

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

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

    isInitialized(
      impl: string,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

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

    nextSequence(
      emitter: string,
      targetChainId: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    /**
     * parseAndVerifyVM serves to parse an encodedVM and wholy validate it for consumption
     */
    parseAndVerifyVM(
      encodedVM: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    parseContractUpgrade(
      encodedUpgrade: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    parseGuardianSetUpgrade(
      encodedUpgrade: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    parseSetMessageFee(
      encodedSetMessageFee: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    parseTransferFees(
      encodedTransferFees: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    /**
     * parseVM serves to parse an encodedVM into a vm struct  - it intentionally performs no validation functions, it simply parses raw into a struct
     */
    parseVM(
      encodedVM: BytesLike,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    publishMessage(
      targetChainId: BigNumberish,
      nonce: BigNumberish,
      payload: BytesLike,
      consistencyLevel: BigNumberish,
      overrides?: PayableOverrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    /**
     * quorum serves solely to determine the number of signatures required to acheive quorum
     */
    quorum(
      numGuardians: BigNumberish,
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    submitContractUpgrade(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    submitNewGuardianSet(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    submitSetMessageFee(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    submitTransferFees(
      _vm: BytesLike,
      overrides?: Overrides & { from?: string | Promise<string> }
    ): Promise<PopulatedTransaction>;

    verifySignatures(
      hash: BytesLike,
      signatures: {
        r: BytesLike;
        s: BytesLike;
        v: BigNumberish;
        guardianIndex: BigNumberish;
      }[],
      guardianSet: { keys: string[]; expirationTime: BigNumberish },
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    verifyVM(
      vm: {
        version: BigNumberish;
        timestamp: BigNumberish;
        nonce: BigNumberish;
        emitterChainId: BigNumberish;
        targetChainId: BigNumberish;
        emitterAddress: BytesLike;
        sequence: BigNumberish;
        consistencyLevel: BigNumberish;
        payload: BytesLike;
        guardianSetIndex: BigNumberish;
        signatures: {
          r: BytesLike;
          s: BytesLike;
          v: BigNumberish;
          guardianIndex: BigNumberish;
        }[];
        hash: BytesLike;
      },
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;

    testNewImplementationActive(
      overrides?: CallOverrides
    ): Promise<PopulatedTransaction>;
  };
}
