{
    "Function": "_checkVault",
    "File": "contracts/adapters/vaults/YEarnV2Adapter.sol",
    "Parent Contracts": [
        "contracts/adapters/BaseAdapter.sol",
        "contracts/interfaces/IBaseAdapter.sol"
    ],
    "High-Level Calls": [
        "GasCostProvider"
    ],
    "Internal Calls": [
        "mstore(uint256,uint256)",
        "mload(uint256)",
        "keccak256(bytes)",
        "mload(uint256)",
        "mstore(uint256,uint256)",
        "staticcall(uint256,uint256,uint256,uint256,uint256,uint256)"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function _checkVault(address vault) internal view returns (bool) {\n        bytes32 selector = keccak256(\"token()\");\n        uint256 gasCost = gasCostProvider.gasCost();\n\n        bool success;\n        address token;\n        assembly {\n            let ptr := mload(0x40)\n            mstore(0x40, add(ptr, 32))\n            mstore(ptr, selector)\n            success := staticcall(\n                gasCost,\n                vault,\n                ptr,\n                4,\n                ptr,\n                32\n            )\n            token := mload(ptr)\n        }\n        return success && token != address(0);\n    }"
}