/* 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 IL2GraphTokenGatewayInterface extends Interface {
  getFunction(
    nameOrSignature:
      | "calculateL2TokenAddress"
      | "finalizeInboundTransfer"
      | "getOutboundCalldata"
      | "initialize"
      | "outboundTransfer(address,address,uint256,bytes)"
      | "outboundTransfer(address,address,uint256,uint256,uint256,bytes)"
      | "setL1CounterpartAddress"
      | "setL1TokenAddress"
      | "setL2Router",
  ): FunctionFragment;

  getEvent(
    nameOrSignatureOrTopic:
      | "DepositFinalized"
      | "L1CounterpartAddressSet"
      | "L1TokenAddressSet"
      | "L2RouterSet"
      | "WithdrawalInitiated",
  ): EventFragment;

  encodeFunctionData(
    functionFragment: "calculateL2TokenAddress",
    values: [AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "finalizeInboundTransfer",
    values: [AddressLike, AddressLike, AddressLike, BigNumberish, BytesLike],
  ): string;
  encodeFunctionData(
    functionFragment: "getOutboundCalldata",
    values: [AddressLike, AddressLike, AddressLike, BigNumberish, BytesLike],
  ): string;
  encodeFunctionData(
    functionFragment: "initialize",
    values: [AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "outboundTransfer(address,address,uint256,bytes)",
    values: [AddressLike, AddressLike, BigNumberish, BytesLike],
  ): string;
  encodeFunctionData(
    functionFragment: "outboundTransfer(address,address,uint256,uint256,uint256,bytes)",
    values: [
      AddressLike,
      AddressLike,
      BigNumberish,
      BigNumberish,
      BigNumberish,
      BytesLike,
    ],
  ): string;
  encodeFunctionData(
    functionFragment: "setL1CounterpartAddress",
    values: [AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "setL1TokenAddress",
    values: [AddressLike],
  ): string;
  encodeFunctionData(
    functionFragment: "setL2Router",
    values: [AddressLike],
  ): string;

  decodeFunctionResult(
    functionFragment: "calculateL2TokenAddress",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "finalizeInboundTransfer",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "getOutboundCalldata",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(functionFragment: "initialize", data: BytesLike): Result;
  decodeFunctionResult(
    functionFragment: "outboundTransfer(address,address,uint256,bytes)",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "outboundTransfer(address,address,uint256,uint256,uint256,bytes)",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setL1CounterpartAddress",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setL1TokenAddress",
    data: BytesLike,
  ): Result;
  decodeFunctionResult(
    functionFragment: "setL2Router",
    data: BytesLike,
  ): Result;
}

export namespace DepositFinalizedEvent {
  export type InputTuple = [
    l1Token: AddressLike,
    from: AddressLike,
    to: AddressLike,
    amount: BigNumberish,
  ];
  export type OutputTuple = [
    l1Token: string,
    from: string,
    to: string,
    amount: bigint,
  ];
  export interface OutputObject {
    l1Token: string;
    from: string;
    to: string;
    amount: 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 L1CounterpartAddressSetEvent {
  export type InputTuple = [l1Counterpart: AddressLike];
  export type OutputTuple = [l1Counterpart: string];
  export interface OutputObject {
    l1Counterpart: 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 L1TokenAddressSetEvent {
  export type InputTuple = [l1GRT: AddressLike];
  export type OutputTuple = [l1GRT: string];
  export interface OutputObject {
    l1GRT: 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 L2RouterSetEvent {
  export type InputTuple = [l2Router: AddressLike];
  export type OutputTuple = [l2Router: string];
  export interface OutputObject {
    l2Router: 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 WithdrawalInitiatedEvent {
  export type InputTuple = [
    l1Token: AddressLike,
    from: AddressLike,
    to: AddressLike,
    l2ToL1Id: BigNumberish,
    exitNum: BigNumberish,
    amount: BigNumberish,
  ];
  export type OutputTuple = [
    l1Token: string,
    from: string,
    to: string,
    l2ToL1Id: bigint,
    exitNum: bigint,
    amount: bigint,
  ];
  export interface OutputObject {
    l1Token: string;
    from: string;
    to: string;
    l2ToL1Id: bigint;
    exitNum: bigint;
    amount: 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 IL2GraphTokenGateway extends BaseContract {
  connect(runner?: ContractRunner | null): IL2GraphTokenGateway;
  waitForDeployment(): Promise<this>;

  interface: IL2GraphTokenGatewayInterface;

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

  calculateL2TokenAddress: TypedContractMethod<
    [l1ERC20: AddressLike],
    [string],
    "view"
  >;

  finalizeInboundTransfer: TypedContractMethod<
    [
      l1Token: AddressLike,
      from: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      data: BytesLike,
    ],
    [void],
    "payable"
  >;

  getOutboundCalldata: TypedContractMethod<
    [
      token: AddressLike,
      from: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      data: BytesLike,
    ],
    [string],
    "view"
  >;

  initialize: TypedContractMethod<
    [controller: AddressLike],
    [void],
    "nonpayable"
  >;

  "outboundTransfer(address,address,uint256,bytes)": TypedContractMethod<
    [
      l1Token: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      data: BytesLike,
    ],
    [string],
    "nonpayable"
  >;

  "outboundTransfer(address,address,uint256,uint256,uint256,bytes)": TypedContractMethod<
    [
      l1Token: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      unused1: BigNumberish,
      unused2: BigNumberish,
      data: BytesLike,
    ],
    [string],
    "payable"
  >;

  setL1CounterpartAddress: TypedContractMethod<
    [l1Counterpart: AddressLike],
    [void],
    "nonpayable"
  >;

  setL1TokenAddress: TypedContractMethod<
    [l1GRT: AddressLike],
    [void],
    "nonpayable"
  >;

  setL2Router: TypedContractMethod<
    [l2Router: AddressLike],
    [void],
    "nonpayable"
  >;

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

  getFunction(
    nameOrSignature: "calculateL2TokenAddress",
  ): TypedContractMethod<[l1ERC20: AddressLike], [string], "view">;
  getFunction(
    nameOrSignature: "finalizeInboundTransfer",
  ): TypedContractMethod<
    [
      l1Token: AddressLike,
      from: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      data: BytesLike,
    ],
    [void],
    "payable"
  >;
  getFunction(
    nameOrSignature: "getOutboundCalldata",
  ): TypedContractMethod<
    [
      token: AddressLike,
      from: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      data: BytesLike,
    ],
    [string],
    "view"
  >;
  getFunction(
    nameOrSignature: "initialize",
  ): TypedContractMethod<[controller: AddressLike], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "outboundTransfer(address,address,uint256,bytes)",
  ): TypedContractMethod<
    [
      l1Token: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      data: BytesLike,
    ],
    [string],
    "nonpayable"
  >;
  getFunction(
    nameOrSignature: "outboundTransfer(address,address,uint256,uint256,uint256,bytes)",
  ): TypedContractMethod<
    [
      l1Token: AddressLike,
      to: AddressLike,
      amount: BigNumberish,
      unused1: BigNumberish,
      unused2: BigNumberish,
      data: BytesLike,
    ],
    [string],
    "payable"
  >;
  getFunction(
    nameOrSignature: "setL1CounterpartAddress",
  ): TypedContractMethod<[l1Counterpart: AddressLike], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "setL1TokenAddress",
  ): TypedContractMethod<[l1GRT: AddressLike], [void], "nonpayable">;
  getFunction(
    nameOrSignature: "setL2Router",
  ): TypedContractMethod<[l2Router: AddressLike], [void], "nonpayable">;

  getEvent(
    key: "DepositFinalized",
  ): TypedContractEvent<
    DepositFinalizedEvent.InputTuple,
    DepositFinalizedEvent.OutputTuple,
    DepositFinalizedEvent.OutputObject
  >;
  getEvent(
    key: "L1CounterpartAddressSet",
  ): TypedContractEvent<
    L1CounterpartAddressSetEvent.InputTuple,
    L1CounterpartAddressSetEvent.OutputTuple,
    L1CounterpartAddressSetEvent.OutputObject
  >;
  getEvent(
    key: "L1TokenAddressSet",
  ): TypedContractEvent<
    L1TokenAddressSetEvent.InputTuple,
    L1TokenAddressSetEvent.OutputTuple,
    L1TokenAddressSetEvent.OutputObject
  >;
  getEvent(
    key: "L2RouterSet",
  ): TypedContractEvent<
    L2RouterSetEvent.InputTuple,
    L2RouterSetEvent.OutputTuple,
    L2RouterSetEvent.OutputObject
  >;
  getEvent(
    key: "WithdrawalInitiated",
  ): TypedContractEvent<
    WithdrawalInitiatedEvent.InputTuple,
    WithdrawalInitiatedEvent.OutputTuple,
    WithdrawalInitiatedEvent.OutputObject
  >;

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

    "L1CounterpartAddressSet(address)": TypedContractEvent<
      L1CounterpartAddressSetEvent.InputTuple,
      L1CounterpartAddressSetEvent.OutputTuple,
      L1CounterpartAddressSetEvent.OutputObject
    >;
    L1CounterpartAddressSet: TypedContractEvent<
      L1CounterpartAddressSetEvent.InputTuple,
      L1CounterpartAddressSetEvent.OutputTuple,
      L1CounterpartAddressSetEvent.OutputObject
    >;

    "L1TokenAddressSet(address)": TypedContractEvent<
      L1TokenAddressSetEvent.InputTuple,
      L1TokenAddressSetEvent.OutputTuple,
      L1TokenAddressSetEvent.OutputObject
    >;
    L1TokenAddressSet: TypedContractEvent<
      L1TokenAddressSetEvent.InputTuple,
      L1TokenAddressSetEvent.OutputTuple,
      L1TokenAddressSetEvent.OutputObject
    >;

    "L2RouterSet(address)": TypedContractEvent<
      L2RouterSetEvent.InputTuple,
      L2RouterSetEvent.OutputTuple,
      L2RouterSetEvent.OutputObject
    >;
    L2RouterSet: TypedContractEvent<
      L2RouterSetEvent.InputTuple,
      L2RouterSetEvent.OutputTuple,
      L2RouterSetEvent.OutputObject
    >;

    "WithdrawalInitiated(address,address,address,uint256,uint256,uint256)": TypedContractEvent<
      WithdrawalInitiatedEvent.InputTuple,
      WithdrawalInitiatedEvent.OutputTuple,
      WithdrawalInitiatedEvent.OutputObject
    >;
    WithdrawalInitiated: TypedContractEvent<
      WithdrawalInitiatedEvent.InputTuple,
      WithdrawalInitiatedEvent.OutputTuple,
      WithdrawalInitiatedEvent.OutputObject
    >;
  };
}
