/* 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 IOutboxInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "l2ToL1BatchNum"
      | "l2ToL1Block"
      | "l2ToL1EthBlock"
      | "l2ToL1OutputId"
      | "l2ToL1Sender"
      | "l2ToL1Timestamp"
      | "outboxEntryExists"
      | "processOutgoingMessages",
  ): FunctionFragment;

  getEvent(
    nameOrSignatureOrTopic: "OutBoxTransactionExecuted" | "OutboxEntryCreated",
  ): EventFragment;

  encodeFunctionData(
    functionFragment: "l2ToL1BatchNum",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "l2ToL1Block",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "l2ToL1EthBlock",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "l2ToL1OutputId",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "l2ToL1Sender",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "l2ToL1Timestamp",
    values?: undefined,
  ): string;
  encodeFunctionData(
    functionFragment: "outboxEntryExists",
    values: [BigNumberish],
  ): string;
  encodeFunctionData(
    functionFragment: "processOutgoingMessages",
    values: [BytesLike, BigNumberish[]],
  ): string;

  decodeFunctionResult(
    functionFragment: "l2ToL1BatchNum",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "l2ToL1Block",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "l2ToL1EthBlock",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "l2ToL1OutputId",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "l2ToL1Sender",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "l2ToL1Timestamp",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "outboxEntryExists",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "processOutgoingMessages",
    data: BytesLike,
  ): Result;
}

export namespace OutBoxTransactionExecutedEvent {
  export type InputTuple = [
    destAddr: AddressLike,
    l2Sender: AddressLike,
    outboxEntryIndex: BigNumberish,
    transactionIndex: BigNumberish,
  ];
  export type OutputTuple = [
    destAddr: string,
    l2Sender: string,
    outboxEntryIndex: bigint,
    transactionIndex: bigint,
  ];
  export interface OutputObject {
    destAddr: string;
    l2Sender: string;
    outboxEntryIndex: bigint;
    transactionIndex: bigint;
  }
  export type Event = TypedContractEvent<InputTuple, OutputTuple, OutputObject>;
  export type Filter = TypedDeferredTopicFilter<Event>;
  export type Log = TypedEventLog<Event>;
  export type LogDescription = TypedLogDescription<Event>;
}

export namespace OutboxEntryCreatedEvent {
  export type InputTuple = [
    batchNum: BigNumberish,
    outboxEntryIndex: BigNumberish,
    outputRoot: BytesLike,
    numInBatch: BigNumberish,
  ];
  export type OutputTuple = [
    batchNum: bigint,
    outboxEntryIndex: bigint,
    outputRoot: string,
    numInBatch: bigint,
  ];
  export interface OutputObject {
    batchNum: bigint;
    outboxEntryIndex: bigint;
    outputRoot: string;
    numInBatch: 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 IOutbox extends BaseContract {
  connect(runner?: ContractRunner | null): IOutbox;
  waitForDeployment(): Promise<this>;

  interface: IOutboxInterface;

  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>;

  l2ToL1BatchNum: TypedContractMethod<[], [bigint], "view">;

  l2ToL1Block: TypedContractMethod<[], [bigint], "view">;

  l2ToL1EthBlock: TypedContractMethod<[], [bigint], "view">;

  l2ToL1OutputId: TypedContractMethod<[], [string], "view">;

  l2ToL1Sender: TypedContractMethod<[], [string], "view">;

  l2ToL1Timestamp: TypedContractMethod<[], [bigint], "view">;

  outboxEntryExists: TypedContractMethod<
    [batchNum: BigNumberish],
    [boolean],
    "view"
  >;

  processOutgoingMessages: TypedContractMethod<
    [sendsData: BytesLike, sendLengths: BigNumberish[]],
    [void],
    "nonpayable"
  >;

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

  getFunction(
    nameOrSignature: "l2ToL1BatchNum",
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "l2ToL1Block",
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "l2ToL1EthBlock",
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "l2ToL1OutputId",
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "l2ToL1Sender",
  ): TypedContractMethod<[], [string], "view">;
  getFunction(
    nameOrSignature: "l2ToL1Timestamp",
  ): TypedContractMethod<[], [bigint], "view">;
  getFunction(
    nameOrSignature: "outboxEntryExists",
  ): TypedContractMethod<[batchNum: BigNumberish], [boolean], "view">;
  getFunction(
    nameOrSignature: "processOutgoingMessages",
  ): TypedContractMethod<
    [sendsData: BytesLike, sendLengths: BigNumberish[]],
    [void],
    "nonpayable"
  >;

  getEvent(
    key: "OutBoxTransactionExecuted",
  ): TypedContractEvent<
    OutBoxTransactionExecutedEvent.InputTuple,
    OutBoxTransactionExecutedEvent.OutputTuple,
    OutBoxTransactionExecutedEvent.OutputObject
  >;
  getEvent(
    key: "OutboxEntryCreated",
  ): TypedContractEvent<
    OutboxEntryCreatedEvent.InputTuple,
    OutboxEntryCreatedEvent.OutputTuple,
    OutboxEntryCreatedEvent.OutputObject
  >;

  filters: {
    "OutBoxTransactionExecuted(address,address,uint256,uint256)": TypedContractEvent<
      OutBoxTransactionExecutedEvent.InputTuple,
      OutBoxTransactionExecutedEvent.OutputTuple,
      OutBoxTransactionExecutedEvent.OutputObject
    >;
    OutBoxTransactionExecuted: TypedContractEvent<
      OutBoxTransactionExecutedEvent.InputTuple,
      OutBoxTransactionExecutedEvent.OutputTuple,
      OutBoxTransactionExecutedEvent.OutputObject
    >;

    "OutboxEntryCreated(uint256,uint256,bytes32,uint256)": TypedContractEvent<
      OutboxEntryCreatedEvent.InputTuple,
      OutboxEntryCreatedEvent.OutputTuple,
      OutboxEntryCreatedEvent.OutputObject
    >;
    OutboxEntryCreated: TypedContractEvent<
      OutboxEntryCreatedEvent.InputTuple,
      OutboxEntryCreatedEvent.OutputTuple,
      OutboxEntryCreatedEvent.OutputObject
    >;
  };
}
