{
    "Function": "sweep",
    "File": "src/LBRouter.sol",
    "Parent Contracts": [
        "src/interfaces/ILBRouter.sol"
    ],
    "High-Level Calls": [
        "TokenHelper",
        "IERC20"
    ],
    "Internal Calls": [
        "_safeTransferAVAX",
        "onlyFactoryOwner",
        "balance(address)"
    ],
    "Library Calls": [
        "safeTransfer"
    ],
    "Low-Level Calls": [],
    "Code": "function sweep(\n        IERC20 _token,\n        address _to,\n        uint256 _amount\n    ) external override onlyFactoryOwner {\n        if (address(_token) == address(0)) {\n            if (_amount == type(uint256).max) _amount = address(this).balance;\n            _safeTransferAVAX(_to, _amount);\n        } else {\n            if (_amount == type(uint256).max) _amount = _token.balanceOf(address(this));\n            _token.safeTransfer(_to, _amount);\n        }\n    }"
}