"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.RateLimiter__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
const ethers_1 = require("ethers");
const _abi = [
    {
        inputs: [
            {
                internalType: "uint256",
                name: "capacity",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "requested",
                type: "uint256",
            },
        ],
        name: "AggregateValueMaxCapacityExceeded",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "minWaitInSeconds",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "available",
                type: "uint256",
            },
        ],
        name: "AggregateValueRateLimitReached",
        type: "error",
    },
    {
        inputs: [],
        name: "BucketOverfilled",
        type: "error",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "bool",
                        name: "isEnabled",
                        type: "bool",
                    },
                    {
                        internalType: "uint256",
                        name: "capacity",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "rate",
                        type: "uint256",
                    },
                ],
                internalType: "struct RateLimiter.Config",
                name: "config",
                type: "tuple",
            },
        ],
        name: "DisabledNonZeroRateLimit",
        type: "error",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "bool",
                        name: "isEnabled",
                        type: "bool",
                    },
                    {
                        internalType: "uint256",
                        name: "capacity",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "rate",
                        type: "uint256",
                    },
                ],
                internalType: "struct RateLimiter.Config",
                name: "rateLimiterConfig",
                type: "tuple",
            },
        ],
        name: "InvalidRatelimitRate",
        type: "error",
    },
    {
        inputs: [],
        name: "OnlyCallableByAdminOrOwner",
        type: "error",
    },
    {
        inputs: [],
        name: "RateLimitMustBeDisabled",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "capacity",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "requested",
                type: "uint256",
            },
            {
                internalType: "address",
                name: "tokenAddress",
                type: "address",
            },
        ],
        name: "TokenMaxCapacityExceeded",
        type: "error",
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "minWaitInSeconds",
                type: "uint256",
            },
            {
                internalType: "uint256",
                name: "available",
                type: "uint256",
            },
            {
                internalType: "address",
                name: "tokenAddress",
                type: "address",
            },
        ],
        name: "TokenRateLimitReached",
        type: "error",
    },
    {
        anonymous: false,
        inputs: [
            {
                components: [
                    {
                        internalType: "bool",
                        name: "isEnabled",
                        type: "bool",
                    },
                    {
                        internalType: "uint256",
                        name: "capacity",
                        type: "uint256",
                    },
                    {
                        internalType: "uint256",
                        name: "rate",
                        type: "uint256",
                    },
                ],
                indexed: false,
                internalType: "struct RateLimiter.Config",
                name: "config",
                type: "tuple",
            },
        ],
        name: "ConfigChanged",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: "uint256",
                name: "tokens",
                type: "uint256",
            },
        ],
        name: "TokensConsumed",
        type: "event",
    },
];
const _bytecode = "0x60808060405234601757603a9081601d823930815050f35b600080fdfe600080fdfea2646970667358221220207e732af0b2ce14c4e0def6414323bd3c9ed99187880b73c708b9de631b097564736f6c634300081a0033";
const isSuperArgs = (xs) => xs.length > 1;
class RateLimiter__factory extends ethers_1.ContractFactory {
    constructor(...args) {
        if (isSuperArgs(args)) {
            super(...args);
        }
        else {
            super(_abi, _bytecode, args[0]);
        }
    }
    getDeployTransaction(overrides) {
        return super.getDeployTransaction(overrides || {});
    }
    deploy(overrides) {
        return super.deploy(overrides || {});
    }
    connect(runner) {
        return super.connect(runner);
    }
    static createInterface() {
        return new ethers_1.Interface(_abi);
    }
    static connect(address, runner) {
        return new ethers_1.Contract(address, _abi, runner);
    }
}
exports.RateLimiter__factory = RateLimiter__factory;
RateLimiter__factory.bytecode = _bytecode;
RateLimiter__factory.abi = _abi;
//# sourceMappingURL=RateLimiter__factory.js.map