{
    "Function": "withdrawAll",
    "File": "contracts/SavingsAccount/SavingsAccount.sol",
    "Parent Contracts": [
        "node_modules/@openzeppelin/contracts/utils/ReentrancyGuard.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol",
        "node_modules/@openzeppelin/contracts-upgradeable/proxy/Initializable.sol",
        "contracts/interfaces/ISavingsAccount.sol"
    ],
    "High-Level Calls": [
        "IYield"
    ],
    "Internal Calls": [
        "nonReentrant",
        "_transfer"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function withdrawAll(address _token, address _strategy) external override nonReentrant returns (uint256 _tokenReceived) {\n        uint256 _sharesBalance = balanceInShares[msg.sender][_token][_strategy];\n\n        if(_sharesBalance == 0) return 0;\n\n        uint256 _amount = IYield(_strategy).unlockTokens(_token, _sharesBalance);\n\n        delete balanceInShares[msg.sender][_token][_strategy];\n\n        _transfer(_amount, _token, payable(msg.sender));\n\n        emit Withdrawn(msg.sender, msg.sender, _amount, _token, _strategy, false);\n    }"
}