creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "@openzeppelin/contracts/access/Ownable.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)\n\npragma solidity ^0.8.0;\n\nimport \"../utils/Context.sol\";\n\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * By default, the owner account will be the one that deploys the contract. This\n * can later be changed with {transferOwnership}.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\nabstract contract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor() {\n        _transferOwnership(_msgSender());\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        _checkOwner();\n        _;\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view virtual returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if the sender is not the owner.\n     */\n    function _checkOwner() internal view virtual {\n        require(owner() == _msgSender(), \"Ownable: caller is not the owner\");\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby disabling any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public virtual onlyOwner {\n        _transferOwnership(address(0));\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public virtual onlyOwner {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Internal function without access restriction.\n     */\n    function _transferOwnership(address newOwner) internal virtual {\n        address oldOwner = _owner;\n        _owner = newOwner;\n        emit OwnershipTransferred(oldOwner, newOwner);\n    }\n}\n"
      },
      "@openzeppelin/contracts/utils/Context.sol": {
        "content": "// SPDX-License-Identifier: MIT\n// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)\n\npragma solidity ^0.8.0;\n\n/**\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\nabstract contract Context {\n    function _msgSender() internal view virtual returns (address) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view virtual returns (bytes calldata) {\n        return msg.data;\n    }\n}\n"
      },
      "contracts/vesting/VECVesting.sol": {
        "content": "pragma solidity 0.8.19;\n\nimport \"@openzeppelin/contracts/access/Ownable.sol\";\n\ninterface IERC20 {\n    function transfer(address to, uint256 value) external returns (bool);\n}\n\ncontract VECVest is Ownable {\n    /// STRUCTS ///\n\n    struct Term {\n        uint256 totalToVest;\n        uint256 amountClaimed;\n    }\n\n    /// STATE VARIABLES ///\n\n    /// @notice Claim Token\n    address public immutable VEC;\n    /// @notice Address of deployer\n    address public immutable deployer;\n    /// @notice Tracks address term info\n    mapping(address => Term) public terms;\n    /// @notice Tracks address change\n    mapping(address => address) public walletChange;\n    uint256 public totalAllocated;\n    /// @notice Total VEC allocated == 1,000,000\n    uint256 public constant MAX_ALLOCATED = 1_000_000 * 1e9;\n    /// @notice Timestamp becomes fully vested\n    uint256 public immutable fullVest;\n    /// @notice Timestamp vesting started\n    uint256 public immutable startVest;\n\n    constructor() Ownable() {\n        VEC = 0x1BB9b64927e0C5e207C9DB4093b3738Eef5D8447;\n        deployer = msg.sender;\n\n        startVest = 1706200400;\n        fullVest = 1706200400 + 365 days;\n    }\n\n    /// MUTABLE FUNCTIONS ///\n\n    /// @notice         Allows wallet to claim VEC\n    /// @param _to      Address to transfer minted VEC to\n    /// @param _amount  Amount of VEC to claim\n    function claim(address _to, uint256 _amount) external {\n        require(redeemableFor(msg.sender) >= _amount, \"Claim more than vested\");\n        IERC20(VEC).transfer(_to, _amount);\n        terms[msg.sender].amountClaimed += _amount;\n    }\n\n    /// WALLET CHANGES ///\n\n    /// @notice             Allows address to push terms to new address\n    /// @param _newAddress  New wallets address\n    function pushWalletChange(address _newAddress) external {\n        require(terms[msg.sender].totalToVest != 0, \"No wallet to change\");\n        walletChange[msg.sender] = _newAddress;\n    }\n\n    /// @notice             Allows new address to pull terms\n    /// @param _oldAddress  Old address to pull terms for\n    function pullWalletChange(address _oldAddress) external {\n        require(walletChange[_oldAddress] == msg.sender, \"Old wallet did not push\");\n        require(terms[msg.sender].totalToVest == 0, \"Wallet already exists\");\n\n        walletChange[_oldAddress] = address(0);\n        terms[msg.sender] = terms[_oldAddress];\n        delete terms[_oldAddress];\n    }\n\n    /// VIEW FUNCTIONS ///\n\n    /// @notice       Returns % of overall vesting completed\n    /// @return uint  Percent of overall vesting 1e8 == 10%\n    function percentVested() public view returns (uint256) {\n        if (block.timestamp > fullVest) return 1e9;\n\n        uint256 timeSinceVestStart = block.timestamp - startVest;\n\n        return ((1e9 * timeSinceVestStart) / 365 days);\n    }\n\n    /// @notice          View VEC redeemable for `_address`\n    /// @param _address  Redeemable for address\n    /// @return uint256  VEC redeemable for `_address`\n    function redeemableFor(address _address) public view returns (uint256) {\n        Term memory info = terms[_address];\n        uint256 totalReedemable = (info.totalToVest * percentVested()) / 1e9;\n\n        if (totalReedemable < info.amountClaimed) return 0;\n        return totalReedemable - info.amountClaimed;\n    }\n\n    /// OWNER FUNCTIONS ///\n\n    /// @notice         Set terms for new address\n    /// @notice         Cannot lower for address or exceed maximum total allocation\n    /// @param _address Address of who to set terms for\n    /// @param _amount  Amount of VEC to vest  \n    function setTerms(address _address, uint256 _amount) external {\n        require(msg.sender == owner() || msg.sender == deployer, \"msg.sender not approved\");\n        require(terms[_address].totalToVest == 0, \"Address already exists\");\n        terms[_address] = Term({totalToVest: _amount, amountClaimed: 0});\n        require(totalAllocated + _amount <= MAX_ALLOCATED, \"Cannot allocate more than 1,000,000 VEC\");\n        totalAllocated += _amount;\n    }\n}\n"
      }
    },
    "settings": {
      "optimizer": {
        "enabled": true,
        "runs": 1000
      },
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      },
      "libraries": {}
    }
  }}