/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */

import { Contract, Interface, type ContractRunner } from "ethers";
import type {
  BlocklockFeeCollector,
  BlocklockFeeCollectorInterface,
} from "../BlocklockFeeCollector";

const _abi = [
  {
    type: "function",
    name: "MAX_CONSUMERS",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "uint16",
        internalType: "uint16",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "acceptSubscriptionOwnerTransfer",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "addConsumer",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "consumer",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "calculateRequestPriceNative",
    inputs: [
      {
        name: "_callbackGasLimit",
        type: "uint32",
        internalType: "uint32",
      },
    ],
    outputs: [
      {
        name: "",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "cancelSubscription",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "to",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "createSubscription",
    inputs: [],
    outputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "disable",
    inputs: [],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "enable",
    inputs: [],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "estimateRequestPriceNative",
    inputs: [
      {
        name: "_callbackGasLimit",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "_requestGasPriceWei",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [
      {
        name: "",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "fundSubscriptionWithNative",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [],
    stateMutability: "payable",
  },
  {
    type: "function",
    name: "getActiveSubscriptionIds",
    inputs: [
      {
        name: "startIndex",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "maxCount",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [
      {
        name: "ids",
        type: "uint256[]",
        internalType: "uint256[]",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "getSubscription",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [
      {
        name: "nativeBalance",
        type: "uint96",
        internalType: "uint96",
      },
      {
        name: "reqCount",
        type: "uint64",
        internalType: "uint64",
      },
      {
        name: "subOwner",
        type: "address",
        internalType: "address",
      },
      {
        name: "consumers",
        type: "address[]",
        internalType: "address[]",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "ownerCancelSubscription",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "pendingRequestExists",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
    ],
    outputs: [
      {
        name: "",
        type: "bool",
        internalType: "bool",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "removeConsumer",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "consumer",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "requestSubscriptionOwnerTransfer",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "newOwner",
        type: "address",
        internalType: "address",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "s_config",
    inputs: [],
    outputs: [
      {
        name: "maxGasLimit",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "gasAfterPaymentCalculation",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "fulfillmentFlatFeeNativePPM",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "weiPerUnitGas",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "blsPairingCheckOverhead",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "nativePremiumPercentage",
        type: "uint8",
        internalType: "uint8",
      },
      {
        name: "gasForCallExactCheck",
        type: "uint32",
        internalType: "uint32",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "s_configured",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "bool",
        internalType: "bool",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "s_currentSubNonce",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "uint64",
        internalType: "uint64",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "s_disabled",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "bool",
        internalType: "bool",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "s_totalNativeBalance",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "uint96",
        internalType: "uint96",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "s_withdrawableDirectFundingFeeNative",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "uint96",
        internalType: "uint96",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "s_withdrawableSubscriptionFeeNative",
    inputs: [],
    outputs: [
      {
        name: "",
        type: "uint96",
        internalType: "uint96",
      },
    ],
    stateMutability: "view",
  },
  {
    type: "function",
    name: "setConfig",
    inputs: [
      {
        name: "maxGasLimit",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "gasAfterPaymentCalculation",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "fulfillmentFlatFeeNativePPM",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "weiPerUnitGas",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "blsPairingCheckOverhead",
        type: "uint32",
        internalType: "uint32",
      },
      {
        name: "nativePremiumPercentage",
        type: "uint8",
        internalType: "uint8",
      },
      {
        name: "gasForCallExactCheck",
        type: "uint32",
        internalType: "uint32",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "withdrawDirectFundingFeesNative",
    inputs: [
      {
        name: "recipient",
        type: "address",
        internalType: "address payable",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "function",
    name: "withdrawSubscriptionFeesNative",
    inputs: [
      {
        name: "recipient",
        type: "address",
        internalType: "address payable",
      },
    ],
    outputs: [],
    stateMutability: "nonpayable",
  },
  {
    type: "event",
    name: "ConfigSet",
    inputs: [
      {
        name: "maxGasLimit",
        type: "uint32",
        indexed: false,
        internalType: "uint32",
      },
      {
        name: "gasAfterPaymentCalculation",
        type: "uint32",
        indexed: false,
        internalType: "uint32",
      },
      {
        name: "fulfillmentFlatFeeNativePPM",
        type: "uint32",
        indexed: false,
        internalType: "uint32",
      },
      {
        name: "weiPerUnitGas",
        type: "uint32",
        indexed: false,
        internalType: "uint32",
      },
      {
        name: "blsPairingCheckOverhead",
        type: "uint32",
        indexed: false,
        internalType: "uint32",
      },
      {
        name: "nativePremiumPercentage",
        type: "uint8",
        indexed: false,
        internalType: "uint8",
      },
      {
        name: "gasForCallExactCheck",
        type: "uint32",
        indexed: false,
        internalType: "uint32",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "Disabled",
    inputs: [],
    anonymous: false,
  },
  {
    type: "event",
    name: "Enabled",
    inputs: [],
    anonymous: false,
  },
  {
    type: "event",
    name: "L1GasFee",
    inputs: [
      {
        name: "fee",
        type: "uint256",
        indexed: false,
        internalType: "uint256",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "SubscriptionCanceled",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        indexed: true,
        internalType: "uint256",
      },
      {
        name: "to",
        type: "address",
        indexed: false,
        internalType: "address",
      },
      {
        name: "amountNative",
        type: "uint256",
        indexed: false,
        internalType: "uint256",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "SubscriptionConsumerAdded",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        indexed: true,
        internalType: "uint256",
      },
      {
        name: "consumer",
        type: "address",
        indexed: false,
        internalType: "address",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "SubscriptionConsumerRemoved",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        indexed: true,
        internalType: "uint256",
      },
      {
        name: "consumer",
        type: "address",
        indexed: false,
        internalType: "address",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "SubscriptionCreated",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        indexed: true,
        internalType: "uint256",
      },
      {
        name: "owner",
        type: "address",
        indexed: false,
        internalType: "address",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "SubscriptionFundedWithNative",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        indexed: true,
        internalType: "uint256",
      },
      {
        name: "oldNativeBalance",
        type: "uint256",
        indexed: false,
        internalType: "uint256",
      },
      {
        name: "newNativeBalance",
        type: "uint256",
        indexed: false,
        internalType: "uint256",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "SubscriptionOwnerTransferRequested",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        indexed: true,
        internalType: "uint256",
      },
      {
        name: "from",
        type: "address",
        indexed: false,
        internalType: "address",
      },
      {
        name: "to",
        type: "address",
        indexed: false,
        internalType: "address",
      },
    ],
    anonymous: false,
  },
  {
    type: "event",
    name: "SubscriptionOwnerTransferred",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        indexed: true,
        internalType: "uint256",
      },
      {
        name: "from",
        type: "address",
        indexed: false,
        internalType: "address",
      },
      {
        name: "to",
        type: "address",
        indexed: false,
        internalType: "address",
      },
    ],
    anonymous: false,
  },
  {
    type: "error",
    name: "BalanceInvariantViolated",
    inputs: [
      {
        name: "internalBalance",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "externalBalance",
        type: "uint256",
        internalType: "uint256",
      },
    ],
  },
  {
    type: "error",
    name: "FailedToSendNative",
    inputs: [],
  },
  {
    type: "error",
    name: "IndexOutOfRange",
    inputs: [],
  },
  {
    type: "error",
    name: "InsufficientBalance",
    inputs: [],
  },
  {
    type: "error",
    name: "InvalidCalldata",
    inputs: [],
  },
  {
    type: "error",
    name: "InvalidConsumer",
    inputs: [
      {
        name: "subId",
        type: "uint256",
        internalType: "uint256",
      },
      {
        name: "consumer",
        type: "address",
        internalType: "address",
      },
    ],
  },
  {
    type: "error",
    name: "InvalidSubscription",
    inputs: [],
  },
  {
    type: "error",
    name: "MustBeRequestedOwner",
    inputs: [
      {
        name: "proposedOwner",
        type: "address",
        internalType: "address",
      },
    ],
  },
  {
    type: "error",
    name: "MustBeSubOwner",
    inputs: [
      {
        name: "owner",
        type: "address",
        internalType: "address",
      },
    ],
  },
  {
    type: "error",
    name: "PendingRequestExists",
    inputs: [],
  },
  {
    type: "error",
    name: "ReentrancyGuardReentrantCall",
    inputs: [],
  },
  {
    type: "error",
    name: "TooManyConsumers",
    inputs: [],
  },
] as const;

export class BlocklockFeeCollector__factory {
  static readonly abi = _abi;
  static createInterface(): BlocklockFeeCollectorInterface {
    return new Interface(_abi) as BlocklockFeeCollectorInterface;
  }
  static connect(
    address: string,
    runner?: ContractRunner | null
  ): BlocklockFeeCollector {
    return new Contract(
      address,
      _abi,
      runner
    ) as unknown as BlocklockFeeCollector;
  }
}
