/* 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 {
  DomainRegistry,
  DomainRegistryInterface,
} from "../../../../src/contracts/DomainRegistry.sol/DomainRegistry";

const _abi = [
  {
    inputs: [
      {
        internalType: "string",
        name: "domain",
        type: "string",
      },
    ],
    name: "DomainAlreadyRegistered",
    type: "error",
  },
  {
    inputs: [
      {
        internalType: "bytes4",
        name: "tag",
        type: "bytes4",
      },
      {
        internalType: "uint256",
        name: "maxIndex",
        type: "uint256",
      },
      {
        internalType: "uint256",
        name: "suppliedIndex",
        type: "uint256",
      },
    ],
    name: "DomainIndexOutOfRange",
    type: "error",
  },
  {
    anonymous: false,
    inputs: [
      {
        indexed: false,
        internalType: "string",
        name: "domain",
        type: "string",
      },
      {
        indexed: false,
        internalType: "bytes4",
        name: "tag",
        type: "bytes4",
      },
      {
        indexed: false,
        internalType: "uint256",
        name: "index",
        type: "uint256",
      },
    ],
    name: "DomainRegistered",
    type: "event",
  },
  {
    inputs: [
      {
        internalType: "bytes4",
        name: "tag",
        type: "bytes4",
      },
      {
        internalType: "uint256",
        name: "index",
        type: "uint256",
      },
    ],
    name: "getDomain",
    outputs: [
      {
        internalType: "string",
        name: "domain",
        type: "string",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "bytes4",
        name: "tag",
        type: "bytes4",
      },
    ],
    name: "getDomains",
    outputs: [
      {
        internalType: "string[]",
        name: "domains",
        type: "string[]",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "bytes4",
        name: "tag",
        type: "bytes4",
      },
    ],
    name: "getNumberOfDomains",
    outputs: [
      {
        internalType: "uint256",
        name: "totalDomains",
        type: "uint256",
      },
    ],
    stateMutability: "view",
    type: "function",
  },
  {
    inputs: [
      {
        internalType: "string",
        name: "domain",
        type: "string",
      },
    ],
    name: "setDomain",
    outputs: [
      {
        internalType: "bytes4",
        name: "tag",
        type: "bytes4",
      },
    ],
    stateMutability: "nonpayable",
    type: "function",
  },
] as const;

const _bytecode =
  " ";

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

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

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

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