/* 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 {
  MockPluginFactory,
  MockPluginFactoryInterface,
} from "../../../../@cryptoalgebra/test-utils/contracts/MockPluginFactory";

const _abi = [
  {
    anonymous: false,
    inputs: [
      {
        indexed: true,
        internalType: "address",
        name: "pool",
        type: "address",
      },
      {
        indexed: false,
        internalType: "address",
        name: "plugin",
        type: "address",
      },
    ],
    name: "PluginCreated",
    type: "event",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    name: "afterCreatePoolHook",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "pool",
        type: "address",
      },
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "address",
        name: "",
        type: "address",
      },
      {
        internalType: "bytes",
        name: "",
        type: "bytes",
      },
    ],
    name: "beforeCreatePoolHook",
    outputs: [
      {
        internalType: "address",
        name: "plugin",
        type: "address",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
  {
    inputs: [],
    name: "defaultPluginImplementation",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [],
    name: "lastCreatedPlugin",
    outputs: [
      {
        internalType: "address",
        name: "",
        type: "address",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "address",
        name: "implementation",
        type: "address",
      },
    ],
    name: "setDefaultImplementation",
    outputs: [],
    stateMutability: "nonpayable",
    type: "function",
  },
] as const;

const _bytecode =
  "0x608060405234801561001057600080fd5b5061033d806100206000396000f3fe608060405234801561001057600080fd5b50600436106100675760003560e01c80631f368de7116100505780631f368de7146100c85780637c16ffc4146100e85780638d5ef8d11461013f57600080fd5b806306ec85f41461006c5780631d0338d9146100b5575b600080fd5b60015461008c9073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61008c6100c3366004610205565b610152565b60005461008c9073ffffffffffffffffffffffffffffffffffffffff1681565b61013d6100f63660046102cb565b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b005b61013d61014d3660046102ed565b505050565b600154600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92831690811790915560405181815290918916907f5f4a087552a21f3d5dc85ceb55e82eb19071c94cf9e51d0e5505093a80e69ec29060200160405180910390a2979650505050505050565b803573ffffffffffffffffffffffffffffffffffffffff8116811461020057600080fd5b919050565b600080600080600080600060c0888a03121561022057600080fd5b610229886101dc565b9650610237602089016101dc565b9550610245604089016101dc565b9450610253606089016101dc565b9350610261608089016101dc565b925060a088013567ffffffffffffffff8082111561027e57600080fd5b818a0191508a601f83011261029257600080fd5b8135818111156102a157600080fd5b8b60208285010111156102b357600080fd5b60208301945080935050505092959891949750929550565b6000602082840312156102dd57600080fd5b6102e6826101dc565b9392505050565b60008060006060848603121561030257600080fd5b61030b846101dc565b9250610319602085016101dc565b9150610327604085016101dc565b9050925092509256fea164736f6c6343000814000a";

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

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

export class MockPluginFactory__factory extends ContractFactory {
  constructor(...args: MockPluginFactoryConstructorParams) {
    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<
      MockPluginFactory & {
        deploymentTransaction(): ContractTransactionResponse;
      }
    >;
  }
  override connect(runner: ContractRunner | null): MockPluginFactory__factory {
    return super.connect(runner) as MockPluginFactory__factory;
  }

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