"use strict";
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 __());
    };
})();
var __read = (this && this.__read) || function (o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
};
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
    if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
        if (ar || !(i in from)) {
            if (!ar) ar = Array.prototype.slice.call(from, 0, i);
            ar[i] = from[i];
        }
    }
    return to.concat(ar || Array.prototype.slice.call(from));
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Governable__factory = void 0;
/* Autogenerated file. Do not edit manually. */
/* tslint:disable */
/* eslint-disable */
var ethers_1 = require("ethers");
var _abi = [
    {
        inputs: [
            {
                internalType: "address",
                name: "_governor",
                type: "address",
            },
            {
                internalType: "uint32",
                name: "_refreshNonce",
                type: "uint32",
            },
        ],
        stateMutability: "nonpayable",
        type: "constructor",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "previousOwner",
                type: "address",
            },
            {
                indexed: true,
                internalType: "address",
                name: "newOwner",
                type: "address",
            },
            {
                indexed: false,
                internalType: "uint256",
                name: "timestamp",
                type: "uint256",
            },
        ],
        name: "GovernanceOwnershipTransferred",
        type: "event",
    },
    {
        anonymous: false,
        inputs: [
            {
                indexed: true,
                internalType: "address",
                name: "recovered",
                type: "address",
            },
        ],
        name: "RecoveredAddress",
        type: "event",
    },
    {
        inputs: [],
        name: "averageSessionLengthInMillisecs",
        outputs: [
            {
                internalType: "uint64",
                name: "",
                type: "uint64",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "uint32",
                name: "_leafIndex",
                type: "uint32",
            },
            {
                internalType: "address",
                name: "_proposedGovernor",
                type: "address",
            },
            {
                internalType: "bytes32[]",
                name: "_siblingPathNodes",
                type: "bytes32[]",
            },
        ],
        name: "createVote",
        outputs: [
            {
                components: [
                    {
                        internalType: "uint32",
                        name: "leafIndex",
                        type: "uint32",
                    },
                    {
                        internalType: "address",
                        name: "proposedGovernor",
                        type: "address",
                    },
                    {
                        internalType: "bytes32[]",
                        name: "siblingPathNodes",
                        type: "bytes32[]",
                    },
                ],
                internalType: "struct Vote",
                name: "",
                type: "tuple",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [],
        name: "currentVotingPeriod",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "governor",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "isGovernor",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "data",
                type: "bytes",
            },
            {
                internalType: "bytes",
                name: "sig",
                type: "bytes",
            },
        ],
        name: "isSignatureFromGovernor",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "hashedData",
                type: "bytes32",
            },
            {
                internalType: "bytes",
                name: "sig",
                type: "bytes",
            },
        ],
        name: "isSignatureFromGovernorPrehashed",
        outputs: [
            {
                internalType: "bool",
                name: "",
                type: "bool",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "lastGovernorUpdateTime",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes",
                name: "data",
                type: "bytes",
            },
            {
                internalType: "bytes",
                name: "sig",
                type: "bytes",
            },
        ],
        name: "recover",
        outputs: [
            {
                internalType: "address",
                name: "",
                type: "address",
            },
        ],
        stateMutability: "pure",
        type: "function",
    },
    {
        inputs: [],
        name: "refreshNonce",
        outputs: [
            {
                internalType: "uint32",
                name: "",
                type: "uint32",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "renounceOwnership",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "sessionLengthMultiplier",
        outputs: [
            {
                internalType: "uint256",
                name: "",
                type: "uint256",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "address",
                name: "newOwner",
                type: "address",
            },
            {
                internalType: "uint32",
                name: "nonce",
                type: "uint32",
            },
        ],
        name: "transferOwnership",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                internalType: "bytes32",
                name: "_voterMerkleRoot",
                type: "bytes32",
            },
            {
                internalType: "uint64",
                name: "_averageSessionLengthInMillisecs",
                type: "uint64",
            },
            {
                internalType: "uint32",
                name: "_voterCount",
                type: "uint32",
            },
            {
                internalType: "uint32",
                name: "_nonce",
                type: "uint32",
            },
            {
                internalType: "bytes",
                name: "_publicKey",
                type: "bytes",
            },
            {
                internalType: "bytes",
                name: "_sig",
                type: "bytes",
            },
        ],
        name: "transferOwnershipWithSignature",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint32",
                        name: "leafIndex",
                        type: "uint32",
                    },
                    {
                        internalType: "address",
                        name: "proposedGovernor",
                        type: "address",
                    },
                    {
                        internalType: "bytes32[]",
                        name: "siblingPathNodes",
                        type: "bytes32[]",
                    },
                ],
                internalType: "struct Vote",
                name: "vote",
                type: "tuple",
            },
        ],
        name: "voteInFavorForceSetGovernor",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [
            {
                components: [
                    {
                        internalType: "uint32",
                        name: "leafIndex",
                        type: "uint32",
                    },
                    {
                        internalType: "address",
                        name: "proposedGovernor",
                        type: "address",
                    },
                    {
                        internalType: "bytes32[]",
                        name: "siblingPathNodes",
                        type: "bytes32[]",
                    },
                ],
                internalType: "struct Vote[]",
                name: "votes",
                type: "tuple[]",
            },
            {
                internalType: "bytes[]",
                name: "sigs",
                type: "bytes[]",
            },
        ],
        name: "voteInFavorForceSetGovernorWithSig",
        outputs: [],
        stateMutability: "nonpayable",
        type: "function",
    },
    {
        inputs: [],
        name: "voterCount",
        outputs: [
            {
                internalType: "uint32",
                name: "",
                type: "uint32",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
    {
        inputs: [],
        name: "voterMerkleRoot",
        outputs: [
            {
                internalType: "bytes32",
                name: "",
                type: "bytes32",
            },
        ],
        stateMutability: "view",
        type: "function",
    },
];
var _bytecode = " ";
var isSuperArgs = function (xs) { return xs.length > 1; };
var Governable__factory = exports.Governable__factory = /** @class */ (function (_super) {
    __extends(Governable__factory, _super);
    function Governable__factory() {
        var args = [];
        for (var _i = 0; _i < arguments.length; _i++) {
            args[_i] = arguments[_i];
        }
        var _this = this;
        if (isSuperArgs(args)) {
            _this = _super.apply(this, __spreadArray([], __read(args), false)) || this;
        }
        else {
            _this = _super.call(this, _abi, _bytecode, args[0]) || this;
        }
        return _this;
    }
    Governable__factory.prototype.deploy = function (_governor, _refreshNonce, overrides) {
        return _super.prototype.deploy.call(this, _governor, _refreshNonce, overrides || {});
    };
    Governable__factory.prototype.getDeployTransaction = function (_governor, _refreshNonce, overrides) {
        return _super.prototype.getDeployTransaction.call(this, _governor, _refreshNonce, overrides || {});
    };
    Governable__factory.prototype.attach = function (address) {
        return _super.prototype.attach.call(this, address);
    };
    Governable__factory.prototype.connect = function (signer) {
        return _super.prototype.connect.call(this, signer);
    };
    Governable__factory.createInterface = function () {
        return new ethers_1.utils.Interface(_abi);
    };
    Governable__factory.connect = function (address, signerOrProvider) {
        return new ethers_1.Contract(address, _abi, signerOrProvider);
    };
    Governable__factory.bytecode = _bytecode;
    Governable__factory.abi = _abi;
    return Governable__factory;
}(ethers_1.ContractFactory));
