{
    "Function": "deposit",
    "File": "contracts/mock/MockGenericVault.sol",
    "Parent Contracts": [
        "contracts/mock/MockERC20.sol"
    ],
    "High-Level Calls": [
        "IERC20",
        "SafeMath",
        "SafeMath",
        "IERC20",
        "SafeERC20",
        "SafeMath"
    ],
    "Internal Calls": [
        "totalSupply",
        "totalSupply",
        "balance",
        "_mint"
    ],
    "Library Calls": [
        "safeTransferFrom",
        "sub",
        "mul",
        "div"
    ],
    "Low-Level Calls": [],
    "Code": "function deposit(uint _amount) public {\n        uint _pool = balance();\n        uint _before = token.balanceOf(address(this));\n        token.safeTransferFrom(msg.sender, address(this), _amount);\n        uint _after = token.balanceOf(address(this));\n        _amount = _after.sub(_before);\n        uint shares = 0;\n        if (totalSupply() == 0) {\n            shares = _amount;\n        } else {\n            shares = (_amount.mul(totalSupply())).div(_pool);\n        }\n        _mint(msg.sender, shares);\n    }"
}