"use strict";
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        if (typeof b !== "function" && b !== null)
            throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
exports.__esModule = true;
exports.Timelock__factory = void 0;
var ethers_1 = require("ethers");
var _abi = [
    {
        inputs: [
            {
                internalType: "address[]",
                name: "cTokens",
                type: "address[]"
            },
        ],
        stateMutability: "nonpayable",
        type: "constructor"
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: "uint256",
                name: "agreementId",
                type: "uint256"
            },
            {
                indexed: false,
                internalType: "enum ITimelock.TimeLockActionType",
                name: "actionType",
                type: "uint8"
            },
            {
                indexed: true,
                internalType: "address",
                name: "asset",
                type: "address"
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "amount",
                type: "uint256"
            },
            {
                indexed: true,
                internalType: "address",
                name: "beneficiary",
                type: "address"
            },
        ],
        name: "AgreementClaimed",
        type: "event"
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: "uint256",
                name: "agreementId",
                type: "uint256"
            },
            {
                indexed: false,
                internalType: "enum ITimelock.TimeLockActionType",
                name: "actionType",
                type: "uint8"
            },
            {
                indexed: true,
                internalType: "address",
                name: "asset",
                type: "address"
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "amount",
                type: "uint256"
            },
            {
                indexed: true,
                internalType: "address",
                name: "beneficiary",
                type: "address"
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "releaseTime",
                type: "uint256"
            },
        ],
        name: "AgreementCreated",
        type: "event"
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: "uint256",
                name: "agreementId",
                type: "uint256"
            },
            {
                indexed: false,
                internalType: "bool",
                name: "value",
                type: "bool"
            },
        ],
        name: "AgreementFrozen",
        type: "event"
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "token",
                type: "address"
            },
            {
                indexed: true,
                internalType: "address",
                name: "to",
                type: "address"
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "amount",
                type: "uint256"
            },
        ],
        name: "RescueERC20",
        type: "event"
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
            {
                indexed: true,
                internalType: "bytes32",
                name: "previousAdminRole",
                type: "bytes32"
            },
            {
                indexed: true,
                internalType: "bytes32",
                name: "newAdminRole",
                type: "bytes32"
            },
        ],
        name: "RoleAdminChanged",
        type: "event"
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
            {
                indexed: true,
                internalType: "address",
                name: "account",
                type: "address"
            },
            {
                indexed: true,
                internalType: "address",
                name: "sender",
                type: "address"
            },
        ],
        name: "RoleGranted",
        type: "event"
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
            {
                indexed: true,
                internalType: "address",
                name: "account",
                type: "address"
            },
            {
                indexed: true,
                internalType: "address",
                name: "sender",
                type: "address"
            },
        ],
        name: "RoleRevoked",
        type: "event"
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: false,
                internalType: "bool",
                name: "value",
                type: "bool"
            },
        ],
        name: "TimeLockFrozen",
        type: "event"
    },
    {
        inputs: [],
        name: "DEFAULT_ADMIN_ROLE",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [],
        name: "EMERGENCY_ADMIN",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [],
        name: "agreementCount",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "",
                type: "address"
            },
        ],
        name: "cTokenToUnderlying",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint256[]",
                name: "agreementIds",
                type: "uint256[]"
            },
        ],
        name: "claim",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "enum ITimelock.TimeLockActionType",
                name: "actionType",
                type: "uint8"
            },
            {
                internalType: "address",
                name: "underlying",
                type: "address"
            },
            {
                internalType: "uint256",
                name: "amount",
                type: "uint256"
            },
            {
                internalType: "address",
                name: "beneficiary",
                type: "address"
            },
        ],
        name: "createAgreement",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256"
            },
        ],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "uint256",
                name: "agreementId",
                type: "uint256"
            },
        ],
        name: "freezeAgreement",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [],
        name: "freezeAllAgreements",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [],
        name: "frozen",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
        ],
        name: "getRoleAdmin",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
            {
                internalType: "uint256",
                name: "index",
                type: "uint256"
            },
        ],
        name: "getRoleMember",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
        ],
        name: "getRoleMemberCount",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
            {
                internalType: "address",
                name: "account",
                type: "address"
            },
        ],
        name: "grantRole",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
            {
                internalType: "address",
                name: "account",
                type: "address"
            },
        ],
        name: "hasRole",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "underlying",
                type: "address"
            },
        ],
        name: "isSupport",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
            {
                internalType: "address",
                name: "account",
                type: "address"
            },
        ],
        name: "renounceRole",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "token",
                type: "address"
            },
            {
                internalType: "address",
                name: "to",
                type: "address"
            },
            {
                internalType: "uint256",
                name: "amount",
                type: "uint256"
            },
        ],
        name: "rescueERC20",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "role",
                type: "bytes32"
            },
            {
                internalType: "address",
                name: "account",
                type: "address"
            },
        ],
        name: "revokeRole",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "underlying",
                type: "address"
            },
            {
                internalType: "uint256",
                name: "lockDuration",
                type: "uint256"
            },
        ],
        name: "setLockDuration",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "cToken",
                type: "address"
            },
            {
                internalType: "address",
                name: "underlying",
                type: "address"
            },
            {
                internalType: "bool",
                name: "isSupport",
                type: "bool"
            },
        ],
        name: "setUnderly",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "bytes4",
                name: "interfaceId",
                type: "bytes4"
            },
        ],
        name: "supportsInterface",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "",
                type: "address"
            },
        ],
        name: "underlyingDetail",
        outputs: [
            {
                internalType: "address",
                name: "cToken",
                type: "address"
            },
            {
                internalType: "uint256",
                name: "totalBalance",
                type: "uint256"
            },
            {
                internalType: "uint256",
                name: "lockDuration",
                type: "uint256"
            },
            {
                internalType: "bool",
                name: "isSupport",
                type: "bool"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address[]",
                name: "underlyings",
                type: "address[]"
            },
        ],
        name: "underlyingDetails",
        outputs: [
            {
                components: [
                    {
                        internalType: "address",
                        name: "cToken",
                        type: "address"
                    },
                    {
                        internalType: "uint256",
                        name: "totalBalance",
                        type: "uint256"
                    },
                    {
                        internalType: "uint256",
                        name: "lockDuration",
                        type: "uint256"
                    },
                    {
                        internalType: "bool",
                        name: "isSupport",
                        type: "bool"
                    },
                ],
                internalType: "struct ITimelock.Underlying[]",
                name: "",
                type: "tuple[]"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        inputs: [],
        name: "unfreezeAllAgreements",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function"
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "user",
                type: "address"
            },
        ],
        name: "userAgreements",
        outputs: [
            {
                components: [
                    {
                        internalType: "uint256",
                        name: "agreementId",
                        type: "uint256"
                    },
                    {
                        internalType: "enum ITimelock.TimeLockActionType",
                        name: "actionType",
                        type: "uint8"
                    },
                    {
                        internalType: "address",
                        name: "underlying",
                        type: "address"
                    },
                    {
                        internalType: "bool",
                        name: "isFrozen",
                        type: "bool"
                    },
                    {
                        internalType: "address",
                        name: "beneficiary",
                        type: "address"
                    },
                    {
                        internalType: "uint256",
                        name: "releaseTime",
                        type: "uint256"
                    },
                    {
                        internalType: "uint256",
                        name: "amount",
                        type: "uint256"
                    },
                ],
                internalType: "struct ITimelock.Agreement[]",
                name: "",
                type: "tuple[]"
            },
        ],
        stateMutability: "view",
        type: "function"
    },
    {
        stateMutability: "payable",
        type: "receive"
    },
];
var _bytecode = " ";
var Timelock__factory = /** @class */ (function (_super) {
    __extends(Timelock__factory, _super);
    function Timelock__factory() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var _this = this;
        if (args.length === 1) {
            _this = _super.call(this, _abi, _bytecode, args[0]) || this;
        }
        else {
            _this = _super.apply(this, args) || this;
        }
        return _this;
    }
    Timelock__factory.prototype.deploy = function (cTokens, overrides) {
        return _super.prototype.deploy.call(this, cTokens, overrides || {});
    };
    Timelock__factory.prototype.getDeployTransaction = function (cTokens, overrides) {
        return _super.prototype.getDeployTransaction.call(this, cTokens, overrides || {});
    };
    Timelock__factory.prototype.attach = function (address) {
        return _super.prototype.attach.call(this, address);
    };
    Timelock__factory.prototype.connect = function (signer) {
        return _super.prototype.connect.call(this, signer);
    };
    Timelock__factory.createInterface = function () {
        return new ethers_1.utils.Interface(_abi);
    };
    Timelock__factory.connect = function (address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    };
    Timelock__factory.bytecode = _bytecode;
    Timelock__factory.abi = _abi;
    return Timelock__factory;
}(ethers_1.ContractFactory));
exports.Timelock__factory = Timelock__factory;
//# sourceMappingURL=Timelock__factory.js.map