/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import { Signer, utils, Contract, ContractFactory, Overrides } from "ethers";
import type { Provider, TransactionRequest } from "@ethersproject/providers";
import type { PromiseOrValue } from "../../common";
import type {
  ZkWalletFactory,
  ZkWalletFactoryInterface,
} from "../../contracts/ZkWalletFactory";

const _abi = [
  {
    inputs: [
      {
        internalType: "address",
        name: "_hashCheckVerifier",
        type: "address",
      },
    ],
    stateMutability: "nonpayable",
    type: "constructor",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: false,
        internalType: "address",
        name: "walletAddress",
        type: "address",
      },
    ],
    name: "WalletCreated",
    type: "event",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "_ownerPasswordHash",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_thresholdForRecovery",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_otpVerifier",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_root",
        type: "uint256",
      },
    ],
    name: "deployWallet",
    outputs: [
      {
        internalType: "address",
        name: "walletAddress",
        type: "address",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "_user",
        type: "address",
      },
    ],
    name: "getUserWalletAddress",
    outputs: [
      {
        internalType: "address",
        name: "_walletAddress",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "hashCheckVerifier",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    name: "userAddressToWalletAddress",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
];

const _bytecode =
  "[encoded data, 18820 characters]";

type ZkWalletFactoryConstructorParams =
  | [signer?: Signer]
  | ConstructorParameters<typeof ContractFactory>;

const isSuperArgs = (
  xs: ZkWalletFactoryConstructorParams
): xs is ConstructorParameters<typeof ContractFactory> => xs.length > 1;

export class ZkWalletFactory__factory extends ContractFactory {
  constructor(...args: ZkWalletFactoryConstructorParams) {
    if (isSuperArgs(args)) {
      super(...args);
    } else {
      super(_abi, _bytecode, args[0]);
    }
  }

  override deploy(
    _hashCheckVerifier: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> }
  ): Promise<ZkWalletFactory> {
    return super.deploy(
      _hashCheckVerifier,
      overrides || {}
    ) as Promise<ZkWalletFactory>;
  }
  override getDeployTransaction(
    _hashCheckVerifier: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> }
  ): TransactionRequest {
    return super.getDeployTransaction(_hashCheckVerifier, overrides || {});
  }
  override attach(address: string): ZkWalletFactory {
    return super.attach(address) as ZkWalletFactory;
  }
  override connect(signer: Signer): ZkWalletFactory__factory {
    return super.connect(signer) as ZkWalletFactory__factory;
  }

  static readonly bytecode = _bytecode;
  static readonly abi = _abi;
  static createInterface(): ZkWalletFactoryInterface {
    return new utils.Interface(_abi) as ZkWalletFactoryInterface;
  }
  static connect(
    address: string,
    signerOrProvider: Signer | Provider
  ): ZkWalletFactory {
    return new Contract(address, _abi, signerOrProvider) as ZkWalletFactory;
  }
}
