/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
import {
  Contract,
  ContractFactory,
  ContractTransactionResponse,
  Interface,
} from "ethers";
import type { Signer, ContractDeployTransaction, ContractRunner } from "ethers";
import type { NonPayableOverrides } from "../common";
import type { Factory, FactoryInterface } from "../Factory";

const _abi = [
  {
    type: "function",
    name: "computeAddress",
    inputs: [
      {
        name: "salt",
        type: "bytes32",
        internalType: "bytes32",
      },
      {
        name: "creationCodeHash",
        type: "bytes32",
        internalType: "bytes32",
      },
    ],
    outputs: [
      {
        name: "addr",
        type: "address",
        internalType: "address",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "deploy",
    inputs: [
      {
        name: "salt",
        type: "bytes32",
        internalType: "bytes32",
      },
      {
        name: "creationCode",
        type: "bytes",
        internalType: "bytes",
      },
    ],
    outputs: [
      {
        name: "addr",
        type: "address",
        internalType: "address",
      },
    ],
    stateMutability: "payable",
  },
  {
    type: "event",
    name: "CreatedContract",
    inputs: [
      {
        name: "addr",
        type: "address",
        indexed: false,
        internalType: "address",
      },
      {
        name: "salt",
        type: "bytes32",
        indexed: false,
        internalType: "bytes32",
      },
    ],
    anonymous: false,
  },
  {
    type: "error",
    name: "Create2EmptyBytecode",
    inputs: [],
  },
  {
    type: "error",
    name: "Create2FailedDeployment",
    inputs: [],
  },
] as const;

const _bytecode =
  "0x6080604052348015600e575f5ffd5b506102678061001c5f395ff3fe608060405260043610610028575f3560e01c8063481286e61461002c578063cdcb760a14610067575b5f5ffd5b348015610037575f5ffd5b5061004b610046366004610140565b61007a565b6040516001600160a01b03909116815260200160405180910390f35b61004b610075366004610174565b6100a4565b6040805190810182905260208101839052308082525f91600b0160ff815360559020949350505050565b5f81515f036100c657604051631328927760e21b815260040160405180910390fd5b8282516020840134f590506001600160a01b0381166100f857604051633a0ba96160e11b815260040160405180910390fd5b604080516001600160a01b0383168152602081018590527f4108529e399e9cd5343c48ae06aa62a23c8c1b7c93f59d4691a0ea1e6f5b4603910160405180910390a192915050565b5f5f60408385031215610151575f5ffd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b5f5f60408385031215610185575f5ffd5b82359150602083013567ffffffffffffffff8111156101a2575f5ffd5b8301601f810185136101b2575f5ffd5b803567ffffffffffffffff8111156101cc576101cc610160565b604051601f8201601f19908116603f0116810167ffffffffffffffff811182821017156101fb576101fb610160565b604052818152828201602001871015610212575f5ffd5b816020840160208301375f60208383010152809350505050925092905056fea2646970667358221220b6b4f5de71e8ac337dd845cc23b73f6808935dd762517a951944059c04b08a3b64736f6c634300081c0033";

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

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

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

  override getDeployTransaction(
    overrides?: NonPayableOverrides & { from?: string }
  ): Promise<ContractDeployTransaction> {
    return super.getDeployTransaction(overrides || {});
  }
  override deploy(overrides?: NonPayableOverrides & { from?: string }) {
    return super.deploy(overrides || {}) as Promise<
      Factory & {
        deploymentTransaction(): ContractTransactionResponse;
      }
    >;
  }
  override connect(runner: ContractRunner | null): Factory__factory {
    return super.connect(runner) as Factory__factory;
  }

  static readonly bytecode = _bytecode;
  static readonly abi = _abi;
  static createInterface(): FactoryInterface {
    return new Interface(_abi) as FactoryInterface;
  }
  static connect(address: string, runner?: ContractRunner | null): Factory {
    return new Contract(address, _abi, runner) as unknown as Factory;
  }
}
