{
    "Function": "create_lock",
    "File": "contracts/mocks/curve/MockCurveVoteEscrow.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts-0.8/token/ERC20/ERC20.sol",
        "node_modules/@openzeppelin/contracts-0.8/token/ERC20/extensions/IERC20Metadata.sol",
        "node_modules/@openzeppelin/contracts-0.8/token/ERC20/IERC20.sol",
        "node_modules/@openzeppelin/contracts-0.8/utils/Context.sol"
    ],
    "High-Level Calls": [
        "MockWalletChecker",
        "IERC20"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)",
        "require(bool,string)",
        "_mint"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function create_lock(uint256 amount, uint256 unlockTime) external {\n        require(MockWalletChecker(smart_wallet_checker).check(msg.sender), \"!contracts\");\n        require(lockAmounts[msg.sender] == 0, \"Withdraw old tokens first\");\n        require(unlockTime < block.timestamp + MAX_LEN, \"Lock too long\");\n        require(amount > 0, \"!amount\");\n\n        lockAmounts[msg.sender] = amount;\n        lockTimes[msg.sender] = unlockTime;\n\n        IERC20(token).transferFrom(msg.sender, address(this), amount);\n        _mint(msg.sender, amount);\n    }"
}