"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
exports.__esModule = true;
exports.IStaking__factory = void 0;
var ethers_1 = require("ethers");
var _abi = [
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "_subgraphDeploymentID",
                type: "bytes32"
            },
            {
                internalType: "uint256",
                name: "_tokens",
                type: "uint256"
            },
            {
                internalType: "address",
                name: "_allocationID",
                type: "address"
            },
            {
                internalType: "bytes32",
                name: "_metadata",
                type: "bytes32"
            },
            {
                internalType: "bytes",
                name: "_proof",
                type: "bytes"
            },
        ],
        name: "allocate",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
            {
                internalType: "bytes32",
                name: "_subgraphDeploymentID",
                type: "bytes32"
            },
            {
                internalType: "uint256",
                name: "_tokens",
                type: "uint256"
            },
            {
                internalType: "address",
                name: "_allocationID",
                type: "address"
            },
            {
                internalType: "bytes32",
                name: "_metadata",
                type: "bytes32"
            },
            {
                internalType: "bytes",
                name: "_proof",
                type: "bytes"
            },
        ],
        name: "allocateFrom",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_allocationID",
                type: "address"
            },
            {
                internalType: "bool",
                name: "_restake",
                type: "bool"
            },
        ],
        name: "claim",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address[]",
                name: "_allocationID",
                type: "address[]"
            },
            {
                internalType: "bool",
                name: "_restake",
                type: "bool"
            },
        ],
        name: "claimMany",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_allocationID",
                type: "address"
            },
            {
                internalType: "bytes32",
                name: "_poi",
                type: "bytes32"
            },
        ],
        name: "closeAllocation",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "allocationID",
                        type: "address"
                    },
                    {
                        internalType: "bytes32",
                        name: "poi",
                        type: "bytes32"
                    },
                ],
                internalType: "struct IStakingData.CloseAllocationRequest[]",
                name: "_requests",
                type: "tuple[]"
            },
        ],
        name: "closeAllocationMany",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_oldAllocationID",
                type: "address"
            },
            {
                internalType: "bytes32",
                name: "_poi",
                type: "bytes32"
            },
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
            {
                internalType: "bytes32",
                name: "_subgraphDeploymentID",
                type: "bytes32"
            },
            {
                internalType: "uint256",
                name: "_tokens",
                type: "uint256"
            },
            {
                internalType: "address",
                name: "_allocationID",
                type: "address"
            },
            {
                internalType: "bytes32",
                name: "_metadata",
                type: "bytes32"
            },
            {
                internalType: "bytes",
                name: "_proof",
                type: "bytes"
            },
        ],
        name: "closeAndAllocate",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_tokens",
                type: "uint256"
            },
            {
                internalType: "address",
                name: "_allocationID",
                type: "address"
            },
        ],
        name: "collect",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
            {
                internalType: "uint256",
                name: "_tokens",
                type: "uint256"
            },
        ],
        name: "delegate",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256"
            },
        ],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_allocationID",
                type: "address"
            },
        ],
        name: "getAllocation",
        outputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "indexer",
                        type: "address"
                    },
                    {
                        internalType: "bytes32",
                        name: "subgraphDeploymentID",
                        type: "bytes32"
                    },
                    {
                        internalType: "uint256",
                        name: "tokens",
                        type: "uint256"
                    },
                    {
                        internalType: "uint256",
                        name: "createdAtEpoch",
                        type: "uint256"
                    },
                    {
                        internalType: "uint256",
                        name: "closedAtEpoch",
                        type: "uint256"
                    },
                    {
                        internalType: "uint256",
                        name: "collectedFees",
                        type: "uint256"
                    },
                    {
                        internalType: "uint256",
                        name: "effectiveAllocation",
                        type: "uint256"
                    },
                    {
                        internalType: "uint256",
                        name: "accRewardsPerAllocatedToken",
                        type: "uint256"
                    },
                ],
                internalType: "struct IStakingData.Allocation",
                name: "",
                type: "tuple"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_allocationID",
                type: "address"
            },
        ],
        name: "getAllocationState",
        outputs: [
            {
                internalType: "enum IStaking.AllocationState",
                name: "",
                type: "uint8"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
            {
                internalType: "address",
                name: "_delegator",
                type: "address"
            },
        ],
        name: "getDelegation",
        outputs: [
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "shares",
                        type: "uint256"
                    },
                    {
                        internalType: "uint256",
                        name: "tokensLocked",
                        type: "uint256"
                    },
                    {
                        internalType: "uint256",
                        name: "tokensLockedUntil",
                        type: "uint256"
                    },
                ],
                internalType: "struct IStakingData.Delegation",
                name: "",
                type: "tuple"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
        ],
        name: "getIndexerCapacity",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
        ],
        name: "getIndexerStakedTokens",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "_subgraphDeploymentID",
                type: "bytes32"
            },
        ],
        name: "getSubgraphAllocatedTokens",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
        ],
        name: "hasStake",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_allocationID",
                type: "address"
            },
        ],
        name: "isAllocation",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
            {
                internalType: "address",
                name: "_delegator",
                type: "address"
            },
        ],
        name: "isDelegator",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_operator",
                type: "address"
            },
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
        ],
        name: "isOperator",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_assetHolder",
                type: "address"
            },
            {
                internalType: "bool",
                name: "_allowed",
                type: "bool"
            },
        ],
        name: "setAssetHolder",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_channelDisputeEpochs",
                type: "uint32"
            },
        ],
        name: "setChannelDisputeEpochs",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_percentage",
                type: "uint32"
            },
        ],
        name: "setCurationPercentage",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_indexingRewardCut",
                type: "uint32"
            },
            {
                internalType: "uint32",
                name: "_queryFeeCut",
                type: "uint32"
            },
            {
                internalType: "uint32",
                name: "_cooldownBlocks",
                type: "uint32"
            },
        ],
        name: "setDelegationParameters",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_blocks",
                type: "uint32"
            },
        ],
        name: "setDelegationParametersCooldown",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_delegationRatio",
                type: "uint32"
            },
        ],
        name: "setDelegationRatio",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_percentage",
                type: "uint32"
            },
        ],
        name: "setDelegationTaxPercentage",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_delegationUnbondingPeriod",
                type: "uint32"
            },
        ],
        name: "setDelegationUnbondingPeriod",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_maxAllocationEpochs",
                type: "uint32"
            },
        ],
        name: "setMaxAllocationEpochs",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_minimumIndexerStake",
                type: "uint256"
            },
        ],
        name: "setMinimumIndexerStake",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_operator",
                type: "address"
            },
            {
                internalType: "bool",
                name: "_allowed",
                type: "bool"
            },
        ],
        name: "setOperator",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_percentage",
                type: "uint32"
            },
        ],
        name: "setProtocolPercentage",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_alphaNumerator",
                type: "uint32"
            },
            {
                internalType: "uint32",
                name: "_alphaDenominator",
                type: "uint32"
            },
        ],
        name: "setRebateRatio",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_destination",
                type: "address"
            },
        ],
        name: "setRewardsDestination",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_slasher",
                type: "address"
            },
            {
                internalType: "bool",
                name: "_allowed",
                type: "bool"
            },
        ],
        name: "setSlasher",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_thawingPeriod",
                type: "uint32"
            },
        ],
        name: "setThawingPeriod",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
            {
                internalType: "uint256",
                name: "_tokens",
                type: "uint256"
            },
            {
                internalType: "uint256",
                name: "_reward",
                type: "uint256"
            },
            {
                internalType: "address",
                name: "_beneficiary",
                type: "address"
            },
        ],
        name: "slash",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_tokens",
                type: "uint256"
            },
        ],
        name: "stake",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
            {
                internalType: "uint256",
                name: "_tokens",
                type: "uint256"
            },
        ],
        name: "stakeTo",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
            {
                internalType: "uint256",
                name: "_shares",
                type: "uint256"
            },
        ],
        name: "undelegate",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256"
            },
        ],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "_tokens",
                type: "uint256"
            },
        ],
        name: "unstake",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [],
        name: "withdraw",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "_indexer",
                type: "address"
            },
            {
                internalType: "address",
                name: "_newIndexer",
                type: "address"
            },
        ],
        name: "withdrawDelegated",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256"
            },
        ],
        stateMutability: "nonpayable",
        type: "function"
    },
];
var IStaking__factory = /** @class */ (function () {
    function IStaking__factory() {
    }
    IStaking__factory.createInterface = function () {
        return new ethers_1.utils.Interface(_abi);
    };
    IStaking__factory.connect = function (address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    };
    IStaking__factory.abi = _abi;
    return IStaking__factory;
}());
exports.IStaking__factory = IStaking__factory;
