/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import type {
  BaseContract,
  BigNumber,
  BigNumberish,
  BytesLike,
  CallOverrides,
  ContractTransaction,
  Overrides,
  PayableOverrides,
  PopulatedTransaction,
  Signer,
  utils,
} from "ethers";
import type {
  FunctionFragment,
  Result,
  EventFragment,
} from "@ethersproject/abi";
import type { Listener, Provider } from "@ethersproject/providers";
import type {
  TypedEventFilter,
  TypedEvent,
  TypedListener,
  OnEvent,
} from "./common";

export interface CoreWriterSimInterface extends utils.Interface {
  functions: {
    "enqueueAction(uint256,bytes,uint256)": FunctionFragment;
    "enqueueAction(bytes,uint256)": FunctionFragment;
    "executeQueuedActions()": FunctionFragment;
    "nativeTransferCallback(address,address,uint256)": FunctionFragment;
    "sendRawAction(bytes)": FunctionFragment;
    "setRevertOnFailure(bool)": FunctionFragment;
    "tokenTransferCallback(address,uint64,address,uint256)": FunctionFragment;
    "tokenTransferCallback(uint64,address,uint256)": FunctionFragment;
  };

  getFunction(
    nameOrSignatureOrTopic:
      | "enqueueAction(uint256,bytes,uint256)"
      | "enqueueAction(bytes,uint256)"
      | "executeQueuedActions"
      | "nativeTransferCallback"
      | "sendRawAction"
      | "setRevertOnFailure"
      | "tokenTransferCallback(address,uint64,address,uint256)"
      | "tokenTransferCallback(uint64,address,uint256)"
  ): FunctionFragment;

  encodeFunctionData(
    functionFragment: "enqueueAction(uint256,bytes,uint256)",
    values: [BigNumberish, BytesLike, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "enqueueAction(bytes,uint256)",
    values: [BytesLike, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "executeQueuedActions",
    values?: undefined
  ): string;
  encodeFunctionData(
    functionFragment: "nativeTransferCallback",
    values: [string, string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "sendRawAction",
    values: [BytesLike]
  ): string;
  encodeFunctionData(
    functionFragment: "setRevertOnFailure",
    values: [boolean]
  ): string;
  encodeFunctionData(
    functionFragment: "tokenTransferCallback(address,uint64,address,uint256)",
    values: [string, BigNumberish, string, BigNumberish]
  ): string;
  encodeFunctionData(
    functionFragment: "tokenTransferCallback(uint64,address,uint256)",
    values: [BigNumberish, string, BigNumberish]
  ): string;

  decodeFunctionResult(
    functionFragment: "enqueueAction(uint256,bytes,uint256)",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "enqueueAction(bytes,uint256)",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "executeQueuedActions",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "nativeTransferCallback",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "sendRawAction",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "setRevertOnFailure",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "tokenTransferCallback(address,uint64,address,uint256)",
    data: BytesLike
  ): Result;
  decodeFunctionResult(
    functionFragment: "tokenTransferCallback(uint64,address,uint256)",
    data: BytesLike
  ): Result;

  events: {
    "RawAction(address,bytes)": EventFragment;
  };

  getEvent(nameOrSignatureOrTopic: "RawAction"): EventFragment;
}

export interface RawActionEventObject {
  user: string;
  data: string;
}
export type RawActionEvent = TypedEvent<[string, string], RawActionEventObject>;

export type RawActionEventFilter = TypedEventFilter<RawActionEvent>;

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

  interface: CoreWriterSimInterface;

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

  listeners<TEvent extends TypedEvent>(
    eventFilter?: TypedEventFilter<TEvent>
  ): Array<TypedListener<TEvent>>;
  listeners(eventName?: string): Array<Listener>;
  removeAllListeners<TEvent extends TypedEvent>(
    eventFilter: TypedEventFilter<TEvent>
  ): this;
  removeAllListeners(eventName?: string): this;
  off: OnEvent<this>;
  on: OnEvent<this>;
  once: OnEvent<this>;
  removeListener: OnEvent<this>;

  functions: {
    "enqueueAction(uint256,bytes,uint256)"(
      timestamp: BigNumberish,
      data: BytesLike,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<ContractTransaction>;

    "enqueueAction(bytes,uint256)"(
      data: BytesLike,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<ContractTransaction>;

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

    nativeTransferCallback(
      sender: string,
      from: string,
      value: BigNumberish,
      overrides?: PayableOverrides & { from?: string }
    ): Promise<ContractTransaction>;

    sendRawAction(
      data: BytesLike,
      overrides?: Overrides & { from?: string }
    ): Promise<ContractTransaction>;

    setRevertOnFailure(
      _revertOnFailure: boolean,
      overrides?: Overrides & { from?: string }
    ): Promise<ContractTransaction>;

    "tokenTransferCallback(address,uint64,address,uint256)"(
      sender: string,
      token: BigNumberish,
      from: string,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<ContractTransaction>;

    "tokenTransferCallback(uint64,address,uint256)"(
      token: BigNumberish,
      from: string,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<ContractTransaction>;
  };

  "enqueueAction(uint256,bytes,uint256)"(
    timestamp: BigNumberish,
    data: BytesLike,
    value: BigNumberish,
    overrides?: Overrides & { from?: string }
  ): Promise<ContractTransaction>;

  "enqueueAction(bytes,uint256)"(
    data: BytesLike,
    value: BigNumberish,
    overrides?: Overrides & { from?: string }
  ): Promise<ContractTransaction>;

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

  nativeTransferCallback(
    sender: string,
    from: string,
    value: BigNumberish,
    overrides?: PayableOverrides & { from?: string }
  ): Promise<ContractTransaction>;

  sendRawAction(
    data: BytesLike,
    overrides?: Overrides & { from?: string }
  ): Promise<ContractTransaction>;

  setRevertOnFailure(
    _revertOnFailure: boolean,
    overrides?: Overrides & { from?: string }
  ): Promise<ContractTransaction>;

  "tokenTransferCallback(address,uint64,address,uint256)"(
    sender: string,
    token: BigNumberish,
    from: string,
    value: BigNumberish,
    overrides?: Overrides & { from?: string }
  ): Promise<ContractTransaction>;

  "tokenTransferCallback(uint64,address,uint256)"(
    token: BigNumberish,
    from: string,
    value: BigNumberish,
    overrides?: Overrides & { from?: string }
  ): Promise<ContractTransaction>;

  callStatic: {
    "enqueueAction(uint256,bytes,uint256)"(
      timestamp: BigNumberish,
      data: BytesLike,
      value: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    "enqueueAction(bytes,uint256)"(
      data: BytesLike,
      value: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

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

    nativeTransferCallback(
      sender: string,
      from: string,
      value: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    sendRawAction(data: BytesLike, overrides?: CallOverrides): Promise<void>;

    setRevertOnFailure(
      _revertOnFailure: boolean,
      overrides?: CallOverrides
    ): Promise<void>;

    "tokenTransferCallback(address,uint64,address,uint256)"(
      sender: string,
      token: BigNumberish,
      from: string,
      value: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;

    "tokenTransferCallback(uint64,address,uint256)"(
      token: BigNumberish,
      from: string,
      value: BigNumberish,
      overrides?: CallOverrides
    ): Promise<void>;
  };

  filters: {
    "RawAction(address,bytes)"(
      user?: string | null,
      data?: null
    ): RawActionEventFilter;
    RawAction(user?: string | null, data?: null): RawActionEventFilter;
  };

  estimateGas: {
    "enqueueAction(uint256,bytes,uint256)"(
      timestamp: BigNumberish,
      data: BytesLike,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<BigNumber>;

    "enqueueAction(bytes,uint256)"(
      data: BytesLike,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<BigNumber>;

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

    nativeTransferCallback(
      sender: string,
      from: string,
      value: BigNumberish,
      overrides?: PayableOverrides & { from?: string }
    ): Promise<BigNumber>;

    sendRawAction(
      data: BytesLike,
      overrides?: Overrides & { from?: string }
    ): Promise<BigNumber>;

    setRevertOnFailure(
      _revertOnFailure: boolean,
      overrides?: Overrides & { from?: string }
    ): Promise<BigNumber>;

    "tokenTransferCallback(address,uint64,address,uint256)"(
      sender: string,
      token: BigNumberish,
      from: string,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<BigNumber>;

    "tokenTransferCallback(uint64,address,uint256)"(
      token: BigNumberish,
      from: string,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<BigNumber>;
  };

  populateTransaction: {
    "enqueueAction(uint256,bytes,uint256)"(
      timestamp: BigNumberish,
      data: BytesLike,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<PopulatedTransaction>;

    "enqueueAction(bytes,uint256)"(
      data: BytesLike,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<PopulatedTransaction>;

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

    nativeTransferCallback(
      sender: string,
      from: string,
      value: BigNumberish,
      overrides?: PayableOverrides & { from?: string }
    ): Promise<PopulatedTransaction>;

    sendRawAction(
      data: BytesLike,
      overrides?: Overrides & { from?: string }
    ): Promise<PopulatedTransaction>;

    setRevertOnFailure(
      _revertOnFailure: boolean,
      overrides?: Overrides & { from?: string }
    ): Promise<PopulatedTransaction>;

    "tokenTransferCallback(address,uint64,address,uint256)"(
      sender: string,
      token: BigNumberish,
      from: string,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<PopulatedTransaction>;

    "tokenTransferCallback(uint64,address,uint256)"(
      token: BigNumberish,
      from: string,
      value: BigNumberish,
      overrides?: Overrides & { from?: string }
    ): Promise<PopulatedTransaction>;
  };
}
