ETH Price: $3,845.36 (-1.18%)
Gas: 6 Gwei

Contract

0x323A76393544d5ecca80cd6ef2A560C6a395b7E3
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

TokenTracker

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Execute196471832024-04-13 14:15:5945 days ago1713017759IN
ENS: Governance
0 ETH0.0023884414.84804357
Execute196435622024-04-13 2:04:2345 days ago1712973863IN
ENS: Governance
0 ETH0.0070475319.8552805
Queue196326132024-04-11 13:15:5947 days ago1712841359IN
ENS: Governance
0 ETH0.0037400125.19357548
Queue196292832024-04-11 2:03:3547 days ago1712801015IN
ENS: Governance
0 ETH0.0026443514.45776001
Cast Vote196292132024-04-11 1:49:3547 days ago1712800175IN
ENS: Governance
0 ETH0.0008915112.34972792
Cast Vote By Sig196273592024-04-10 19:36:5948 days ago1712777819IN
ENS: Governance
0 ETH0.0020050223.52625528
Cast Vote By Sig196271422024-04-10 18:53:2348 days ago1712775203IN
ENS: Governance
0 ETH0.0021798625.57415013
Cast Vote By Sig196265462024-04-10 16:53:4748 days ago1712768027IN
ENS: Governance
0 ETH0.0029818734.97518147
Cast Vote By Sig196265422024-04-10 16:52:5948 days ago1712767979IN
ENS: Governance
0 ETH0.0028031532.89123599
Cast Vote196244432024-04-10 9:49:2348 days ago1712742563IN
ENS: Governance
0 ETH0.0009324714.17631816
Cast Vote196244402024-04-10 9:48:4748 days ago1712742527IN
ENS: Governance
0 ETH0.000942414.32726206
Cast Vote196237462024-04-10 7:29:1148 days ago1712734151IN
ENS: Governance
0 ETH0.000924212.80253981
Cast Vote196237432024-04-10 7:28:3548 days ago1712734115IN
ENS: Governance
0 ETH0.0009930513.75635987
Cast Vote196234512024-04-10 6:29:5948 days ago1712730599IN
ENS: Governance
0 ETH0.0010106414
Cast Vote196234422024-04-10 6:28:1148 days ago1712730491IN
ENS: Governance
0 ETH0.0010106414
Cast Vote196234242024-04-10 6:24:3548 days ago1712730275IN
ENS: Governance
0 ETH0.0010106414
Cast Vote196234052024-04-10 6:20:4748 days ago1712730047IN
ENS: Governance
0 ETH0.0010106414
Cast Vote196229592024-04-10 4:51:1148 days ago1712724671IN
ENS: Governance
0 ETH0.0007893212
Cast Vote By Sig196207082024-04-09 21:17:1149 days ago1712697431IN
ENS: Governance
0 ETH0.0025963423.73497471
Cast Vote By Sig196207042024-04-09 21:16:2349 days ago1712697383IN
ENS: Governance
0 ETH0.0027178624.84406936
Cast Vote196203992024-04-09 20:14:5949 days ago1712693699IN
ENS: Governance
0 ETH0.0024509425.39181594
Cast Vote By Sig196194962024-04-09 17:13:1149 days ago1712682791IN
ENS: Governance
0 ETH0.0036379345.94919595
Cast Vote By Sig196194952024-04-09 17:12:5949 days ago1712682779IN
ENS: Governance
0 ETH0.0044597945.77671738
Cast Vote By Sig196194852024-04-09 17:10:4749 days ago1712682647IN
ENS: Governance
0 ETH0.0032237640.72412816
Cast Vote By Sig196194792024-04-09 17:09:3549 days ago1712682575IN
ENS: Governance
0 ETH0.0040611941.68537583
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ENSGovernor

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

Other Settings:
default evmVersion, MIT license
File 1 of 29 : ENSGovernor.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "@openzeppelin/contracts/governance/Governor.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorProposalThreshold.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorCountingSimple.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotes.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorVotesQuorumFraction.sol";
import "@openzeppelin/contracts/governance/extensions/GovernorTimelockControl.sol";

contract ENSGovernor is Governor, GovernorProposalThreshold, GovernorCountingSimple, GovernorVotes, GovernorVotesQuorumFraction, GovernorTimelockControl {
    constructor(ERC20Votes _token, TimelockController _timelock)
        Governor("ENS Governor")
        GovernorVotes(_token)
        GovernorVotesQuorumFraction(100) // 1%
        GovernorTimelockControl(_timelock)
    {}

    function votingDelay() public pure override returns (uint256) {
        return 1; // 1 block
    }

    function votingPeriod() public pure override returns (uint256) {
        return 45818; // 1 week
    }

    function proposalThreshold() public pure override returns (uint256) {
        return 100_000e18;
    }

    function quorumDenominator() public pure virtual override returns (uint256) {
        return 10000;
    }

    // The following functions are overrides required by Solidity.

    function quorum(uint256 blockNumber)
        public
        view
        override(IGovernor, GovernorVotesQuorumFraction)
        returns (uint256)
    {
        return super.quorum(blockNumber);
    }

    function getVotes(address account, uint256 blockNumber)
        public
        view
        override(IGovernor, GovernorVotes)
        returns (uint256)
    {
        return super.getVotes(account, blockNumber);
    }

    function state(uint256 proposalId)
        public
        view
        override(Governor, GovernorTimelockControl)
        returns (ProposalState)
    {
        return super.state(proposalId);
    }

    function propose(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, string memory description)
        public
        override(Governor, GovernorProposalThreshold, IGovernor)
        returns (uint256)
    {
        return super.propose(targets, values, calldatas, description);
    }

    function _execute(uint256 proposalId, address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)
        internal
        override(Governor, GovernorTimelockControl)
    {
        super._execute(proposalId, targets, values, calldatas, descriptionHash);
    }

    function _cancel(address[] memory targets, uint256[] memory values, bytes[] memory calldatas, bytes32 descriptionHash)
        internal
        override(Governor, GovernorTimelockControl)
        returns (uint256)
    {
        return super._cancel(targets, values, calldatas, descriptionHash);
    }

    function _executor()
        internal
        view
        override(Governor, GovernorTimelockControl)
        returns (address)
    {
        return super._executor();
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(Governor, GovernorTimelockControl)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}

File 2 of 29 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 29 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 4 of 29 : Governor.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/cryptography/ECDSA.sol";
import "../utils/cryptography/draft-EIP712.sol";
import "../utils/introspection/ERC165.sol";
import "../utils/math/SafeCast.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";
import "../utils/Timers.sol";
import "./IGovernor.sol";

/**
 * @dev Core of the governance system, designed to be extended though various modules.
 *
 * This contract is abstract and requires several function to be implemented in various modules:
 *
 * - A counting module must implement {quorum}, {_quorumReached}, {_voteSucceeded} and {_countVote}
 * - A voting module must implement {getVotes}
 * - Additionanly, the {votingPeriod} must also be implemented
 *
 * _Available since v4.3._
 */
abstract contract Governor is Context, ERC165, EIP712, IGovernor {
    using SafeCast for uint256;
    using Timers for Timers.BlockNumber;

    bytes32 public constant BALLOT_TYPEHASH = keccak256("Ballot(uint256 proposalId,uint8 support)");

    struct ProposalCore {
        Timers.BlockNumber voteStart;
        Timers.BlockNumber voteEnd;
        bool executed;
        bool canceled;
    }

    string private _name;

    mapping(uint256 => ProposalCore) private _proposals;

    /**
     * @dev Restrict access to governor executing address. Some module might override the _executor function to make
     * sure this modifier is consistant with the execution model.
     */
    modifier onlyGovernance() {
        require(_msgSender() == _executor(), "Governor: onlyGovernance");
        _;
    }

    /**
     * @dev Sets the value for {name} and {version}
     */
    constructor(string memory name_) EIP712(name_, version()) {
        _name = name_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) {
        return interfaceId == type(IGovernor).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IGovernor-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IGovernor-version}.
     */
    function version() public view virtual override returns (string memory) {
        return "1";
    }

    /**
     * @dev See {IGovernor-hashProposal}.
     *
     * The proposal id is produced by hashing the RLC encoded `targets` array, the `values` array, the `calldatas` array
     * and the descriptionHash (bytes32 which itself is the keccak256 hash of the description string). This proposal id
     * can be produced from the proposal data which is part of the {ProposalCreated} event. It can even be computed in
     * advance, before the proposal is submitted.
     *
     * Note that the chainId and the governor address are not part of the proposal id computation. Consequently, the
     * same proposal (with same operation and same description) will have the same id if submitted on multiple governors
     * accross multiple networks. This also means that in order to execute the same operation twice (on the same
     * governor) the proposer will have to change the description in order to avoid proposal id conflicts.
     */
    function hashProposal(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public pure virtual override returns (uint256) {
        return uint256(keccak256(abi.encode(targets, values, calldatas, descriptionHash)));
    }

    /**
     * @dev See {IGovernor-state}.
     */
    function state(uint256 proposalId) public view virtual override returns (ProposalState) {
        ProposalCore memory proposal = _proposals[proposalId];

        if (proposal.executed) {
            return ProposalState.Executed;
        } else if (proposal.canceled) {
            return ProposalState.Canceled;
        } else if (proposal.voteStart.isPending()) {
            return ProposalState.Pending;
        } else if (proposal.voteEnd.isPending()) {
            return ProposalState.Active;
        } else if (proposal.voteEnd.isExpired()) {
            return
                _quorumReached(proposalId) && _voteSucceeded(proposalId)
                    ? ProposalState.Succeeded
                    : ProposalState.Defeated;
        } else {
            revert("Governor: unknown proposal id");
        }
    }

    /**
     * @dev See {IGovernor-proposalSnapshot}.
     */
    function proposalSnapshot(uint256 proposalId) public view virtual override returns (uint256) {
        return _proposals[proposalId].voteStart.getDeadline();
    }

    /**
     * @dev See {IGovernor-proposalDeadline}.
     */
    function proposalDeadline(uint256 proposalId) public view virtual override returns (uint256) {
        return _proposals[proposalId].voteEnd.getDeadline();
    }

    /**
     * @dev Amount of votes already cast passes the threshold limit.
     */
    function _quorumReached(uint256 proposalId) internal view virtual returns (bool);

    /**
     * @dev Is the proposal successful or not.
     */
    function _voteSucceeded(uint256 proposalId) internal view virtual returns (bool);

    /**
     * @dev Register a vote with a given support and voting weight.
     *
     * Note: Support is generic and can represent various things depending on the voting system used.
     */
    function _countVote(
        uint256 proposalId,
        address account,
        uint8 support,
        uint256 weight
    ) internal virtual;

    /**
     * @dev See {IGovernor-propose}.
     */
    function propose(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        string memory description
    ) public virtual override returns (uint256) {
        uint256 proposalId = hashProposal(targets, values, calldatas, keccak256(bytes(description)));

        require(targets.length == values.length, "Governor: invalid proposal length");
        require(targets.length == calldatas.length, "Governor: invalid proposal length");
        require(targets.length > 0, "Governor: empty proposal");

        ProposalCore storage proposal = _proposals[proposalId];
        require(proposal.voteStart.isUnset(), "Governor: proposal already exists");

        uint64 snapshot = block.number.toUint64() + votingDelay().toUint64();
        uint64 deadline = snapshot + votingPeriod().toUint64();

        proposal.voteStart.setDeadline(snapshot);
        proposal.voteEnd.setDeadline(deadline);

        emit ProposalCreated(
            proposalId,
            _msgSender(),
            targets,
            values,
            new string[](targets.length),
            calldatas,
            snapshot,
            deadline,
            description
        );

        return proposalId;
    }

    /**
     * @dev See {IGovernor-execute}.
     */
    function execute(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public payable virtual override returns (uint256) {
        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);

        ProposalState status = state(proposalId);
        require(
            status == ProposalState.Succeeded || status == ProposalState.Queued,
            "Governor: proposal not successful"
        );
        _proposals[proposalId].executed = true;

        emit ProposalExecuted(proposalId);

        _execute(proposalId, targets, values, calldatas, descriptionHash);

        return proposalId;
    }

    /**
     * @dev Internal execution mechanism. Can be overriden to implement different execution mechanism
     */
    function _execute(
        uint256, /* proposalId */
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 /*descriptionHash*/
    ) internal virtual {
        string memory errorMessage = "Governor: call reverted without message";
        for (uint256 i = 0; i < targets.length; ++i) {
            (bool success, bytes memory returndata) = targets[i].call{value: values[i]}(calldatas[i]);
            Address.verifyCallResult(success, returndata, errorMessage);
        }
    }

    /**
     * @dev Internal cancel mechanism: locks up the proposal timer, preventing it from being re-submitted. Marks it as
     * canceled to allow distinguishing it from executed proposals.
     *
     * Emits a {IGovernor-ProposalCanceled} event.
     */
    function _cancel(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) internal virtual returns (uint256) {
        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);
        ProposalState status = state(proposalId);

        require(
            status != ProposalState.Canceled && status != ProposalState.Expired && status != ProposalState.Executed,
            "Governor: proposal not active"
        );
        _proposals[proposalId].canceled = true;

        emit ProposalCanceled(proposalId);

        return proposalId;
    }

    /**
     * @dev See {IGovernor-castVote}.
     */
    function castVote(uint256 proposalId, uint8 support) public virtual override returns (uint256) {
        address voter = _msgSender();
        return _castVote(proposalId, voter, support, "");
    }

    /**
     * @dev See {IGovernor-castVoteWithReason}.
     */
    function castVoteWithReason(
        uint256 proposalId,
        uint8 support,
        string calldata reason
    ) public virtual override returns (uint256) {
        address voter = _msgSender();
        return _castVote(proposalId, voter, support, reason);
    }

    /**
     * @dev See {IGovernor-castVoteBySig}.
     */
    function castVoteBySig(
        uint256 proposalId,
        uint8 support,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override returns (uint256) {
        address voter = ECDSA.recover(
            _hashTypedDataV4(keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support))),
            v,
            r,
            s
        );
        return _castVote(proposalId, voter, support, "");
    }

    /**
     * @dev Internal vote casting mechanism: Check that the vote is pending, that it has not been cast yet, retrieve
     * voting weight using {IGovernor-getVotes} and call the {_countVote} internal function.
     *
     * Emits a {IGovernor-VoteCast} event.
     */
    function _castVote(
        uint256 proposalId,
        address account,
        uint8 support,
        string memory reason
    ) internal virtual returns (uint256) {
        ProposalCore storage proposal = _proposals[proposalId];
        require(state(proposalId) == ProposalState.Active, "Governor: vote not currently active");

        uint256 weight = getVotes(account, proposal.voteStart.getDeadline());
        _countVote(proposalId, account, support, weight);

        emit VoteCast(account, proposalId, support, weight, reason);

        return weight;
    }

    /**
     * @dev Address through which the governor executes action. Will be overloaded by module that execute actions
     * through another contract such as a timelock.
     */
    function _executor() internal view virtual returns (address) {
        return address(this);
    }
}

File 5 of 29 : IGovernor.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../utils/introspection/ERC165.sol";

/**
 * @dev Interface of the {Governor} core.
 *
 * _Available since v4.3._
 */
abstract contract IGovernor is IERC165 {
    enum ProposalState {
        Pending,
        Active,
        Canceled,
        Defeated,
        Succeeded,
        Queued,
        Expired,
        Executed
    }

    /**
     * @dev Emitted when a proposal is created.
     */
    event ProposalCreated(
        uint256 proposalId,
        address proposer,
        address[] targets,
        uint256[] values,
        string[] signatures,
        bytes[] calldatas,
        uint256 startBlock,
        uint256 endBlock,
        string description
    );

    /**
     * @dev Emitted when a proposal is canceled.
     */
    event ProposalCanceled(uint256 proposalId);

    /**
     * @dev Emitted when a proposal is executed.
     */
    event ProposalExecuted(uint256 proposalId);

    /**
     * @dev Emitted when a vote is cast.
     *
     * Note: `support` values should be seen as buckets. There interpretation depends on the voting module used.
     */
    event VoteCast(address indexed voter, uint256 proposalId, uint8 support, uint256 weight, string reason);

    /**
     * @notice module:core
     * @dev Name of the governor instance (used in building the ERC712 domain separator).
     */
    function name() public view virtual returns (string memory);

    /**
     * @notice module:core
     * @dev Version of the governor instance (used in building the ERC712 domain separator). Default: "1"
     */
    function version() public view virtual returns (string memory);

    /**
     * @notice module:voting
     * @dev A description of the possible `support` values for {castVote} and the way these votes are counted, meant to
     * be consumed by UIs to show correct vote options and interpret the results. The string is a URL-encoded sequence of
     * key-value pairs that each describe one aspect, for example `support=bravo&quorum=for,abstain`.
     *
     * There are 2 standard keys: `support` and `quorum`.
     *
     * - `support=bravo` refers to the vote options 0 = For, 1 = Against, 2 = Abstain, as in `GovernorBravo`.
     * - `quorum=bravo` means that only For votes are counted towards quorum.
     * - `quorum=for,abstain` means that both For and Abstain votes are counted towards quorum.
     *
     * NOTE: The string can be decoded by the standard
     * https://developer.mozilla.org/en-US/docs/Web/API/URLSearchParams[`URLSearchParams`]
     * JavaScript class.
     */
    // solhint-disable-next-line func-name-mixedcase
    function COUNTING_MODE() public pure virtual returns (string memory);

    /**
     * @notice module:core
     * @dev Hashing function used to (re)build the proposal id from the proposal details..
     */
    function hashProposal(
        address[] calldata targets,
        uint256[] calldata values,
        bytes[] calldata calldatas,
        bytes32 descriptionHash
    ) public pure virtual returns (uint256);

    /**
     * @notice module:core
     * @dev Current state of a proposal, following Compound's convention
     */
    function state(uint256 proposalId) public view virtual returns (ProposalState);

    /**
     * @notice module:core
     * @dev block number used to retrieve user's votes and quorum.
     */
    function proposalSnapshot(uint256 proposalId) public view virtual returns (uint256);

    /**
     * @notice module:core
     * @dev timestamp at which votes close.
     */
    function proposalDeadline(uint256 proposalId) public view virtual returns (uint256);

    /**
     * @notice module:user-config
     * @dev delay, in number of block, between the proposal is created and the vote starts. This can be increassed to
     * leave time for users to buy voting power, of delegate it, before the voting of a proposal starts.
     */
    function votingDelay() public view virtual returns (uint256);

    /**
     * @notice module:user-config
     * @dev delay, in number of blocks, between the vote start and vote ends.
     *
     * Note: the {votingDelay} can delay the start of the vote. This must be considered when setting the voting
     * duration compared to the voting delay.
     */
    function votingPeriod() public view virtual returns (uint256);

    /**
     * @notice module:user-config
     * @dev Minimum number of cast voted required for a proposal to be successful.
     *
     * Note: The `blockNumber` parameter corresponds to the snaphot used for counting vote. This allows to scale the
     * quroum depending on values such as the totalSupply of a token at this block (see {ERC20Votes}).
     */
    function quorum(uint256 blockNumber) public view virtual returns (uint256);

    /**
     * @notice module:reputation
     * @dev Voting power of an `account` at a specific `blockNumber`.
     *
     * Note: this can be implemented in a number of ways, for example by reading the delegated balance from one (or
     * multiple), {ERC20Votes} tokens.
     */
    function getVotes(address account, uint256 blockNumber) public view virtual returns (uint256);

    /**
     * @notice module:voting
     * @dev Returns weither `account` has cast a vote on `proposalId`.
     */
    function hasVoted(uint256 proposalId, address account) public view virtual returns (bool);

    /**
     * @dev Create a new proposal. Vote start {IGovernor-votingDelay} blocks after the proposal is created and ends
     * {IGovernor-votingPeriod} blocks after the voting starts.
     *
     * Emits a {ProposalCreated} event.
     */
    function propose(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        string memory description
    ) public virtual returns (uint256 proposalId);

    /**
     * @dev Execute a successful proposal. This requires the quorum to be reached, the vote to be successful, and the
     * deadline to be reached.
     *
     * Emits a {ProposalExecuted} event.
     *
     * Note: some module can modify the requirements for execution, for example by adding an additional timelock.
     */
    function execute(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public payable virtual returns (uint256 proposalId);

    /**
     * @dev Cast a vote
     *
     * Emits a {VoteCast} event.
     */
    function castVote(uint256 proposalId, uint8 support) public virtual returns (uint256 balance);

    /**
     * @dev Cast a with a reason
     *
     * Emits a {VoteCast} event.
     */
    function castVoteWithReason(
        uint256 proposalId,
        uint8 support,
        string calldata reason
    ) public virtual returns (uint256 balance);

    /**
     * @dev Cast a vote using the user cryptographic signature.
     *
     * Emits a {VoteCast} event.
     */
    function castVoteBySig(
        uint256 proposalId,
        uint8 support,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual returns (uint256 balance);
}

File 6 of 29 : TimelockController.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../access/AccessControl.sol";

/**
 * @dev Contract module which acts as a timelocked controller. When set as the
 * owner of an `Ownable` smart contract, it enforces a timelock on all
 * `onlyOwner` maintenance operations. This gives time for users of the
 * controlled contract to exit before a potentially dangerous maintenance
 * operation is applied.
 *
 * By default, this contract is self administered, meaning administration tasks
 * have to go through the timelock process. The proposer (resp executor) role
 * is in charge of proposing (resp executing) operations. A common use case is
 * to position this {TimelockController} as the owner of a smart contract, with
 * a multisig or a DAO as the sole proposer.
 *
 * _Available since v3.3._
 */
contract TimelockController is AccessControl {
    bytes32 public constant TIMELOCK_ADMIN_ROLE = keccak256("TIMELOCK_ADMIN_ROLE");
    bytes32 public constant PROPOSER_ROLE = keccak256("PROPOSER_ROLE");
    bytes32 public constant EXECUTOR_ROLE = keccak256("EXECUTOR_ROLE");
    uint256 internal constant _DONE_TIMESTAMP = uint256(1);

    mapping(bytes32 => uint256) private _timestamps;
    uint256 private _minDelay;

    /**
     * @dev Emitted when a call is scheduled as part of operation `id`.
     */
    event CallScheduled(
        bytes32 indexed id,
        uint256 indexed index,
        address target,
        uint256 value,
        bytes data,
        bytes32 predecessor,
        uint256 delay
    );

    /**
     * @dev Emitted when a call is performed as part of operation `id`.
     */
    event CallExecuted(bytes32 indexed id, uint256 indexed index, address target, uint256 value, bytes data);

    /**
     * @dev Emitted when operation `id` is cancelled.
     */
    event Cancelled(bytes32 indexed id);

    /**
     * @dev Emitted when the minimum delay for future operations is modified.
     */
    event MinDelayChange(uint256 oldDuration, uint256 newDuration);

    /**
     * @dev Initializes the contract with a given `minDelay`.
     */
    constructor(
        uint256 minDelay,
        address[] memory proposers,
        address[] memory executors
    ) {
        _setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE);
        _setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE);
        _setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE);

        // deployer + self administration
        _setupRole(TIMELOCK_ADMIN_ROLE, _msgSender());
        _setupRole(TIMELOCK_ADMIN_ROLE, address(this));

        // register proposers
        for (uint256 i = 0; i < proposers.length; ++i) {
            _setupRole(PROPOSER_ROLE, proposers[i]);
        }

        // register executors
        for (uint256 i = 0; i < executors.length; ++i) {
            _setupRole(EXECUTOR_ROLE, executors[i]);
        }

        _minDelay = minDelay;
        emit MinDelayChange(0, minDelay);
    }

    /**
     * @dev Modifier to make a function callable only by a certain role. In
     * addition to checking the sender's role, `address(0)` 's role is also
     * considered. Granting a role to `address(0)` is equivalent to enabling
     * this role for everyone.
     */
    modifier onlyRoleOrOpenRole(bytes32 role) {
        if (!hasRole(role, address(0))) {
            _checkRole(role, _msgSender());
        }
        _;
    }

    /**
     * @dev Contract might receive/hold ETH as part of the maintenance process.
     */
    receive() external payable {}

    /**
     * @dev Returns whether an id correspond to a registered operation. This
     * includes both Pending, Ready and Done operations.
     */
    function isOperation(bytes32 id) public view virtual returns (bool pending) {
        return getTimestamp(id) > 0;
    }

    /**
     * @dev Returns whether an operation is pending or not.
     */
    function isOperationPending(bytes32 id) public view virtual returns (bool pending) {
        return getTimestamp(id) > _DONE_TIMESTAMP;
    }

    /**
     * @dev Returns whether an operation is ready or not.
     */
    function isOperationReady(bytes32 id) public view virtual returns (bool ready) {
        uint256 timestamp = getTimestamp(id);
        return timestamp > _DONE_TIMESTAMP && timestamp <= block.timestamp;
    }

    /**
     * @dev Returns whether an operation is done or not.
     */
    function isOperationDone(bytes32 id) public view virtual returns (bool done) {
        return getTimestamp(id) == _DONE_TIMESTAMP;
    }

    /**
     * @dev Returns the timestamp at with an operation becomes ready (0 for
     * unset operations, 1 for done operations).
     */
    function getTimestamp(bytes32 id) public view virtual returns (uint256 timestamp) {
        return _timestamps[id];
    }

    /**
     * @dev Returns the minimum delay for an operation to become valid.
     *
     * This value can be changed by executing an operation that calls `updateDelay`.
     */
    function getMinDelay() public view virtual returns (uint256 duration) {
        return _minDelay;
    }

    /**
     * @dev Returns the identifier of an operation containing a single
     * transaction.
     */
    function hashOperation(
        address target,
        uint256 value,
        bytes calldata data,
        bytes32 predecessor,
        bytes32 salt
    ) public pure virtual returns (bytes32 hash) {
        return keccak256(abi.encode(target, value, data, predecessor, salt));
    }

    /**
     * @dev Returns the identifier of an operation containing a batch of
     * transactions.
     */
    function hashOperationBatch(
        address[] calldata targets,
        uint256[] calldata values,
        bytes[] calldata datas,
        bytes32 predecessor,
        bytes32 salt
    ) public pure virtual returns (bytes32 hash) {
        return keccak256(abi.encode(targets, values, datas, predecessor, salt));
    }

    /**
     * @dev Schedule an operation containing a single transaction.
     *
     * Emits a {CallScheduled} event.
     *
     * Requirements:
     *
     * - the caller must have the 'proposer' role.
     */
    function schedule(
        address target,
        uint256 value,
        bytes calldata data,
        bytes32 predecessor,
        bytes32 salt,
        uint256 delay
    ) public virtual onlyRole(PROPOSER_ROLE) {
        bytes32 id = hashOperation(target, value, data, predecessor, salt);
        _schedule(id, delay);
        emit CallScheduled(id, 0, target, value, data, predecessor, delay);
    }

    /**
     * @dev Schedule an operation containing a batch of transactions.
     *
     * Emits one {CallScheduled} event per transaction in the batch.
     *
     * Requirements:
     *
     * - the caller must have the 'proposer' role.
     */
    function scheduleBatch(
        address[] calldata targets,
        uint256[] calldata values,
        bytes[] calldata datas,
        bytes32 predecessor,
        bytes32 salt,
        uint256 delay
    ) public virtual onlyRole(PROPOSER_ROLE) {
        require(targets.length == values.length, "TimelockController: length mismatch");
        require(targets.length == datas.length, "TimelockController: length mismatch");

        bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);
        _schedule(id, delay);
        for (uint256 i = 0; i < targets.length; ++i) {
            emit CallScheduled(id, i, targets[i], values[i], datas[i], predecessor, delay);
        }
    }

    /**
     * @dev Schedule an operation that is to becomes valid after a given delay.
     */
    function _schedule(bytes32 id, uint256 delay) private {
        require(!isOperation(id), "TimelockController: operation already scheduled");
        require(delay >= getMinDelay(), "TimelockController: insufficient delay");
        _timestamps[id] = block.timestamp + delay;
    }

    /**
     * @dev Cancel an operation.
     *
     * Requirements:
     *
     * - the caller must have the 'proposer' role.
     */
    function cancel(bytes32 id) public virtual onlyRole(PROPOSER_ROLE) {
        require(isOperationPending(id), "TimelockController: operation cannot be cancelled");
        delete _timestamps[id];

        emit Cancelled(id);
    }

    /**
     * @dev Execute an (ready) operation containing a single transaction.
     *
     * Emits a {CallExecuted} event.
     *
     * Requirements:
     *
     * - the caller must have the 'executor' role.
     */
    function execute(
        address target,
        uint256 value,
        bytes calldata data,
        bytes32 predecessor,
        bytes32 salt
    ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) {
        bytes32 id = hashOperation(target, value, data, predecessor, salt);
        _beforeCall(id, predecessor);
        _call(id, 0, target, value, data);
        _afterCall(id);
    }

    /**
     * @dev Execute an (ready) operation containing a batch of transactions.
     *
     * Emits one {CallExecuted} event per transaction in the batch.
     *
     * Requirements:
     *
     * - the caller must have the 'executor' role.
     */
    function executeBatch(
        address[] calldata targets,
        uint256[] calldata values,
        bytes[] calldata datas,
        bytes32 predecessor,
        bytes32 salt
    ) public payable virtual onlyRoleOrOpenRole(EXECUTOR_ROLE) {
        require(targets.length == values.length, "TimelockController: length mismatch");
        require(targets.length == datas.length, "TimelockController: length mismatch");

        bytes32 id = hashOperationBatch(targets, values, datas, predecessor, salt);
        _beforeCall(id, predecessor);
        for (uint256 i = 0; i < targets.length; ++i) {
            _call(id, i, targets[i], values[i], datas[i]);
        }
        _afterCall(id);
    }

    /**
     * @dev Checks before execution of an operation's calls.
     */
    function _beforeCall(bytes32 id, bytes32 predecessor) private view {
        require(isOperationReady(id), "TimelockController: operation is not ready");
        require(predecessor == bytes32(0) || isOperationDone(predecessor), "TimelockController: missing dependency");
    }

    /**
     * @dev Checks after execution of an operation's calls.
     */
    function _afterCall(bytes32 id) private {
        require(isOperationReady(id), "TimelockController: operation is not ready");
        _timestamps[id] = _DONE_TIMESTAMP;
    }

    /**
     * @dev Execute an operation's call.
     *
     * Emits a {CallExecuted} event.
     */
    function _call(
        bytes32 id,
        uint256 index,
        address target,
        uint256 value,
        bytes calldata data
    ) private {
        (bool success, ) = target.call{value: value}(data);
        require(success, "TimelockController: underlying transaction reverted");

        emit CallExecuted(id, index, target, value, data);
    }

    /**
     * @dev Changes the minimum timelock duration for future operations.
     *
     * Emits a {MinDelayChange} event.
     *
     * Requirements:
     *
     * - the caller must be the timelock itself. This can only be achieved by scheduling and later executing
     * an operation where the timelock is the target and the data is the ABI-encoded call to this function.
     */
    function updateDelay(uint256 newDelay) external virtual {
        require(msg.sender == address(this), "TimelockController: caller must be timelock");
        emit MinDelayChange(_minDelay, newDelay);
        _minDelay = newDelay;
    }
}

File 7 of 29 : GovernorCountingSimple.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../Governor.sol";

/**
 * @dev Extension of {Governor} for simple, 3 options, vote counting.
 *
 * _Available since v4.3._
 */
abstract contract GovernorCountingSimple is Governor {
    /**
     * @dev Supported vote types. Matches Governor Bravo ordering.
     */
    enum VoteType {
        Against,
        For,
        Abstain
    }

    struct ProposalVote {
        uint256 againstVotes;
        uint256 forVotes;
        uint256 abstainVotes;
        mapping(address => bool) hasVoted;
    }

    mapping(uint256 => ProposalVote) private _proposalVotes;

    /**
     * @dev See {IGovernor-COUNTING_MODE}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function COUNTING_MODE() public pure virtual override returns (string memory) {
        return "support=bravo&quorum=for,abstain";
    }

    /**
     * @dev See {IGovernor-hasVoted}.
     */
    function hasVoted(uint256 proposalId, address account) public view virtual override returns (bool) {
        return _proposalVotes[proposalId].hasVoted[account];
    }

    /**
     * @dev Accessor to the internal vote counts.
     */
    function proposalVotes(uint256 proposalId)
        public
        view
        virtual
        returns (
            uint256 againstVotes,
            uint256 forVotes,
            uint256 abstainVotes
        )
    {
        ProposalVote storage proposalvote = _proposalVotes[proposalId];
        return (proposalvote.againstVotes, proposalvote.forVotes, proposalvote.abstainVotes);
    }

    /**
     * @dev See {Governor-_quorumReached}.
     */
    function _quorumReached(uint256 proposalId) internal view virtual override returns (bool) {
        ProposalVote storage proposalvote = _proposalVotes[proposalId];

        return quorum(proposalSnapshot(proposalId)) <= proposalvote.forVotes + proposalvote.abstainVotes;
    }

    /**
     * @dev See {Governor-_voteSucceeded}. In this module, the forVotes must be scritly over the againstVotes.
     */
    function _voteSucceeded(uint256 proposalId) internal view virtual override returns (bool) {
        ProposalVote storage proposalvote = _proposalVotes[proposalId];

        return proposalvote.forVotes > proposalvote.againstVotes;
    }

    /**
     * @dev See {Governor-_countVote}. In this module, the support follows the `VoteType` enum (from Governor Bravo).
     */
    function _countVote(
        uint256 proposalId,
        address account,
        uint8 support,
        uint256 weight
    ) internal virtual override {
        ProposalVote storage proposalvote = _proposalVotes[proposalId];

        require(!proposalvote.hasVoted[account], "GovernorVotingSimple: vote already cast");
        proposalvote.hasVoted[account] = true;

        if (support == uint8(VoteType.Against)) {
            proposalvote.againstVotes += weight;
        } else if (support == uint8(VoteType.For)) {
            proposalvote.forVotes += weight;
        } else if (support == uint8(VoteType.Abstain)) {
            proposalvote.abstainVotes += weight;
        } else {
            revert("GovernorVotingSimple: invalid value for enum VoteType");
        }
    }
}

File 8 of 29 : GovernorProposalThreshold.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../Governor.sol";

/**
 * @dev Extension of {Governor} for proposal restriction to token holders with a minimum balance.
 *
 * _Available since v4.3._
 */
abstract contract GovernorProposalThreshold is Governor {
    /**
     * @dev See {IGovernor-propose}.
     */
    function propose(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        string memory description
    ) public virtual override returns (uint256) {
        require(
            getVotes(msg.sender, block.number - 1) >= proposalThreshold(),
            "GovernorCompatibilityBravo: proposer votes below proposal threshold"
        );

        return super.propose(targets, values, calldatas, description);
    }

    /**
     * @dev Part of the Governor Bravo's interface: _"The number of votes required in order for a voter to become a proposer"_.
     */
    function proposalThreshold() public view virtual returns (uint256);
}

File 9 of 29 : GovernorTimelockControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IGovernorTimelock.sol";
import "../Governor.sol";
import "../TimelockController.sol";

/**
 * @dev Extension of {Governor} that binds the execution process to an instance of {TimelockController}. This adds a
 * delay, enforced by the {TimelockController} to all successful proposal (in addition to the voting duration). The
 * {Governor} needs the proposer (an ideally the executor) roles for the {Governor} to work properly.
 *
 * Using this model means the proposal will be operated by the {TimelockController} and not by the {Governor}. Thus,
 * the assets and permissions must be attached to the {TimelockController}. Any asset sent to the {Governor} will be
 * inaccessible.
 *
 * _Available since v4.3._
 */
abstract contract GovernorTimelockControl is IGovernorTimelock, Governor {
    TimelockController private _timelock;
    mapping(uint256 => bytes32) private _timelockIds;

    /**
     * @dev Emitted when the timelock controller used for proposal execution is modified.
     */
    event TimelockChange(address oldTimelock, address newTimelock);

    /**
     * @dev Set the timelock.
     */
    constructor(TimelockController timelockAddress) {
        _updateTimelock(timelockAddress);
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, Governor) returns (bool) {
        return interfaceId == type(IGovernorTimelock).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev Overriden version of the {Governor-state} function with added support for the `Queued` status.
     */
    function state(uint256 proposalId) public view virtual override(IGovernor, Governor) returns (ProposalState) {
        ProposalState status = super.state(proposalId);

        if (status != ProposalState.Succeeded) {
            return status;
        }

        // core tracks execution, so we just have to check if successful proposal have been queued.
        bytes32 queueid = _timelockIds[proposalId];
        if (queueid == bytes32(0)) {
            return status;
        } else if (_timelock.isOperationDone(queueid)) {
            return ProposalState.Executed;
        } else {
            return ProposalState.Queued;
        }
    }

    /**
     * @dev Public accessor to check the address of the timelock
     */
    function timelock() public view virtual override returns (address) {
        return address(_timelock);
    }

    /**
     * @dev Public accessor to check the eta of a queued proposal
     */
    function proposalEta(uint256 proposalId) public view virtual override returns (uint256) {
        uint256 eta = _timelock.getTimestamp(_timelockIds[proposalId]);
        return eta == 1 ? 0 : eta; // _DONE_TIMESTAMP (1) should be replaced with a 0 value
    }

    /**
     * @dev Function to queue a proposal to the timelock.
     */
    function queue(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public virtual override returns (uint256) {
        uint256 proposalId = hashProposal(targets, values, calldatas, descriptionHash);

        require(state(proposalId) == ProposalState.Succeeded, "Governor: proposal not successful");

        uint256 delay = _timelock.getMinDelay();
        _timelockIds[proposalId] = _timelock.hashOperationBatch(targets, values, calldatas, 0, descriptionHash);
        _timelock.scheduleBatch(targets, values, calldatas, 0, descriptionHash, delay);

        emit ProposalQueued(proposalId, block.timestamp + delay);

        return proposalId;
    }

    /**
     * @dev Overriden execute function that run the already queued proposal through the timelock.
     */
    function _execute(
        uint256, /* proposalId */
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) internal virtual override {
        _timelock.executeBatch{value: msg.value}(targets, values, calldatas, 0, descriptionHash);
    }

    /**
     * @dev Overriden version of the {Governor-_cancel} function to cancel the timelocked proposal if it as already
     * been queued.
     */
    function _cancel(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) internal virtual override returns (uint256) {
        uint256 proposalId = super._cancel(targets, values, calldatas, descriptionHash);

        if (_timelockIds[proposalId] != 0) {
            _timelock.cancel(_timelockIds[proposalId]);
            delete _timelockIds[proposalId];
        }

        return proposalId;
    }

    /**
     * @dev Address through which the governor executes action. In this case, the timelock.
     */
    function _executor() internal view virtual override returns (address) {
        return address(_timelock);
    }

    /**
     * @dev Public endpoint to update the underlying timelock instance. Restricted to the timelock itself, so updates
     * must be proposed, scheduled and executed using the {Governor} workflow.
     */
    function updateTimelock(TimelockController newTimelock) external virtual onlyGovernance {
        _updateTimelock(newTimelock);
    }

    function _updateTimelock(TimelockController newTimelock) private {
        emit TimelockChange(address(_timelock), address(newTimelock));
        _timelock = newTimelock;
    }
}

File 10 of 29 : GovernorVotes.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../Governor.sol";
import "../../token/ERC20/extensions/ERC20Votes.sol";
import "../../utils/math/Math.sol";

/**
 * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token.
 *
 * _Available since v4.3._
 */
abstract contract GovernorVotes is Governor {
    ERC20Votes public immutable token;

    constructor(ERC20Votes tokenAddress) {
        token = tokenAddress;
    }

    /**
     * Read the voting weight from the token's built in snapshot mechanism (see {IGovernor-getVotes}).
     */
    function getVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {
        return token.getPastVotes(account, blockNumber);
    }
}

File 11 of 29 : GovernorVotesQuorumFraction.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./GovernorVotes.sol";

/**
 * @dev Extension of {Governor} for voting weight extraction from an {ERC20Votes} token and a quorum expressed as a
 * fraction of the total supply.
 *
 * _Available since v4.3._
 */
abstract contract GovernorVotesQuorumFraction is GovernorVotes {
    uint256 private _quorumNumerator;

    event QuorumNumeratorUpdated(uint256 oldQuorumNumerator, uint256 newQuorumNumerator);

    constructor(uint256 quorumNumeratorValue) {
        _updateQuorumNumerator(quorumNumeratorValue);
    }

    function quorumNumerator() public view virtual returns (uint256) {
        return _quorumNumerator;
    }

    function quorumDenominator() public view virtual returns (uint256) {
        return 100;
    }

    function quorum(uint256 blockNumber) public view virtual override returns (uint256) {
        return (token.getPastTotalSupply(blockNumber) * quorumNumerator()) / quorumDenominator();
    }

    function updateQuorumNumerator(uint256 newQuorumNumerator) external virtual onlyGovernance {
        _updateQuorumNumerator(newQuorumNumerator);
    }

    function _updateQuorumNumerator(uint256 newQuorumNumerator) internal virtual {
        require(
            newQuorumNumerator <= quorumDenominator(),
            "GovernorVotesQuorumFraction: quorumNumerator over quorumDenominator"
        );

        uint256 oldQuorumNumerator = _quorumNumerator;
        _quorumNumerator = newQuorumNumerator;

        emit QuorumNumeratorUpdated(oldQuorumNumerator, newQuorumNumerator);
    }
}

File 12 of 29 : IGovernorTimelock.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IGovernor.sol";

/**
 * @dev Extension of the {IGovernor} for timelock supporting modules.
 *
 * _Available since v4.3._
 */
abstract contract IGovernorTimelock is IGovernor {
    event ProposalQueued(uint256 proposalId, uint256 eta);

    function timelock() public view virtual returns (address);

    function proposalEta(uint256 proposalId) public view virtual returns (uint256);

    function queue(
        address[] memory targets,
        uint256[] memory values,
        bytes[] memory calldatas,
        bytes32 descriptionHash
    ) public virtual returns (uint256 proposalId);
}

File 13 of 29 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 14 of 29 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address recipient, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

File 15 of 29 : ERC20Votes.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./draft-ERC20Permit.sol";
import "../../../utils/math/Math.sol";
import "../../../utils/math/SafeCast.sol";
import "../../../utils/cryptography/ECDSA.sol";

/**
 * @dev Extension of ERC20 to support Compound-like voting and delegation. This version is more generic than Compound's,
 * and supports token supply up to 2^224^ - 1, while COMP is limited to 2^96^ - 1.
 *
 * NOTE: If exact COMP compatibility is required, use the {ERC20VotesComp} variant of this module.
 *
 * This extension keeps a history (checkpoints) of each account's vote power. Vote power can be delegated either
 * by calling the {delegate} function directly, or by providing a signature to be used with {delegateBySig}. Voting
 * power can be queried through the public accessors {getVotes} and {getPastVotes}.
 *
 * By default, token balance does not account for voting power. This makes transfers cheaper. The downside is that it
 * requires users to delegate to themselves in order to activate checkpoints and have their voting power tracked.
 * Enabling self-delegation can easily be done by overriding the {delegates} function. Keep in mind however that this
 * will significantly increase the base gas cost of transfers.
 *
 * _Available since v4.2._
 */
abstract contract ERC20Votes is ERC20Permit {
    struct Checkpoint {
        uint32 fromBlock;
        uint224 votes;
    }

    bytes32 private constant _DELEGATION_TYPEHASH =
        keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    mapping(address => address) private _delegates;
    mapping(address => Checkpoint[]) private _checkpoints;
    Checkpoint[] private _totalSupplyCheckpoints;

    /**
     * @dev Emitted when an account changes their delegate.
     */
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /**
     * @dev Emitted when a token transfer or delegate change results in changes to an account's voting power.
     */
    event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);

    /**
     * @dev Get the `pos`-th checkpoint for `account`.
     */
    function checkpoints(address account, uint32 pos) public view virtual returns (Checkpoint memory) {
        return _checkpoints[account][pos];
    }

    /**
     * @dev Get number of checkpoints for `account`.
     */
    function numCheckpoints(address account) public view virtual returns (uint32) {
        return SafeCast.toUint32(_checkpoints[account].length);
    }

    /**
     * @dev Get the address `account` is currently delegating to.
     */
    function delegates(address account) public view virtual returns (address) {
        return _delegates[account];
    }

    /**
     * @dev Gets the current votes balance for `account`
     */
    function getVotes(address account) public view returns (uint256) {
        uint256 pos = _checkpoints[account].length;
        return pos == 0 ? 0 : _checkpoints[account][pos - 1].votes;
    }

    /**
     * @dev Retrieve the number of votes for `account` at the end of `blockNumber`.
     *
     * Requirements:
     *
     * - `blockNumber` must have been already mined
     */
    function getPastVotes(address account, uint256 blockNumber) public view returns (uint256) {
        require(blockNumber < block.number, "ERC20Votes: block not yet mined");
        return _checkpointsLookup(_checkpoints[account], blockNumber);
    }

    /**
     * @dev Retrieve the `totalSupply` at the end of `blockNumber`. Note, this value is the sum of all balances.
     * It is but NOT the sum of all the delegated votes!
     *
     * Requirements:
     *
     * - `blockNumber` must have been already mined
     */
    function getPastTotalSupply(uint256 blockNumber) public view returns (uint256) {
        require(blockNumber < block.number, "ERC20Votes: block not yet mined");
        return _checkpointsLookup(_totalSupplyCheckpoints, blockNumber);
    }

    /**
     * @dev Lookup a value in a list of (sorted) checkpoints.
     */
    function _checkpointsLookup(Checkpoint[] storage ckpts, uint256 blockNumber) private view returns (uint256) {
        // We run a binary search to look for the earliest checkpoint taken after `blockNumber`.
        //
        // During the loop, the index of the wanted checkpoint remains in the range [low-1, high).
        // With each iteration, either `low` or `high` is moved towards the middle of the range to maintain the invariant.
        // - If the middle checkpoint is after `blockNumber`, we look in [low, mid)
        // - If the middle checkpoint is before or equal to `blockNumber`, we look in [mid+1, high)
        // Once we reach a single value (when low == high), we've found the right checkpoint at the index high-1, if not
        // out of bounds (in which case we're looking too far in the past and the result is 0).
        // Note that if the latest checkpoint available is exactly for `blockNumber`, we end up with an index that is
        // past the end of the array, so we technically don't find a checkpoint after `blockNumber`, but it works out
        // the same.
        uint256 high = ckpts.length;
        uint256 low = 0;
        while (low < high) {
            uint256 mid = Math.average(low, high);
            if (ckpts[mid].fromBlock > blockNumber) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }

        return high == 0 ? 0 : ckpts[high - 1].votes;
    }

    /**
     * @dev Delegate votes from the sender to `delegatee`.
     */
    function delegate(address delegatee) public virtual {
        return _delegate(_msgSender(), delegatee);
    }

    /**
     * @dev Delegates votes from signer to `delegatee`
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(block.timestamp <= expiry, "ERC20Votes: signature expired");
        address signer = ECDSA.recover(
            _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),
            v,
            r,
            s
        );
        require(nonce == _useNonce(signer), "ERC20Votes: invalid nonce");
        return _delegate(signer, delegatee);
    }

    /**
     * @dev Maximum token supply. Defaults to `type(uint224).max` (2^224^ - 1).
     */
    function _maxSupply() internal view virtual returns (uint224) {
        return type(uint224).max;
    }

    /**
     * @dev Snapshots the totalSupply after it has been increased.
     */
    function _mint(address account, uint256 amount) internal virtual override {
        super._mint(account, amount);
        require(totalSupply() <= _maxSupply(), "ERC20Votes: total supply risks overflowing votes");

        _writeCheckpoint(_totalSupplyCheckpoints, _add, amount);
    }

    /**
     * @dev Snapshots the totalSupply after it has been decreased.
     */
    function _burn(address account, uint256 amount) internal virtual override {
        super._burn(account, amount);

        _writeCheckpoint(_totalSupplyCheckpoints, _subtract, amount);
    }

    /**
     * @dev Move voting power when tokens are transferred.
     *
     * Emits a {DelegateVotesChanged} event.
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual override {
        super._afterTokenTransfer(from, to, amount);

        _moveVotingPower(delegates(from), delegates(to), amount);
    }

    /**
     * @dev Change delegation for `delegator` to `delegatee`.
     *
     * Emits events {DelegateChanged} and {DelegateVotesChanged}.
     */
    function _delegate(address delegator, address delegatee) internal virtual {
        address currentDelegate = delegates(delegator);
        uint256 delegatorBalance = balanceOf(delegator);
        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        _moveVotingPower(currentDelegate, delegatee, delegatorBalance);
    }

    function _moveVotingPower(
        address src,
        address dst,
        uint256 amount
    ) private {
        if (src != dst && amount > 0) {
            if (src != address(0)) {
                (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[src], _subtract, amount);
                emit DelegateVotesChanged(src, oldWeight, newWeight);
            }

            if (dst != address(0)) {
                (uint256 oldWeight, uint256 newWeight) = _writeCheckpoint(_checkpoints[dst], _add, amount);
                emit DelegateVotesChanged(dst, oldWeight, newWeight);
            }
        }
    }

    function _writeCheckpoint(
        Checkpoint[] storage ckpts,
        function(uint256, uint256) view returns (uint256) op,
        uint256 delta
    ) private returns (uint256 oldWeight, uint256 newWeight) {
        uint256 pos = ckpts.length;
        oldWeight = pos == 0 ? 0 : ckpts[pos - 1].votes;
        newWeight = op(oldWeight, delta);

        if (pos > 0 && ckpts[pos - 1].fromBlock == block.number) {
            ckpts[pos - 1].votes = SafeCast.toUint224(newWeight);
        } else {
            ckpts.push(Checkpoint({fromBlock: SafeCast.toUint32(block.number), votes: SafeCast.toUint224(newWeight)}));
        }
    }

    function _add(uint256 a, uint256 b) private pure returns (uint256) {
        return a + b;
    }

    function _subtract(uint256 a, uint256 b) private pure returns (uint256) {
        return a - b;
    }
}

File 16 of 29 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 17 of 29 : draft-ERC20Permit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./draft-IERC20Permit.sol";
import "../ERC20.sol";
import "../../../utils/cryptography/draft-EIP712.sol";
import "../../../utils/cryptography/ECDSA.sol";
import "../../../utils/Counters.sol";

/**
 * @dev Implementation of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on `{IERC20-approve}`, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 *
 * _Available since v3.4._
 */
abstract contract ERC20Permit is ERC20, IERC20Permit, EIP712 {
    using Counters for Counters.Counter;

    mapping(address => Counters.Counter) private _nonces;

    // solhint-disable-next-line var-name-mixedcase
    bytes32 private immutable _PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    /**
     * @dev Initializes the {EIP712} domain separator using the `name` parameter, and setting `version` to `"1"`.
     *
     * It's a good idea to use the same `name` that is defined as the ERC20 token name.
     */
    constructor(string memory name) EIP712(name, "1") {}

    /**
     * @dev See {IERC20Permit-permit}.
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override {
        require(block.timestamp <= deadline, "ERC20Permit: expired deadline");

        bytes32 structHash = keccak256(abi.encode(_PERMIT_TYPEHASH, owner, spender, value, _useNonce(owner), deadline));

        bytes32 hash = _hashTypedDataV4(structHash);

        address signer = ECDSA.recover(hash, v, r, s);
        require(signer == owner, "ERC20Permit: invalid signature");

        _approve(owner, spender, value);
    }

    /**
     * @dev See {IERC20Permit-nonces}.
     */
    function nonces(address owner) public view virtual override returns (uint256) {
        return _nonces[owner].current();
    }

    /**
     * @dev See {IERC20Permit-DOMAIN_SEPARATOR}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view override returns (bytes32) {
        return _domainSeparatorV4();
    }

    /**
     * @dev "Consume a nonce": return the current value and increment.
     *
     * _Available since v4.1._
     */
    function _useNonce(address owner) internal virtual returns (uint256 current) {
        Counters.Counter storage nonce = _nonces[owner];
        current = nonce.current();
        nonce.increment();
    }
}

File 18 of 29 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 19 of 29 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 20 of 29 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

File 21 of 29 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 22 of 29 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = _HEX_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 23 of 29 : Timers.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Tooling for timepoints, timers and delays
 */
library Timers {
    struct Timestamp {
        uint64 _deadline;
    }

    function getDeadline(Timestamp memory timer) internal pure returns (uint64) {
        return timer._deadline;
    }

    function setDeadline(Timestamp storage timer, uint64 timestamp) internal {
        timer._deadline = timestamp;
    }

    function reset(Timestamp storage timer) internal {
        timer._deadline = 0;
    }

    function isUnset(Timestamp memory timer) internal pure returns (bool) {
        return timer._deadline == 0;
    }

    function isStarted(Timestamp memory timer) internal pure returns (bool) {
        return timer._deadline > 0;
    }

    function isPending(Timestamp memory timer) internal view returns (bool) {
        return timer._deadline > block.timestamp;
    }

    function isExpired(Timestamp memory timer) internal view returns (bool) {
        return isStarted(timer) && timer._deadline <= block.timestamp;
    }

    struct BlockNumber {
        uint64 _deadline;
    }

    function getDeadline(BlockNumber memory timer) internal pure returns (uint64) {
        return timer._deadline;
    }

    function setDeadline(BlockNumber storage timer, uint64 timestamp) internal {
        timer._deadline = timestamp;
    }

    function reset(BlockNumber storage timer) internal {
        timer._deadline = 0;
    }

    function isUnset(BlockNumber memory timer) internal pure returns (bool) {
        return timer._deadline == 0;
    }

    function isStarted(BlockNumber memory timer) internal pure returns (bool) {
        return timer._deadline > 0;
    }

    function isPending(BlockNumber memory timer) internal view returns (bool) {
        return timer._deadline > block.number;
    }

    function isExpired(BlockNumber memory timer) internal view returns (bool) {
        return isStarted(timer) && timer._deadline <= block.number;
    }
}

File 24 of 29 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s;
        uint8 v;
        assembly {
            s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff)
            v := add(shr(255, vs), 27)
        }
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 25 of 29 : draft-EIP712.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 26 of 29 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 27 of 29 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 28 of 29 : Math.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}

File 29 of 29 : SafeCast.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast {
    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128) {
        require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
        return int128(value);
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64) {
        require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
        return int64(value);
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32) {
        require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
        return int32(value);
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16) {
        require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
        return int16(value);
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8) {
        require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
        return int8(value);
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

Settings
{
  "evmVersion": "london",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": false,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ERC20Votes","name":"_token","type":"address"},{"internalType":"contract TimelockController","name":"_timelock","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"address","name":"proposer","type":"address"},{"indexed":false,"internalType":"address[]","name":"targets","type":"address[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"},{"indexed":false,"internalType":"string[]","name":"signatures","type":"string[]"},{"indexed":false,"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"indexed":false,"internalType":"uint256","name":"startBlock","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"endBlock","type":"uint256"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"ProposalCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"ProposalExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"ProposalQueued","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldQuorumNumerator","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newQuorumNumerator","type":"uint256"}],"name":"QuorumNumeratorUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldTimelock","type":"address"},{"indexed":false,"internalType":"address","name":"newTimelock","type":"address"}],"name":"TimelockChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"voter","type":"address"},{"indexed":false,"internalType":"uint256","name":"proposalId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"support","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"weight","type":"uint256"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"VoteCast","type":"event"},{"inputs":[],"name":"BALLOT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"COUNTING_MODE","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"}],"name":"castVote","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"castVoteBySig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"uint8","name":"support","type":"uint8"},{"internalType":"string","name":"reason","type":"string"}],"name":"castVoteWithReason","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"execute","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"},{"internalType":"address","name":"account","type":"address"}],"name":"hasVoted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"hashProposal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalDeadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalEta","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalSnapshot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proposalThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"proposalVotes","outputs":[{"internalType":"uint256","name":"againstVotes","type":"uint256"},{"internalType":"uint256","name":"forVotes","type":"uint256"},{"internalType":"uint256","name":"abstainVotes","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"string","name":"description","type":"string"}],"name":"propose","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"targets","type":"address[]"},{"internalType":"uint256[]","name":"values","type":"uint256[]"},{"internalType":"bytes[]","name":"calldatas","type":"bytes[]"},{"internalType":"bytes32","name":"descriptionHash","type":"bytes32"}],"name":"queue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"quorum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"quorumDenominator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"quorumNumerator","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"proposalId","type":"uint256"}],"name":"state","outputs":[{"internalType":"enum IGovernor.ProposalState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timelock","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract ERC20Votes","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newQuorumNumerator","type":"uint256"}],"name":"updateQuorumNumerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract TimelockController","name":"newTimelock","type":"address"}],"name":"updateTimelock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"votingDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"votingPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"}]

6101406040523480156200001257600080fd5b5060405162004f9538038062004f95833981810160405281019062000038919062000423565b806064836040518060400160405280600c81526020017f454e5320476f7665726e6f72000000000000000000000000000000000000000081525080620000836200017f60201b60201c565b60008280519060200120905060008280519060200120905060007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f90508260c081815250508160e081815250504660a08181525050620000eb818484620001bc60201b60201c565b60808181525050806101008181525050505050505080600090805190602001906200011892919062000345565b50508073ffffffffffffffffffffffffffffffffffffffff166101208173ffffffffffffffffffffffffffffffffffffffff1660601b81525050506200016481620001f860201b60201c565b5062000176816200029a60201b60201c565b50505062000745565b60606040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250905090565b60008383834630604051602001620001d9959493929190620004f1565b6040516020818303038152906040528051906020012090509392505050565b620002086200033b60201b60201c565b8111156200024d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040162000244906200054e565b60405180910390fd5b60006003549050816003819055507f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b463399781836040516200028e92919062000570565b60405180910390a15050565b7f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682604051620002ef929190620004c4565b60405180910390a180600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000612710905090565b828054620003539062000632565b90600052602060002090601f016020900481019282620003775760008555620003c3565b82601f106200039257805160ff1916838001178555620003c3565b82800160010185558215620003c3579182015b82811115620003c2578251825591602001919060010190620003a5565b5b509050620003d29190620003d6565b5090565b5b80821115620003f1576000816000905550600101620003d7565b5090565b600081519050620004068162000711565b92915050565b6000815190506200041d816200072b565b92915050565b600080604083850312156200043d576200043c62000697565b5b60006200044d85828601620003f5565b925050602062000460858286016200040c565b9150509250929050565b6200047581620005ae565b82525050565b6200048681620005d6565b82525050565b60006200049b6043836200059d565b9150620004a8826200069c565b606082019050919050565b620004be8162000628565b82525050565b6000604082019050620004db60008301856200046a565b620004ea60208301846200046a565b9392505050565b600060a0820190506200050860008301886200047b565b6200051760208301876200047b565b6200052660408301866200047b565b620005356060830185620004b3565b6200054460808301846200046a565b9695505050505050565b6000602082019050818103600083015262000569816200048c565b9050919050565b6000604082019050620005876000830185620004b3565b620005966020830184620004b3565b9392505050565b600082825260208201905092915050565b6000620005bb8262000608565b9050919050565b6000620005cf8262000608565b9050919050565b6000819050919050565b6000620005ed82620005ae565b9050919050565b60006200060182620005c2565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060028204905060018216806200064b57607f821691505b6020821081141562000662576200066162000668565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600080fd5b7f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60008201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e6160208201527f746f720000000000000000000000000000000000000000000000000000000000604082015250565b6200071c81620005e0565b81146200072857600080fd5b50565b6200073681620005f4565b81146200074257600080fd5b50565b60805160a05160c05160e051610100516101205160601c6147ef620007a660003960008181611283015281816117d7015261189c01526000611af701526000611b3901526000611b1801526000611aa401526000611acc01526147ef6000f3fe6080604052600436106101c25760003560e01c80637b3c71d3116100f7578063c01f9e3711610095578063deaaa7cc11610064578063deaaa7cc146106e7578063eb9019d414610712578063f8ce560a1461074f578063fc0c546a1461078c576101c2565b8063c01f9e3714610617578063c59057e414610654578063d33219b414610691578063dd4e2ba5146106bc576101c2565b8063a7713a70116100d1578063a7713a701461055b578063a890c91014610586578063ab58fb8e146105af578063b58131b0146105ec576101c2565b80637b3c71d3146104b65780637d5e81e2146104f357806397c3d33414610530576101c2565b80633932abb111610164578063438596321161013e57806343859632146103d2578063544ffc9c1461040f57806354fd4d501461044e5780635678138814610479576101c2565b80633932abb11461032d5780633bccf4fd146103585780633e4f49e614610395576101c2565b806306fdde03116101a057806306fdde0314610258578063160cbed7146102835780632656227d146102c05780632d63f693146102f0576101c2565b806301ffc9a7146101c757806302a251a31461020457806306f3f9e61461022f575b600080fd5b3480156101d357600080fd5b506101ee60048036038101906101e99190612d12565b6107b7565b6040516101fb91906136c9565b60405180910390f35b34801561021057600080fd5b506102196107c9565b6040516102269190613a26565b60405180910390f35b34801561023b57600080fd5b5061025660048036038101906102519190612d6c565b6107d3565b005b34801561026457600080fd5b5061026d61085b565b60405161027a9190613804565b60405180910390f35b34801561028f57600080fd5b506102aa60048036038101906102a59190612b26565b6108ed565b6040516102b79190613a26565b60405180910390f35b6102da60048036038101906102d59190612b26565b610bc5565b6040516102e79190613a26565b60405180910390f35b3480156102fc57600080fd5b5061031760048036038101906103129190612d6c565b610cf8565b6040516103249190613a26565b60405180910390f35b34801561033957600080fd5b50610342610d66565b60405161034f9190613a26565b60405180910390f35b34801561036457600080fd5b5061037f600480360381019061037a9190612eba565b610d6f565b60405161038c9190613a26565b60405180910390f35b3480156103a157600080fd5b506103bc60048036038101906103b79190612d6c565b610df9565b6040516103c991906137e9565b60405180910390f35b3480156103de57600080fd5b506103f960048036038101906103f49190612dc6565b610e0b565b60405161040691906136c9565b60405180910390f35b34801561041b57600080fd5b5061043660048036038101906104319190612d6c565b610e76565b60405161044593929190613b1a565b60405180910390f35b34801561045a57600080fd5b50610463610eae565b6040516104709190613804565b60405180910390f35b34801561048557600080fd5b506104a0600480360381019061049b9190612e06565b610eeb565b6040516104ad9190613a26565b60405180910390f35b3480156104c257600080fd5b506104dd60048036038101906104d89190612e46565b610f1c565b6040516104ea9190613a26565b60405180910390f35b3480156104ff57600080fd5b5061051a60048036038101906105159190612be1565b610f84565b6040516105279190613a26565b60405180910390f35b34801561053c57600080fd5b50610545610f9c565b6040516105529190613a26565b60405180910390f35b34801561056757600080fd5b50610570610fa6565b60405161057d9190613a26565b60405180910390f35b34801561059257600080fd5b506105ad60048036038101906105a89190612d3f565b610fb0565b005b3480156105bb57600080fd5b506105d660048036038101906105d19190612d6c565b611038565b6040516105e39190613a26565b60405180910390f35b3480156105f857600080fd5b50610601611114565b60405161060e9190613a26565b60405180910390f35b34801561062357600080fd5b5061063e60048036038101906106399190612d6c565b611126565b60405161064b9190613a26565b60405180910390f35b34801561066057600080fd5b5061067b60048036038101906106769190612b26565b611194565b6040516106889190613a26565b60405180910390f35b34801561069d57600080fd5b506106a66111d0565b6040516106b39190613524565b60405180910390f35b3480156106c857600080fd5b506106d16111fa565b6040516106de9190613804565b60405180910390f35b3480156106f357600080fd5b506106fc611237565b60405161070991906136e4565b60405180910390f35b34801561071e57600080fd5b5061073960048036038101906107349190612ae6565b61125b565b6040516107469190613a26565b60405180910390f35b34801561075b57600080fd5b5061077660048036038101906107719190612d6c565b61126f565b6040516107839190613a26565b60405180910390f35b34801561079857600080fd5b506107a1611281565b6040516107ae91906137ce565b60405180910390f35b60006107c2826112a5565b9050919050565b600061b2fa905090565b6107db61131f565b73ffffffffffffffffffffffffffffffffffffffff166107f961132e565b73ffffffffffffffffffffffffffffffffffffffff161461084f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084690613846565b60405180910390fd5b61085881611336565b50565b60606000805461086a906140c9565b80601f0160208091040260200160405190810160405280929190818152602001828054610896906140c9565b80156108e35780601f106108b8576101008083540402835291602001916108e3565b820191906000526020600020905b8154815290600101906020018083116108c657829003601f168201915b5050505050905090565b6000806108fc86868686611194565b90506004600781111561091257610911614194565b5b61091b82610df9565b600781111561092d5761092c614194565b5b1461096d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610964906139a6565b60405180910390fd5b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f27a0c926040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d757600080fd5b505afa1580156109eb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0f9190612d99565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b1c5f4278888886000896040518663ffffffff1660e01b8152600401610a759594939291906135eb565b60206040518083038186803b158015610a8d57600080fd5b505afa158015610aa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac59190612ce5565b6005600084815260200190815260200160002081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638f2a0bb0888888600089876040518763ffffffff1660e01b8152600401610b4296959493929190613653565b600060405180830381600087803b158015610b5c57600080fd5b505af1158015610b70573d6000803e3d6000fd5b505050507f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda2892828242610ba29190613de0565b604051610bb0929190613af1565b60405180910390a18192505050949350505050565b600080610bd486868686611194565b90506000610be182610df9565b905060046007811115610bf757610bf6614194565b5b816007811115610c0a57610c09614194565b5b1480610c3a575060056007811115610c2557610c24614194565b5b816007811115610c3857610c37614194565b5b145b610c79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c70906139a6565b60405180910390fd5b600180600084815260200190815260200160002060020160006101000a81548160ff0219169083151502179055507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051610cd69190613a26565b60405180910390a1610ceb82888888886113cb565b8192505050949350505050565b6000610d55600160008481526020019081526020016000206000016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250506113df565b67ffffffffffffffff169050919050565b60006001905090565b600080610dd0610dc87f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f8989604051602001610dad93929190613752565b604051602081830303815290604052805190602001206113ed565b868686611407565b9050610ded87828860405180602001604052806000815250611432565b91505095945050505050565b6000610e0482611586565b9050919050565b60006002600084815260200190815260200160002060030160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600080600080600260008681526020019081526020016000209050806000015481600101548260020154935093509350509193909250565b60606040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250905090565b600080610ef661132e565b9050610f1384828560405180602001604052806000815250611432565b91505092915050565b600080610f2761132e565b9050610f7986828787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611432565b915050949350505050565b6000610f92858585856116bd565b9050949350505050565b6000612710905090565b6000600354905090565b610fb861131f565b73ffffffffffffffffffffffffffffffffffffffff16610fd661132e565b73ffffffffffffffffffffffffffffffffffffffff161461102c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102390613846565b60405180910390fd5b61103581611734565b50565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d45c443560056000868152602001908152602001600020546040518263ffffffff1660e01b81526004016110a991906136e4565b60206040518083038186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f99190612d99565b905060018114611109578061110c565b60005b915050919050565b600069152d02c7e14af6800000905090565b6000611183600160008481526020019081526020016000206001016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250506113df565b67ffffffffffffffff169050919050565b6000848484846040516020016111ad9493929190613591565b6040516020818303038152906040528051906020012060001c9050949350505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280602081526020017f737570706f72743d627261766f2671756f72756d3d666f722c6162737461696e815250905090565b7f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f81565b600061126783836117d3565b905092915050565b600061127a82611888565b9050919050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60007f6e665ced000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061131857506113178261195e565b5b9050919050565b60006113296119d8565b905090565b600033905090565b61133e610f9c565b811115611380576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137790613866565b60405180910390fd5b60006003549050816003819055507f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b463399781836040516113bf929190613af1565b60405180910390a15050565b6113d88585858585611a02565b5050505050565b600081600001519050919050565b60006114006113fa611aa0565b83611b63565b9050919050565b600080600061141887878787611b96565b9150915061142581611ca3565b8192505050949350505050565b6000806001600087815260200190815260200160002090506001600781111561145e5761145d614194565b5b61146787610df9565b600781111561147957611478614194565b5b146114b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b090613926565b60405180910390fd5b600061151786611508846000016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250506113df565b67ffffffffffffffff1661125b565b905061152587878784611e78565b8573ffffffffffffffffffffffffffffffffffffffff167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4888784886040516115719493929190613b51565b60405180910390a28092505050949350505050565b6000806115928361207e565b9050600460078111156115a8576115a7614194565b5b8160078111156115bb576115ba614194565b5b146115c957809150506116b8565b6000600560008581526020019081526020016000205490506000801b8114156115f65781925050506116b8565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ab0f529826040518263ffffffff1660e01b815260040161165191906136e4565b60206040518083038186803b15801561166957600080fd5b505afa15801561167d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a19190612cb8565b156116b1576007925050506116b8565b6005925050505b919050565b60006116c7611114565b6116dd336001436116d89190613eff565b61125b565b101561171e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171590613886565b60405180910390fd5b61172a85858585612245565b9050949350505050565b7f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260405161178792919061353f565b60405180910390a180600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16633a46b1a884846040518363ffffffff1660e01b8152600401611830929190613568565b60206040518083038186803b15801561184857600080fd5b505afa15801561185c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118809190612d99565b905092915050565b6000611892610f9c565b61189a610fa6565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff16638e539e8c856040518263ffffffff1660e01b81526004016118f39190613a26565b60206040518083038186803b15801561190b57600080fd5b505afa15801561191f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119439190612d99565b61194d9190613ea5565b6119579190613e74565b9050919050565b60007fbf26d897000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806119d157506119d0826124e5565b5b9050919050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e38335e5348686866000876040518763ffffffff1660e01b8152600401611a679594939291906135eb565b6000604051808303818588803b158015611a8057600080fd5b505af1158015611a94573d6000803e3d6000fd5b50505050505050505050565b60007f0000000000000000000000000000000000000000000000000000000000000000461415611af2577f00000000000000000000000000000000000000000000000000000000000000009050611b60565b611b5d7f00000000000000000000000000000000000000000000000000000000000000007f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061254f565b90505b90565b60008282604051602001611b789291906134ed565b60405160208183030381529060405280519060200120905092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115611bd1576000600391509150611c9a565b601b8560ff1614158015611be95750601c8560ff1614155b15611bfb576000600491509150611c9a565b600060018787878760405160008152602001604052604051611c209493929190613789565b6020604051602081039080840390855afa158015611c42573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c9157600060019250925050611c9a565b80600092509250505b94509492505050565b60006004811115611cb757611cb6614194565b5b816004811115611cca57611cc9614194565b5b1415611cd557611e75565b60016004811115611ce957611ce8614194565b5b816004811115611cfc57611cfb614194565b5b1415611d3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3490613826565b60405180910390fd5b60026004811115611d5157611d50614194565b5b816004811115611d6457611d63614194565b5b1415611da5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9c906138a6565b60405180910390fd5b60036004811115611db957611db8614194565b5b816004811115611dcc57611dcb614194565b5b1415611e0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e04906138e6565b60405180910390fd5b600480811115611e2057611e1f614194565b5b816004811115611e3357611e32614194565b5b1415611e74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e6b90613966565b60405180910390fd5b5b50565b60006002600086815260200190815260200160002090508060030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611f1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1590613906565b60405180910390fd5b60018160030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006002811115611f8c57611f8b614194565b5b60ff168360ff161415611fb95781816000016000828254611fad9190613de0565b92505081905550612077565b60016002811115611fcd57611fcc614194565b5b60ff168360ff161415611ffa5781816001016000828254611fee9190613de0565b92505081905550612076565b60028081111561200d5761200c614194565b5b60ff168360ff16141561203a578181600201600082825461202e9190613de0565b92505081905550612075565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206c906139e6565b60405180910390fd5b5b5b5050505050565b60008060016000848152602001908152602001600020604051806080016040529081600082016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250508152602001600182016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505081526020016002820160009054906101000a900460ff161515151581526020016002820160019054906101000a900460ff1615151515815250509050806040015115612177576007915050612240565b80606001511561218b576002915050612240565b6121988160000151612589565b156121a7576000915050612240565b6121b48160200151612589565b156121c3576001915050612240565b6121d081602001516125a3565b15612205576121de836125cf565b80156121ef57506121ee83612616565b5b6121fa5760036121fd565b60045b915050612240565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612237906139c6565b60405180910390fd5b919050565b60008061225b8686868680519060200120611194565b905084518651146122a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612298906138c6565b60405180910390fd5b83518651146122e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122dc906138c6565b60405180910390fd5b6000865111612329576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232090613946565b60405180910390fd5b6000600160008381526020019081526020016000209050612389816000016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525050612641565b6123c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123bf90613a06565b60405180910390fd5b60006123da6123d5610d66565b61265b565b6123e34361265b565b6123ed9190613e36565b905060006124016123fc6107c9565b61265b565b8261240c9190613e36565b905061242482846000016126b290919063ffffffff16565b61243a81846001016126b290919063ffffffff16565b7f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08461246461132e565b8b8b8d5167ffffffffffffffff811115612481576124806141f2565b5b6040519080825280602002602001820160405280156124b457816020015b606081526020019060019003908161249f5790505b508c88888e6040516124ce99989796959493929190613a41565b60405180910390a183945050505050949350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000838383463060405160200161256a9594939291906136ff565b6040516020818303038152906040528051906020012090509392505050565b600043826000015167ffffffffffffffff16119050919050565b60006125ae826126e1565b80156125c8575043826000015167ffffffffffffffff1611155b9050919050565b600080600260008481526020019081526020016000209050806002015481600101546125fb9190613de0565b61260c61260785610cf8565b61126f565b1115915050919050565b6000806002600084815260200190815260200160002090508060000154816001015411915050919050565b600080826000015167ffffffffffffffff16149050919050565b600067ffffffffffffffff80168211156126aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126a190613986565b60405180910390fd5b819050919050565b808260000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505050565b600080826000015167ffffffffffffffff16119050919050565b600061270e61270984613bc2565b613b9d565b905080838252602082019050828560208602820111156127315761273061422b565b5b60005b85811015612761578161274788826128ed565b845260208401935060208301925050600181019050612734565b5050509392505050565b600061277e61277984613bee565b613b9d565b905080838252602082019050828560208602820111156127a1576127a061422b565b5b60005b858110156127ef57813567ffffffffffffffff8111156127c7576127c6614226565b5b8086016127d489826129e0565b855260208501945060208401935050506001810190506127a4565b5050509392505050565b600061280c61280784613c1a565b613b9d565b9050808382526020820190508285602086028201111561282f5761282e61422b565b5b60005b8581101561285f57816128458882612aa7565b845260208401935060208301925050600181019050612832565b5050509392505050565b600061287c61287784613c46565b613b9d565b90508281526020810184848401111561289857612897614230565b5b6128a3848285614087565b509392505050565b60006128be6128b984613c77565b613b9d565b9050828152602081018484840111156128da576128d9614230565b5b6128e5848285614087565b509392505050565b6000813590506128fc81614718565b92915050565b600082601f83011261291757612916614226565b5b81356129278482602086016126fb565b91505092915050565b600082601f83011261294557612944614226565b5b813561295584826020860161276b565b91505092915050565b600082601f83011261297357612972614226565b5b81356129838482602086016127f9565b91505092915050565b60008151905061299b8161472f565b92915050565b6000813590506129b081614746565b92915050565b6000815190506129c581614746565b92915050565b6000813590506129da8161475d565b92915050565b600082601f8301126129f5576129f4614226565b5b8135612a05848260208601612869565b91505092915050565b600081359050612a1d81614774565b92915050565b60008083601f840112612a3957612a38614226565b5b8235905067ffffffffffffffff811115612a5657612a55614221565b5b602083019150836001820283011115612a7257612a7161422b565b5b9250929050565b600082601f830112612a8e57612a8d614226565b5b8135612a9e8482602086016128ab565b91505092915050565b600081359050612ab68161478b565b92915050565b600081519050612acb8161478b565b92915050565b600081359050612ae0816147a2565b92915050565b60008060408385031215612afd57612afc61423a565b5b6000612b0b858286016128ed565b9250506020612b1c85828601612aa7565b9150509250929050565b60008060008060808587031215612b4057612b3f61423a565b5b600085013567ffffffffffffffff811115612b5e57612b5d614235565b5b612b6a87828801612902565b945050602085013567ffffffffffffffff811115612b8b57612b8a614235565b5b612b978782880161295e565b935050604085013567ffffffffffffffff811115612bb857612bb7614235565b5b612bc487828801612930565b9250506060612bd5878288016129a1565b91505092959194509250565b60008060008060808587031215612bfb57612bfa61423a565b5b600085013567ffffffffffffffff811115612c1957612c18614235565b5b612c2587828801612902565b945050602085013567ffffffffffffffff811115612c4657612c45614235565b5b612c528782880161295e565b935050604085013567ffffffffffffffff811115612c7357612c72614235565b5b612c7f87828801612930565b925050606085013567ffffffffffffffff811115612ca057612c9f614235565b5b612cac87828801612a79565b91505092959194509250565b600060208284031215612cce57612ccd61423a565b5b6000612cdc8482850161298c565b91505092915050565b600060208284031215612cfb57612cfa61423a565b5b6000612d09848285016129b6565b91505092915050565b600060208284031215612d2857612d2761423a565b5b6000612d36848285016129cb565b91505092915050565b600060208284031215612d5557612d5461423a565b5b6000612d6384828501612a0e565b91505092915050565b600060208284031215612d8257612d8161423a565b5b6000612d9084828501612aa7565b91505092915050565b600060208284031215612daf57612dae61423a565b5b6000612dbd84828501612abc565b91505092915050565b60008060408385031215612ddd57612ddc61423a565b5b6000612deb85828601612aa7565b9250506020612dfc858286016128ed565b9150509250929050565b60008060408385031215612e1d57612e1c61423a565b5b6000612e2b85828601612aa7565b9250506020612e3c85828601612ad1565b9150509250929050565b60008060008060608587031215612e6057612e5f61423a565b5b6000612e6e87828801612aa7565b9450506020612e7f87828801612ad1565b935050604085013567ffffffffffffffff811115612ea057612e9f614235565b5b612eac87828801612a23565b925092505092959194509250565b600080600080600060a08688031215612ed657612ed561423a565b5b6000612ee488828901612aa7565b9550506020612ef588828901612ad1565b9450506040612f0688828901612ad1565b9350506060612f17888289016129a1565b9250506080612f28888289016129a1565b9150509295509295909350565b6000612f418383612f8d565b60208301905092915050565b6000612f598383613186565b905092915050565b6000612f6d83836131ec565b905092915050565b6000612f8183836134b1565b60208301905092915050565b612f9681613f33565b82525050565b612fa581613f33565b82525050565b6000612fb682613ce8565b612fc08185613d5e565b9350612fcb83613ca8565b8060005b83811015612ffc578151612fe38882612f35565b9750612fee83613d2a565b925050600181019050612fcf565b5085935050505092915050565b600061301482613cf3565b61301e8185613d6f565b93508360208202850161303085613cb8565b8060005b8581101561306c578484038952815161304d8582612f4d565b945061305883613d37565b925060208a01995050600181019050613034565b50829750879550505050505092915050565b600061308982613cfe565b6130938185613d80565b9350836020820285016130a585613cc8565b8060005b858110156130e157848403895281516130c28582612f61565b94506130cd83613d44565b925060208a019950506001810190506130a9565b50829750879550505050505092915050565b60006130fe82613d09565b6131088185613d91565b935061311383613cd8565b8060005b8381101561314457815161312b8882612f75565b975061313683613d51565b925050600181019050613117565b5085935050505092915050565b61315a81613f57565b82525050565b61316981613f63565b82525050565b61318061317b82613f63565b61412c565b82525050565b600061319182613d14565b61319b8185613da2565b93506131ab818560208601614096565b6131b48161423f565b840191505092915050565b6131c881614013565b82525050565b6131d781614025565b82525050565b6131e681614037565b82525050565b60006131f782613d1f565b6132018185613db3565b9350613211818560208601614096565b61321a8161423f565b840191505092915050565b600061323082613d1f565b61323a8185613dc4565b935061324a818560208601614096565b6132538161423f565b840191505092915050565b600061326b601883613dc4565b91506132768261425d565b602082019050919050565b600061328e601883613dc4565b915061329982614286565b602082019050919050565b60006132b1604383613dc4565b91506132bc826142af565b606082019050919050565b60006132d4604383613dc4565b91506132df82614324565b606082019050919050565b60006132f7601f83613dc4565b915061330282614399565b602082019050919050565b600061331a600283613dd5565b9150613325826143c2565b600282019050919050565b600061333d602183613dc4565b9150613348826143eb565b604082019050919050565b6000613360602283613dc4565b915061336b8261443a565b604082019050919050565b6000613383602783613dc4565b915061338e82614489565b604082019050919050565b60006133a6602383613dc4565b91506133b1826144d8565b604082019050919050565b60006133c9601883613dc4565b91506133d482614527565b602082019050919050565b60006133ec602283613dc4565b91506133f782614550565b604082019050919050565b600061340f602683613dc4565b915061341a8261459f565b604082019050919050565b6000613432602183613dc4565b915061343d826145ee565b604082019050919050565b6000613455601d83613dc4565b91506134608261463d565b602082019050919050565b6000613478603583613dc4565b915061348382614666565b604082019050919050565b600061349b602183613dc4565b91506134a6826146b5565b604082019050919050565b6134ba81613fe8565b82525050565b6134c981613fe8565b82525050565b6134d881614075565b82525050565b6134e781614006565b82525050565b60006134f88261330d565b9150613504828561316f565b602082019150613514828461316f565b6020820191508190509392505050565b60006020820190506135396000830184612f9c565b92915050565b60006040820190506135546000830185612f9c565b6135616020830184612f9c565b9392505050565b600060408201905061357d6000830185612f9c565b61358a60208301846134c0565b9392505050565b600060808201905081810360008301526135ab8187612fab565b905081810360208301526135bf81866130f3565b905081810360408301526135d38185613009565b90506135e26060830184613160565b95945050505050565b600060a08201905081810360008301526136058188612fab565b9050818103602083015261361981876130f3565b9050818103604083015261362d8186613009565b905061363c60608301856131dd565b6136496080830184613160565b9695505050505050565b600060c082019050818103600083015261366d8189612fab565b9050818103602083015261368181886130f3565b905081810360408301526136958187613009565b90506136a460608301866131dd565b6136b16080830185613160565b6136be60a08301846134c0565b979650505050505050565b60006020820190506136de6000830184613151565b92915050565b60006020820190506136f96000830184613160565b92915050565b600060a0820190506137146000830188613160565b6137216020830187613160565b61372e6040830186613160565b61373b60608301856134c0565b6137486080830184612f9c565b9695505050505050565b60006060820190506137676000830186613160565b61377460208301856134c0565b61378160408301846134de565b949350505050565b600060808201905061379e6000830187613160565b6137ab60208301866134de565b6137b86040830185613160565b6137c56060830184613160565b95945050505050565b60006020820190506137e360008301846131bf565b92915050565b60006020820190506137fe60008301846131ce565b92915050565b6000602082019050818103600083015261381e8184613225565b905092915050565b6000602082019050818103600083015261383f8161325e565b9050919050565b6000602082019050818103600083015261385f81613281565b9050919050565b6000602082019050818103600083015261387f816132a4565b9050919050565b6000602082019050818103600083015261389f816132c7565b9050919050565b600060208201905081810360008301526138bf816132ea565b9050919050565b600060208201905081810360008301526138df81613330565b9050919050565b600060208201905081810360008301526138ff81613353565b9050919050565b6000602082019050818103600083015261391f81613376565b9050919050565b6000602082019050818103600083015261393f81613399565b9050919050565b6000602082019050818103600083015261395f816133bc565b9050919050565b6000602082019050818103600083015261397f816133df565b9050919050565b6000602082019050818103600083015261399f81613402565b9050919050565b600060208201905081810360008301526139bf81613425565b9050919050565b600060208201905081810360008301526139df81613448565b9050919050565b600060208201905081810360008301526139ff8161346b565b9050919050565b60006020820190508181036000830152613a1f8161348e565b9050919050565b6000602082019050613a3b60008301846134c0565b92915050565b600061012082019050613a57600083018c6134c0565b613a64602083018b612f9c565b8181036040830152613a76818a612fab565b90508181036060830152613a8a81896130f3565b90508181036080830152613a9e818861307e565b905081810360a0830152613ab28187613009565b9050613ac160c08301866134cf565b613ace60e08301856134cf565b818103610100830152613ae18184613225565b90509a9950505050505050505050565b6000604082019050613b0660008301856134c0565b613b1360208301846134c0565b9392505050565b6000606082019050613b2f60008301866134c0565b613b3c60208301856134c0565b613b4960408301846134c0565b949350505050565b6000608082019050613b6660008301876134c0565b613b7360208301866134de565b613b8060408301856134c0565b8181036060830152613b928184613225565b905095945050505050565b6000613ba7613bb8565b9050613bb382826140fb565b919050565b6000604051905090565b600067ffffffffffffffff821115613bdd57613bdc6141f2565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613c0957613c086141f2565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613c3557613c346141f2565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613c6157613c606141f2565b5b613c6a8261423f565b9050602081019050919050565b600067ffffffffffffffff821115613c9257613c916141f2565b5b613c9b8261423f565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000613deb82613fe8565b9150613df683613fe8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613e2b57613e2a614136565b5b828201905092915050565b6000613e4182613ff2565b9150613e4c83613ff2565b92508267ffffffffffffffff03821115613e6957613e68614136565b5b828201905092915050565b6000613e7f82613fe8565b9150613e8a83613fe8565b925082613e9a57613e99614165565b5b828204905092915050565b6000613eb082613fe8565b9150613ebb83613fe8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ef457613ef3614136565b5b828202905092915050565b6000613f0a82613fe8565b9150613f1583613fe8565b925082821015613f2857613f27614136565b5b828203905092915050565b6000613f3e82613fc8565b9050919050565b6000613f5082613fc8565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000613fa482613f45565b9050919050565b6000819050613fb982614704565b919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b600061401e82614051565b9050919050565b600061403082613fab565b9050919050565b600061404a61404583613fbe565b614250565b9050919050565b600061405c82614063565b9050919050565b600061406e82613fc8565b9050919050565b600061408082613ff2565b9050919050565b82818337600083830152505050565b60005b838110156140b4578082015181840152602081019050614099565b838111156140c3576000848401525b50505050565b600060028204905060018216806140e157607f821691505b602082108114156140f5576140f46141c3565b5b50919050565b6141048261423f565b810181811067ffffffffffffffff82111715614123576141226141f2565b5b80604052505050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160001b9050919050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b7f476f7665726e6f723a206f6e6c79476f7665726e616e63650000000000000000600082015250565b7f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60008201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e6160208201527f746f720000000000000000000000000000000000000000000000000000000000604082015250565b7f476f7665726e6f72436f6d7061746962696c697479427261766f3a2070726f7060008201527f6f73657220766f7465732062656c6f772070726f706f73616c2074687265736860208201527f6f6c640000000000000000000000000000000000000000000000000000000000604082015250565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b7f1901000000000000000000000000000000000000000000000000000000000000600082015250565b7f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e677460008201527f6800000000000000000000000000000000000000000000000000000000000000602082015250565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f72566f74696e6753696d706c653a20766f746520616c72656160008201527f6479206361737400000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f723a20766f7465206e6f742063757272656e746c792061637460008201527f6976650000000000000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f723a20656d7074792070726f706f73616c0000000000000000600082015250565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203660008201527f3420626974730000000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f723a2070726f706f73616c206e6f742073756363657373667560008201527f6c00000000000000000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f723a20756e6b6e6f776e2070726f706f73616c206964000000600082015250565b7f476f7665726e6f72566f74696e6753696d706c653a20696e76616c696420766160008201527f6c756520666f7220656e756d20566f7465547970650000000000000000000000602082015250565b7f476f7665726e6f723a2070726f706f73616c20616c726561647920657869737460008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6008811061471557614714614194565b5b50565b61472181613f33565b811461472c57600080fd5b50565b61473881613f57565b811461474357600080fd5b50565b61474f81613f63565b811461475a57600080fd5b50565b61476681613f6d565b811461477157600080fd5b50565b61477d81613f99565b811461478857600080fd5b50565b61479481613fe8565b811461479f57600080fd5b50565b6147ab81614006565b81146147b657600080fd5b5056fea26469706673582212200ab3f080b5e14d820d51ca1af7f4b8bf4ac9f2bda95fb6ad6a5bb488208e270364736f6c63430008070033000000000000000000000000c18360217d8f7ab5e7c516566761ea12ce7f9d72000000000000000000000000fe89cc7abb2c4183683ab71653c4cdc9b02d44b7

Deployed Bytecode

0x6080604052600436106101c25760003560e01c80637b3c71d3116100f7578063c01f9e3711610095578063deaaa7cc11610064578063deaaa7cc146106e7578063eb9019d414610712578063f8ce560a1461074f578063fc0c546a1461078c576101c2565b8063c01f9e3714610617578063c59057e414610654578063d33219b414610691578063dd4e2ba5146106bc576101c2565b8063a7713a70116100d1578063a7713a701461055b578063a890c91014610586578063ab58fb8e146105af578063b58131b0146105ec576101c2565b80637b3c71d3146104b65780637d5e81e2146104f357806397c3d33414610530576101c2565b80633932abb111610164578063438596321161013e57806343859632146103d2578063544ffc9c1461040f57806354fd4d501461044e5780635678138814610479576101c2565b80633932abb11461032d5780633bccf4fd146103585780633e4f49e614610395576101c2565b806306fdde03116101a057806306fdde0314610258578063160cbed7146102835780632656227d146102c05780632d63f693146102f0576101c2565b806301ffc9a7146101c757806302a251a31461020457806306f3f9e61461022f575b600080fd5b3480156101d357600080fd5b506101ee60048036038101906101e99190612d12565b6107b7565b6040516101fb91906136c9565b60405180910390f35b34801561021057600080fd5b506102196107c9565b6040516102269190613a26565b60405180910390f35b34801561023b57600080fd5b5061025660048036038101906102519190612d6c565b6107d3565b005b34801561026457600080fd5b5061026d61085b565b60405161027a9190613804565b60405180910390f35b34801561028f57600080fd5b506102aa60048036038101906102a59190612b26565b6108ed565b6040516102b79190613a26565b60405180910390f35b6102da60048036038101906102d59190612b26565b610bc5565b6040516102e79190613a26565b60405180910390f35b3480156102fc57600080fd5b5061031760048036038101906103129190612d6c565b610cf8565b6040516103249190613a26565b60405180910390f35b34801561033957600080fd5b50610342610d66565b60405161034f9190613a26565b60405180910390f35b34801561036457600080fd5b5061037f600480360381019061037a9190612eba565b610d6f565b60405161038c9190613a26565b60405180910390f35b3480156103a157600080fd5b506103bc60048036038101906103b79190612d6c565b610df9565b6040516103c991906137e9565b60405180910390f35b3480156103de57600080fd5b506103f960048036038101906103f49190612dc6565b610e0b565b60405161040691906136c9565b60405180910390f35b34801561041b57600080fd5b5061043660048036038101906104319190612d6c565b610e76565b60405161044593929190613b1a565b60405180910390f35b34801561045a57600080fd5b50610463610eae565b6040516104709190613804565b60405180910390f35b34801561048557600080fd5b506104a0600480360381019061049b9190612e06565b610eeb565b6040516104ad9190613a26565b60405180910390f35b3480156104c257600080fd5b506104dd60048036038101906104d89190612e46565b610f1c565b6040516104ea9190613a26565b60405180910390f35b3480156104ff57600080fd5b5061051a60048036038101906105159190612be1565b610f84565b6040516105279190613a26565b60405180910390f35b34801561053c57600080fd5b50610545610f9c565b6040516105529190613a26565b60405180910390f35b34801561056757600080fd5b50610570610fa6565b60405161057d9190613a26565b60405180910390f35b34801561059257600080fd5b506105ad60048036038101906105a89190612d3f565b610fb0565b005b3480156105bb57600080fd5b506105d660048036038101906105d19190612d6c565b611038565b6040516105e39190613a26565b60405180910390f35b3480156105f857600080fd5b50610601611114565b60405161060e9190613a26565b60405180910390f35b34801561062357600080fd5b5061063e60048036038101906106399190612d6c565b611126565b60405161064b9190613a26565b60405180910390f35b34801561066057600080fd5b5061067b60048036038101906106769190612b26565b611194565b6040516106889190613a26565b60405180910390f35b34801561069d57600080fd5b506106a66111d0565b6040516106b39190613524565b60405180910390f35b3480156106c857600080fd5b506106d16111fa565b6040516106de9190613804565b60405180910390f35b3480156106f357600080fd5b506106fc611237565b60405161070991906136e4565b60405180910390f35b34801561071e57600080fd5b5061073960048036038101906107349190612ae6565b61125b565b6040516107469190613a26565b60405180910390f35b34801561075b57600080fd5b5061077660048036038101906107719190612d6c565b61126f565b6040516107839190613a26565b60405180910390f35b34801561079857600080fd5b506107a1611281565b6040516107ae91906137ce565b60405180910390f35b60006107c2826112a5565b9050919050565b600061b2fa905090565b6107db61131f565b73ffffffffffffffffffffffffffffffffffffffff166107f961132e565b73ffffffffffffffffffffffffffffffffffffffff161461084f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084690613846565b60405180910390fd5b61085881611336565b50565b60606000805461086a906140c9565b80601f0160208091040260200160405190810160405280929190818152602001828054610896906140c9565b80156108e35780601f106108b8576101008083540402835291602001916108e3565b820191906000526020600020905b8154815290600101906020018083116108c657829003601f168201915b5050505050905090565b6000806108fc86868686611194565b90506004600781111561091257610911614194565b5b61091b82610df9565b600781111561092d5761092c614194565b5b1461096d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610964906139a6565b60405180910390fd5b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f27a0c926040518163ffffffff1660e01b815260040160206040518083038186803b1580156109d757600080fd5b505afa1580156109eb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a0f9190612d99565b9050600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b1c5f4278888886000896040518663ffffffff1660e01b8152600401610a759594939291906135eb565b60206040518083038186803b158015610a8d57600080fd5b505afa158015610aa1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac59190612ce5565b6005600084815260200190815260200160002081905550600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638f2a0bb0888888600089876040518763ffffffff1660e01b8152600401610b4296959493929190613653565b600060405180830381600087803b158015610b5c57600080fd5b505af1158015610b70573d6000803e3d6000fd5b505050507f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda2892828242610ba29190613de0565b604051610bb0929190613af1565b60405180910390a18192505050949350505050565b600080610bd486868686611194565b90506000610be182610df9565b905060046007811115610bf757610bf6614194565b5b816007811115610c0a57610c09614194565b5b1480610c3a575060056007811115610c2557610c24614194565b5b816007811115610c3857610c37614194565b5b145b610c79576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c70906139a6565b60405180910390fd5b600180600084815260200190815260200160002060020160006101000a81548160ff0219169083151502179055507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051610cd69190613a26565b60405180910390a1610ceb82888888886113cb565b8192505050949350505050565b6000610d55600160008481526020019081526020016000206000016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250506113df565b67ffffffffffffffff169050919050565b60006001905090565b600080610dd0610dc87f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f8989604051602001610dad93929190613752565b604051602081830303815290604052805190602001206113ed565b868686611407565b9050610ded87828860405180602001604052806000815250611432565b91505095945050505050565b6000610e0482611586565b9050919050565b60006002600084815260200190815260200160002060030160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600080600080600260008681526020019081526020016000209050806000015481600101548260020154935093509350509193909250565b60606040518060400160405280600181526020017f3100000000000000000000000000000000000000000000000000000000000000815250905090565b600080610ef661132e565b9050610f1384828560405180602001604052806000815250611432565b91505092915050565b600080610f2761132e565b9050610f7986828787878080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050611432565b915050949350505050565b6000610f92858585856116bd565b9050949350505050565b6000612710905090565b6000600354905090565b610fb861131f565b73ffffffffffffffffffffffffffffffffffffffff16610fd661132e565b73ffffffffffffffffffffffffffffffffffffffff161461102c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102390613846565b60405180910390fd5b61103581611734565b50565b600080600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663d45c443560056000868152602001908152602001600020546040518263ffffffff1660e01b81526004016110a991906136e4565b60206040518083038186803b1580156110c157600080fd5b505afa1580156110d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110f99190612d99565b905060018114611109578061110c565b60005b915050919050565b600069152d02c7e14af6800000905090565b6000611183600160008481526020019081526020016000206001016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250506113df565b67ffffffffffffffff169050919050565b6000848484846040516020016111ad9493929190613591565b6040516020818303038152906040528051906020012060001c9050949350505050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280602081526020017f737570706f72743d627261766f2671756f72756d3d666f722c6162737461696e815250905090565b7f150214d74d59b7d1e90c73fc22ef3d991dd0a76b046543d4d80ab92d2a50328f81565b600061126783836117d3565b905092915050565b600061127a82611888565b9050919050565b7f000000000000000000000000c18360217d8f7ab5e7c516566761ea12ce7f9d7281565b60007f6e665ced000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916148061131857506113178261195e565b5b9050919050565b60006113296119d8565b905090565b600033905090565b61133e610f9c565b811115611380576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137790613866565b60405180910390fd5b60006003549050816003819055507f0553476bf02ef2726e8ce5ced78d63e26e602e4a2257b1f559418e24b463399781836040516113bf929190613af1565b60405180910390a15050565b6113d88585858585611a02565b5050505050565b600081600001519050919050565b60006114006113fa611aa0565b83611b63565b9050919050565b600080600061141887878787611b96565b9150915061142581611ca3565b8192505050949350505050565b6000806001600087815260200190815260200160002090506001600781111561145e5761145d614194565b5b61146787610df9565b600781111561147957611478614194565b5b146114b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b090613926565b60405180910390fd5b600061151786611508846000016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250506113df565b67ffffffffffffffff1661125b565b905061152587878784611e78565b8573ffffffffffffffffffffffffffffffffffffffff167fb8e138887d0aa13bab447e82de9d5c1777041ecd21ca36ba824ff1e6c07ddda4888784886040516115719493929190613b51565b60405180910390a28092505050949350505050565b6000806115928361207e565b9050600460078111156115a8576115a7614194565b5b8160078111156115bb576115ba614194565b5b146115c957809150506116b8565b6000600560008581526020019081526020016000205490506000801b8114156115f65781925050506116b8565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632ab0f529826040518263ffffffff1660e01b815260040161165191906136e4565b60206040518083038186803b15801561166957600080fd5b505afa15801561167d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116a19190612cb8565b156116b1576007925050506116b8565b6005925050505b919050565b60006116c7611114565b6116dd336001436116d89190613eff565b61125b565b101561171e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171590613886565b60405180910390fd5b61172a85858585612245565b9050949350505050565b7f08f74ea46ef7894f65eabfb5e6e695de773a000b47c529ab559178069b226401600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260405161178792919061353f565b60405180910390a180600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60007f000000000000000000000000c18360217d8f7ab5e7c516566761ea12ce7f9d7273ffffffffffffffffffffffffffffffffffffffff16633a46b1a884846040518363ffffffff1660e01b8152600401611830929190613568565b60206040518083038186803b15801561184857600080fd5b505afa15801561185c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118809190612d99565b905092915050565b6000611892610f9c565b61189a610fa6565b7f000000000000000000000000c18360217d8f7ab5e7c516566761ea12ce7f9d7273ffffffffffffffffffffffffffffffffffffffff16638e539e8c856040518263ffffffff1660e01b81526004016118f39190613a26565b60206040518083038186803b15801561190b57600080fd5b505afa15801561191f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119439190612d99565b61194d9190613ea5565b6119579190613e74565b9050919050565b60007fbf26d897000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614806119d157506119d0826124e5565b5b9050919050565b6000600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663e38335e5348686866000876040518763ffffffff1660e01b8152600401611a679594939291906135eb565b6000604051808303818588803b158015611a8057600080fd5b505af1158015611a94573d6000803e3d6000fd5b50505050505050505050565b60007f0000000000000000000000000000000000000000000000000000000000000001461415611af2577f7569da846e8a3624f3e70461387f0c2bae53ef7edc30b5d3a5fbe2b74fa7c7419050611b60565b611b5d7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f7f3c8ab18ed5e5d662533fb34c24530cd8ee1bf1ddbfd2064eec97f4686b090fe97fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc661254f565b90505b90565b60008282604051602001611b789291906134ed565b60405160208183030381529060405280519060200120905092915050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08360001c1115611bd1576000600391509150611c9a565b601b8560ff1614158015611be95750601c8560ff1614155b15611bfb576000600491509150611c9a565b600060018787878760405160008152602001604052604051611c209493929190613789565b6020604051602081039080840390855afa158015611c42573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c9157600060019250925050611c9a565b80600092509250505b94509492505050565b60006004811115611cb757611cb6614194565b5b816004811115611cca57611cc9614194565b5b1415611cd557611e75565b60016004811115611ce957611ce8614194565b5b816004811115611cfc57611cfb614194565b5b1415611d3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3490613826565b60405180910390fd5b60026004811115611d5157611d50614194565b5b816004811115611d6457611d63614194565b5b1415611da5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d9c906138a6565b60405180910390fd5b60036004811115611db957611db8614194565b5b816004811115611dcc57611dcb614194565b5b1415611e0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e04906138e6565b60405180910390fd5b600480811115611e2057611e1f614194565b5b816004811115611e3357611e32614194565b5b1415611e74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e6b90613966565b60405180910390fd5b5b50565b60006002600086815260200190815260200160002090508060030160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611f1e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1590613906565b60405180910390fd5b60018160030160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006002811115611f8c57611f8b614194565b5b60ff168360ff161415611fb95781816000016000828254611fad9190613de0565b92505081905550612077565b60016002811115611fcd57611fcc614194565b5b60ff168360ff161415611ffa5781816001016000828254611fee9190613de0565b92505081905550612076565b60028081111561200d5761200c614194565b5b60ff168360ff16141561203a578181600201600082825461202e9190613de0565b92505081905550612075565b6040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161206c906139e6565b60405180910390fd5b5b5b5050505050565b60008060016000848152602001908152602001600020604051806080016040529081600082016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff16815250508152602001600182016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff168152505081526020016002820160009054906101000a900460ff161515151581526020016002820160019054906101000a900460ff1615151515815250509050806040015115612177576007915050612240565b80606001511561218b576002915050612240565b6121988160000151612589565b156121a7576000915050612240565b6121b48160200151612589565b156121c3576001915050612240565b6121d081602001516125a3565b15612205576121de836125cf565b80156121ef57506121ee83612616565b5b6121fa5760036121fd565b60045b915050612240565b6040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612237906139c6565b60405180910390fd5b919050565b60008061225b8686868680519060200120611194565b905084518651146122a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612298906138c6565b60405180910390fd5b83518651146122e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122dc906138c6565b60405180910390fd5b6000865111612329576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161232090613946565b60405180910390fd5b6000600160008381526020019081526020016000209050612389816000016040518060200160405290816000820160009054906101000a900467ffffffffffffffff1667ffffffffffffffff1667ffffffffffffffff1681525050612641565b6123c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123bf90613a06565b60405180910390fd5b60006123da6123d5610d66565b61265b565b6123e34361265b565b6123ed9190613e36565b905060006124016123fc6107c9565b61265b565b8261240c9190613e36565b905061242482846000016126b290919063ffffffff16565b61243a81846001016126b290919063ffffffff16565b7f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08461246461132e565b8b8b8d5167ffffffffffffffff811115612481576124806141f2565b5b6040519080825280602002602001820160405280156124b457816020015b606081526020019060019003908161249f5790505b508c88888e6040516124ce99989796959493929190613a41565b60405180910390a183945050505050949350505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916827bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916149050919050565b6000838383463060405160200161256a9594939291906136ff565b6040516020818303038152906040528051906020012090509392505050565b600043826000015167ffffffffffffffff16119050919050565b60006125ae826126e1565b80156125c8575043826000015167ffffffffffffffff1611155b9050919050565b600080600260008481526020019081526020016000209050806002015481600101546125fb9190613de0565b61260c61260785610cf8565b61126f565b1115915050919050565b6000806002600084815260200190815260200160002090508060000154816001015411915050919050565b600080826000015167ffffffffffffffff16149050919050565b600067ffffffffffffffff80168211156126aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126a190613986565b60405180910390fd5b819050919050565b808260000160006101000a81548167ffffffffffffffff021916908367ffffffffffffffff1602179055505050565b600080826000015167ffffffffffffffff16119050919050565b600061270e61270984613bc2565b613b9d565b905080838252602082019050828560208602820111156127315761273061422b565b5b60005b85811015612761578161274788826128ed565b845260208401935060208301925050600181019050612734565b5050509392505050565b600061277e61277984613bee565b613b9d565b905080838252602082019050828560208602820111156127a1576127a061422b565b5b60005b858110156127ef57813567ffffffffffffffff8111156127c7576127c6614226565b5b8086016127d489826129e0565b855260208501945060208401935050506001810190506127a4565b5050509392505050565b600061280c61280784613c1a565b613b9d565b9050808382526020820190508285602086028201111561282f5761282e61422b565b5b60005b8581101561285f57816128458882612aa7565b845260208401935060208301925050600181019050612832565b5050509392505050565b600061287c61287784613c46565b613b9d565b90508281526020810184848401111561289857612897614230565b5b6128a3848285614087565b509392505050565b60006128be6128b984613c77565b613b9d565b9050828152602081018484840111156128da576128d9614230565b5b6128e5848285614087565b509392505050565b6000813590506128fc81614718565b92915050565b600082601f83011261291757612916614226565b5b81356129278482602086016126fb565b91505092915050565b600082601f83011261294557612944614226565b5b813561295584826020860161276b565b91505092915050565b600082601f83011261297357612972614226565b5b81356129838482602086016127f9565b91505092915050565b60008151905061299b8161472f565b92915050565b6000813590506129b081614746565b92915050565b6000815190506129c581614746565b92915050565b6000813590506129da8161475d565b92915050565b600082601f8301126129f5576129f4614226565b5b8135612a05848260208601612869565b91505092915050565b600081359050612a1d81614774565b92915050565b60008083601f840112612a3957612a38614226565b5b8235905067ffffffffffffffff811115612a5657612a55614221565b5b602083019150836001820283011115612a7257612a7161422b565b5b9250929050565b600082601f830112612a8e57612a8d614226565b5b8135612a9e8482602086016128ab565b91505092915050565b600081359050612ab68161478b565b92915050565b600081519050612acb8161478b565b92915050565b600081359050612ae0816147a2565b92915050565b60008060408385031215612afd57612afc61423a565b5b6000612b0b858286016128ed565b9250506020612b1c85828601612aa7565b9150509250929050565b60008060008060808587031215612b4057612b3f61423a565b5b600085013567ffffffffffffffff811115612b5e57612b5d614235565b5b612b6a87828801612902565b945050602085013567ffffffffffffffff811115612b8b57612b8a614235565b5b612b978782880161295e565b935050604085013567ffffffffffffffff811115612bb857612bb7614235565b5b612bc487828801612930565b9250506060612bd5878288016129a1565b91505092959194509250565b60008060008060808587031215612bfb57612bfa61423a565b5b600085013567ffffffffffffffff811115612c1957612c18614235565b5b612c2587828801612902565b945050602085013567ffffffffffffffff811115612c4657612c45614235565b5b612c528782880161295e565b935050604085013567ffffffffffffffff811115612c7357612c72614235565b5b612c7f87828801612930565b925050606085013567ffffffffffffffff811115612ca057612c9f614235565b5b612cac87828801612a79565b91505092959194509250565b600060208284031215612cce57612ccd61423a565b5b6000612cdc8482850161298c565b91505092915050565b600060208284031215612cfb57612cfa61423a565b5b6000612d09848285016129b6565b91505092915050565b600060208284031215612d2857612d2761423a565b5b6000612d36848285016129cb565b91505092915050565b600060208284031215612d5557612d5461423a565b5b6000612d6384828501612a0e565b91505092915050565b600060208284031215612d8257612d8161423a565b5b6000612d9084828501612aa7565b91505092915050565b600060208284031215612daf57612dae61423a565b5b6000612dbd84828501612abc565b91505092915050565b60008060408385031215612ddd57612ddc61423a565b5b6000612deb85828601612aa7565b9250506020612dfc858286016128ed565b9150509250929050565b60008060408385031215612e1d57612e1c61423a565b5b6000612e2b85828601612aa7565b9250506020612e3c85828601612ad1565b9150509250929050565b60008060008060608587031215612e6057612e5f61423a565b5b6000612e6e87828801612aa7565b9450506020612e7f87828801612ad1565b935050604085013567ffffffffffffffff811115612ea057612e9f614235565b5b612eac87828801612a23565b925092505092959194509250565b600080600080600060a08688031215612ed657612ed561423a565b5b6000612ee488828901612aa7565b9550506020612ef588828901612ad1565b9450506040612f0688828901612ad1565b9350506060612f17888289016129a1565b9250506080612f28888289016129a1565b9150509295509295909350565b6000612f418383612f8d565b60208301905092915050565b6000612f598383613186565b905092915050565b6000612f6d83836131ec565b905092915050565b6000612f8183836134b1565b60208301905092915050565b612f9681613f33565b82525050565b612fa581613f33565b82525050565b6000612fb682613ce8565b612fc08185613d5e565b9350612fcb83613ca8565b8060005b83811015612ffc578151612fe38882612f35565b9750612fee83613d2a565b925050600181019050612fcf565b5085935050505092915050565b600061301482613cf3565b61301e8185613d6f565b93508360208202850161303085613cb8565b8060005b8581101561306c578484038952815161304d8582612f4d565b945061305883613d37565b925060208a01995050600181019050613034565b50829750879550505050505092915050565b600061308982613cfe565b6130938185613d80565b9350836020820285016130a585613cc8565b8060005b858110156130e157848403895281516130c28582612f61565b94506130cd83613d44565b925060208a019950506001810190506130a9565b50829750879550505050505092915050565b60006130fe82613d09565b6131088185613d91565b935061311383613cd8565b8060005b8381101561314457815161312b8882612f75565b975061313683613d51565b925050600181019050613117565b5085935050505092915050565b61315a81613f57565b82525050565b61316981613f63565b82525050565b61318061317b82613f63565b61412c565b82525050565b600061319182613d14565b61319b8185613da2565b93506131ab818560208601614096565b6131b48161423f565b840191505092915050565b6131c881614013565b82525050565b6131d781614025565b82525050565b6131e681614037565b82525050565b60006131f782613d1f565b6132018185613db3565b9350613211818560208601614096565b61321a8161423f565b840191505092915050565b600061323082613d1f565b61323a8185613dc4565b935061324a818560208601614096565b6132538161423f565b840191505092915050565b600061326b601883613dc4565b91506132768261425d565b602082019050919050565b600061328e601883613dc4565b915061329982614286565b602082019050919050565b60006132b1604383613dc4565b91506132bc826142af565b606082019050919050565b60006132d4604383613dc4565b91506132df82614324565b606082019050919050565b60006132f7601f83613dc4565b915061330282614399565b602082019050919050565b600061331a600283613dd5565b9150613325826143c2565b600282019050919050565b600061333d602183613dc4565b9150613348826143eb565b604082019050919050565b6000613360602283613dc4565b915061336b8261443a565b604082019050919050565b6000613383602783613dc4565b915061338e82614489565b604082019050919050565b60006133a6602383613dc4565b91506133b1826144d8565b604082019050919050565b60006133c9601883613dc4565b91506133d482614527565b602082019050919050565b60006133ec602283613dc4565b91506133f782614550565b604082019050919050565b600061340f602683613dc4565b915061341a8261459f565b604082019050919050565b6000613432602183613dc4565b915061343d826145ee565b604082019050919050565b6000613455601d83613dc4565b91506134608261463d565b602082019050919050565b6000613478603583613dc4565b915061348382614666565b604082019050919050565b600061349b602183613dc4565b91506134a6826146b5565b604082019050919050565b6134ba81613fe8565b82525050565b6134c981613fe8565b82525050565b6134d881614075565b82525050565b6134e781614006565b82525050565b60006134f88261330d565b9150613504828561316f565b602082019150613514828461316f565b6020820191508190509392505050565b60006020820190506135396000830184612f9c565b92915050565b60006040820190506135546000830185612f9c565b6135616020830184612f9c565b9392505050565b600060408201905061357d6000830185612f9c565b61358a60208301846134c0565b9392505050565b600060808201905081810360008301526135ab8187612fab565b905081810360208301526135bf81866130f3565b905081810360408301526135d38185613009565b90506135e26060830184613160565b95945050505050565b600060a08201905081810360008301526136058188612fab565b9050818103602083015261361981876130f3565b9050818103604083015261362d8186613009565b905061363c60608301856131dd565b6136496080830184613160565b9695505050505050565b600060c082019050818103600083015261366d8189612fab565b9050818103602083015261368181886130f3565b905081810360408301526136958187613009565b90506136a460608301866131dd565b6136b16080830185613160565b6136be60a08301846134c0565b979650505050505050565b60006020820190506136de6000830184613151565b92915050565b60006020820190506136f96000830184613160565b92915050565b600060a0820190506137146000830188613160565b6137216020830187613160565b61372e6040830186613160565b61373b60608301856134c0565b6137486080830184612f9c565b9695505050505050565b60006060820190506137676000830186613160565b61377460208301856134c0565b61378160408301846134de565b949350505050565b600060808201905061379e6000830187613160565b6137ab60208301866134de565b6137b86040830185613160565b6137c56060830184613160565b95945050505050565b60006020820190506137e360008301846131bf565b92915050565b60006020820190506137fe60008301846131ce565b92915050565b6000602082019050818103600083015261381e8184613225565b905092915050565b6000602082019050818103600083015261383f8161325e565b9050919050565b6000602082019050818103600083015261385f81613281565b9050919050565b6000602082019050818103600083015261387f816132a4565b9050919050565b6000602082019050818103600083015261389f816132c7565b9050919050565b600060208201905081810360008301526138bf816132ea565b9050919050565b600060208201905081810360008301526138df81613330565b9050919050565b600060208201905081810360008301526138ff81613353565b9050919050565b6000602082019050818103600083015261391f81613376565b9050919050565b6000602082019050818103600083015261393f81613399565b9050919050565b6000602082019050818103600083015261395f816133bc565b9050919050565b6000602082019050818103600083015261397f816133df565b9050919050565b6000602082019050818103600083015261399f81613402565b9050919050565b600060208201905081810360008301526139bf81613425565b9050919050565b600060208201905081810360008301526139df81613448565b9050919050565b600060208201905081810360008301526139ff8161346b565b9050919050565b60006020820190508181036000830152613a1f8161348e565b9050919050565b6000602082019050613a3b60008301846134c0565b92915050565b600061012082019050613a57600083018c6134c0565b613a64602083018b612f9c565b8181036040830152613a76818a612fab565b90508181036060830152613a8a81896130f3565b90508181036080830152613a9e818861307e565b905081810360a0830152613ab28187613009565b9050613ac160c08301866134cf565b613ace60e08301856134cf565b818103610100830152613ae18184613225565b90509a9950505050505050505050565b6000604082019050613b0660008301856134c0565b613b1360208301846134c0565b9392505050565b6000606082019050613b2f60008301866134c0565b613b3c60208301856134c0565b613b4960408301846134c0565b949350505050565b6000608082019050613b6660008301876134c0565b613b7360208301866134de565b613b8060408301856134c0565b8181036060830152613b928184613225565b905095945050505050565b6000613ba7613bb8565b9050613bb382826140fb565b919050565b6000604051905090565b600067ffffffffffffffff821115613bdd57613bdc6141f2565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613c0957613c086141f2565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613c3557613c346141f2565b5b602082029050602081019050919050565b600067ffffffffffffffff821115613c6157613c606141f2565b5b613c6a8261423f565b9050602081019050919050565b600067ffffffffffffffff821115613c9257613c916141f2565b5b613c9b8261423f565b9050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600081905092915050565b6000613deb82613fe8565b9150613df683613fe8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613e2b57613e2a614136565b5b828201905092915050565b6000613e4182613ff2565b9150613e4c83613ff2565b92508267ffffffffffffffff03821115613e6957613e68614136565b5b828201905092915050565b6000613e7f82613fe8565b9150613e8a83613fe8565b925082613e9a57613e99614165565b5b828204905092915050565b6000613eb082613fe8565b9150613ebb83613fe8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613ef457613ef3614136565b5b828202905092915050565b6000613f0a82613fe8565b9150613f1583613fe8565b925082821015613f2857613f27614136565b5b828203905092915050565b6000613f3e82613fc8565b9050919050565b6000613f5082613fc8565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b6000613fa482613f45565b9050919050565b6000819050613fb982614704565b919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b600061401e82614051565b9050919050565b600061403082613fab565b9050919050565b600061404a61404583613fbe565b614250565b9050919050565b600061405c82614063565b9050919050565b600061406e82613fc8565b9050919050565b600061408082613ff2565b9050919050565b82818337600083830152505050565b60005b838110156140b4578082015181840152602081019050614099565b838111156140c3576000848401525b50505050565b600060028204905060018216806140e157607f821691505b602082108114156140f5576140f46141c3565b5b50919050565b6141048261423f565b810181811067ffffffffffffffff82111715614123576141226141f2565b5b80604052505050565b6000819050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b60008160001b9050919050565b7f45434453413a20696e76616c6964207369676e61747572650000000000000000600082015250565b7f476f7665726e6f723a206f6e6c79476f7665726e616e63650000000000000000600082015250565b7f476f7665726e6f72566f74657351756f72756d4672616374696f6e3a2071756f60008201527f72756d4e756d657261746f72206f7665722071756f72756d44656e6f6d696e6160208201527f746f720000000000000000000000000000000000000000000000000000000000604082015250565b7f476f7665726e6f72436f6d7061746962696c697479427261766f3a2070726f7060008201527f6f73657220766f7465732062656c6f772070726f706f73616c2074687265736860208201527f6f6c640000000000000000000000000000000000000000000000000000000000604082015250565b7f45434453413a20696e76616c6964207369676e6174757265206c656e67746800600082015250565b7f1901000000000000000000000000000000000000000000000000000000000000600082015250565b7f476f7665726e6f723a20696e76616c69642070726f706f73616c206c656e677460008201527f6800000000000000000000000000000000000000000000000000000000000000602082015250565b7f45434453413a20696e76616c6964207369676e6174757265202773272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f72566f74696e6753696d706c653a20766f746520616c72656160008201527f6479206361737400000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f723a20766f7465206e6f742063757272656e746c792061637460008201527f6976650000000000000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f723a20656d7074792070726f706f73616c0000000000000000600082015250565b7f45434453413a20696e76616c6964207369676e6174757265202776272076616c60008201527f7565000000000000000000000000000000000000000000000000000000000000602082015250565b7f53616665436173743a2076616c756520646f65736e27742066697420696e203660008201527f3420626974730000000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f723a2070726f706f73616c206e6f742073756363657373667560008201527f6c00000000000000000000000000000000000000000000000000000000000000602082015250565b7f476f7665726e6f723a20756e6b6e6f776e2070726f706f73616c206964000000600082015250565b7f476f7665726e6f72566f74696e6753696d706c653a20696e76616c696420766160008201527f6c756520666f7220656e756d20566f7465547970650000000000000000000000602082015250565b7f476f7665726e6f723a2070726f706f73616c20616c726561647920657869737460008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b6008811061471557614714614194565b5b50565b61472181613f33565b811461472c57600080fd5b50565b61473881613f57565b811461474357600080fd5b50565b61474f81613f63565b811461475a57600080fd5b50565b61476681613f6d565b811461477157600080fd5b50565b61477d81613f99565b811461478857600080fd5b50565b61479481613fe8565b811461479f57600080fd5b50565b6147ab81614006565b81146147b657600080fd5b5056fea26469706673582212200ab3f080b5e14d820d51ca1af7f4b8bf4ac9f2bda95fb6ad6a5bb488208e270364736f6c63430008070033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000c18360217d8f7ab5e7c516566761ea12ce7f9d72000000000000000000000000fe89cc7abb2c4183683ab71653c4cdc9b02d44b7

-----Decoded View---------------
Arg [0] : _token (address): 0xC18360217D8F7Ab5e7c516566761Ea12Ce7F9D72
Arg [1] : _timelock (address): 0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000c18360217d8f7ab5e7c516566761ea12ce7f9d72
Arg [1] : 000000000000000000000000fe89cc7abb2c4183683ab71653c4cdc9b02d44b7


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.