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

const _abi = [
  {
    inputs: [
      {
        internalType: "address",
        name: "_hashCheckVerifier",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "_ownerPasswordHash",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_thresholdForRecovery",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "_root",
        type: "uint256",
      },
      {
        internalType: "address",
        name: "_otpMerkleTreeVerifier",
        type: "address",
      },
    ],
    stateMutability: "nonpayable",
    type: "constructor",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "newProposedOwner",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "trusteeInitializer",
        type: "address",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "currRecoveryRound",
        type: "uint256",
      },
    ],
    name: "NewRecoveryProcedure",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "Owner",
        type: "address",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "RecoveryRound",
        type: "uint256",
      },
    ],
    name: "RecoveryCancelled",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "oldOwner",
        type: "address",
      },
      {
        indexed: true,
        internalType: "address",
        name: "newOwner",
        type: "address",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "RecoveryRound",
        type: "uint256",
      },
    ],
    name: "RecoveryExecuted",
    type: "event",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "trustee",
        type: "address",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "RecoveryRound",
        type: "uint256",
      },
    ],
    name: "VotedInRecovery",
    type: "event",
  },
  {
    inputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    name: "Trustees",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256[2]",
        name: "a",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[2][2]",
        name: "b",
        type: "uint256[2][2]",
      },
      {
        internalType: "uint256[2]",
        name: "c",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[1]",
        name: "Input",
        type: "uint256[1]",
      },
      {
        internalType: "uint256",
        name: "recoveryRoundNumber",
        type: "uint256",
      },
    ],
    name: "cancelRecovery",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "currentRecoveryNumber",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256[2]",
        name: "a",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[2][2]",
        name: "b",
        type: "uint256[2][2]",
      },
      {
        internalType: "uint256[2]",
        name: "c",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[1]",
        name: "Input",
        type: "uint256[1]",
      },
      {
        internalType: "uint256",
        name: "recoveryRoundNumber",
        type: "uint256",
      },
    ],
    name: "executeRecoveryChange",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256[2]",
        name: "a",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[2][2]",
        name: "b",
        type: "uint256[2][2]",
      },
      {
        internalType: "uint256[2]",
        name: "c",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[2]",
        name: "input",
        type: "uint256[2]",
      },
      {
        internalType: "address",
        name: "callee",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "value",
        type: "uint256",
      },
    ],
    name: "executeTxn",
    outputs: [
      {
        internalType: "bytes",
        name: "result",
        type: "bytes",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "isRecoveryOn",
    outputs: [
      {
        internalType: "bool",
        name: "",
        type: "bool",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "numberTrustees",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
      {
        internalType: "bytes",
        name: "",
        type: "bytes",
      },
    ],
    name: "onERC721Received",
    outputs: [
      {
        internalType: "bytes4",
        name: "",
        type: "bytes4",
      },
    ],
    stateMutability: "pure",
    type: "function",
  },
  {
    inputs: [],
    name: "owner",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address[]",
        name: "_trustees",
        type: "address[]",
      },
    ],
    name: "setTrustees",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256[]",
        name: "_passwordHashes",
        type: "uint256[]",
      },
    ],
    name: "setTrusteesPasswords",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256[2]",
        name: "a",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[2][2]",
        name: "b",
        type: "uint256[2][2]",
      },
      {
        internalType: "uint256[2]",
        name: "c",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[1]",
        name: "Input",
        type: "uint256[1]",
      },
      {
        internalType: "address",
        name: "newOwner",
        type: "address",
      },
    ],
    name: "startRecovery",
    outputs: [
      {
        internalType: "uint256",
        name: "",
        type: "uint256",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256[2]",
        name: "a",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[2][2]",
        name: "b",
        type: "uint256[2][2]",
      },
      {
        internalType: "uint256[2]",
        name: "c",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[2]",
        name: "input",
        type: "uint256[2]",
      },
    ],
    name: "verifyOTP",
    outputs: [
      {
        internalType: "bool",
        name: "success",
        type: "bool",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "uint256[2]",
        name: "a",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[2][2]",
        name: "b",
        type: "uint256[2][2]",
      },
      {
        internalType: "uint256[2]",
        name: "c",
        type: "uint256[2]",
      },
      {
        internalType: "uint256[1]",
        name: "Input",
        type: "uint256[1]",
      },
      {
        internalType: "uint256",
        name: "recoveryRoundNumber",
        type: "uint256",
      },
    ],
    name: "voteInRecovery",
    outputs: [
      {
        internalType: "bool",
        name: "success",
        type: "bool",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    stateMutability: "payable",
    type: "receive",
  },
];

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

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

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

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

  override deploy(
    _hashCheckVerifier: PromiseOrValue<string>,
    _ownerPasswordHash: PromiseOrValue<BigNumberish>,
    _thresholdForRecovery: PromiseOrValue<BigNumberish>,
    _root: PromiseOrValue<BigNumberish>,
    _otpMerkleTreeVerifier: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> }
  ): Promise<ZkSocialRecoveryWallet> {
    return super.deploy(
      _hashCheckVerifier,
      _ownerPasswordHash,
      _thresholdForRecovery,
      _root,
      _otpMerkleTreeVerifier,
      overrides || {}
    ) as Promise<ZkSocialRecoveryWallet>;
  }
  override getDeployTransaction(
    _hashCheckVerifier: PromiseOrValue<string>,
    _ownerPasswordHash: PromiseOrValue<BigNumberish>,
    _thresholdForRecovery: PromiseOrValue<BigNumberish>,
    _root: PromiseOrValue<BigNumberish>,
    _otpMerkleTreeVerifier: PromiseOrValue<string>,
    overrides?: Overrides & { from?: PromiseOrValue<string> }
  ): TransactionRequest {
    return super.getDeployTransaction(
      _hashCheckVerifier,
      _ownerPasswordHash,
      _thresholdForRecovery,
      _root,
      _otpMerkleTreeVerifier,
      overrides || {}
    );
  }
  override attach(address: string): ZkSocialRecoveryWallet {
    return super.attach(address) as ZkSocialRecoveryWallet;
  }
  override connect(signer: Signer): ZkSocialRecoveryWallet__factory {
    return super.connect(signer) as ZkSocialRecoveryWallet__factory;
  }

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