{
    "Function": "slitherConstructorConstantVariables",
    "File": "contracts/routers/MulticallRouter.sol",
    "Parent Contracts": [
        "contracts/helpers/Multicall.sol",
        "contracts/routers/StrategyRouter.sol",
        "contracts/helpers/StrategyTypes.sol",
        "contracts/interfaces/IStrategyRouter.sol"
    ],
    "High-Level Calls": [],
    "Internal Calls": [],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "contract MulticallRouter is StrategyRouter, Multicall {\n    using SafeERC20 for IERC20;\n\n    /**\n     * @notice Setup StrategyRouter\n     */\n    constructor(address controller_) public StrategyRouter(RouterCategory.GENERIC, controller_) {}\n\n    /**\n     * @notice Executes provided calldata to achieve a deposit for the Strategy\n     */\n    // Receive call from controller\n    function deposit(address, bytes memory data)\n        external\n        override\n        onlyController\n    {\n        Call[] memory callStructs = abi.decode(data, (Call[]));\n        aggregate(callStructs);\n    }\n\n    function withdraw(address, bytes calldata data)\n        external\n        override\n        onlyController\n    {\n        Call[] memory callStructs = abi.decode(data, (Call[]));\n        aggregate(callStructs);\n    }\n\n    /**\n     * @notice Executes provided calldata to achieve a rebalance for the Strategy\n     */\n    // Receive call from controller\n    function rebalance(address, bytes memory data) external override onlyController {\n        Call[] memory callStructs = abi.decode(data, (Call[]));\n        aggregate(callStructs);\n    }\n\n    function restructure(address, bytes memory data) external override onlyController {\n        Call[] memory callStructs = abi.decode(data, (Call[]));\n        aggregate(callStructs);\n    }\n\n    /**\n     * @notice Helper function to encode typed struct into bytes\n     */\n    function encodeCalls(Call[] calldata calls) external pure returns (bytes memory data) {\n        data = abi.encode(calls);\n    }\n\n    /**\n     * @notice Uses delegate call to swap tokens\n     * @dev Delegate call to avoid redundant token transfers\n     */\n    function delegateSwap(\n        address adapter,\n        uint256 amount,\n        uint256 expected,\n        address tokenIn,\n        address tokenOut,\n        address from,\n        address to\n    ) public {\n        _onlyInternal();\n        _delegateSwap(\n            adapter,\n            amount,\n            expected,\n            tokenIn,\n            tokenOut,\n            from,\n            to\n        );\n    }\n\n    function settleSwap(\n        address adapter,\n        address tokenIn,\n        address tokenOut,\n        address from,\n        address to\n    ) public {\n        _onlyInternal();\n        uint256 amount = IERC20(tokenIn).balanceOf(from);\n        if (amount > 0)\n            _delegateSwap(adapter, amount, 0, tokenIn, tokenOut, from, to);\n    }\n\n    function settleTransfer(\n        address token,\n        address to\n    ) public {\n        _onlyInternal();\n        IERC20 erc20 = IERC20(token);\n        uint256 amount = erc20.balanceOf(address(this));\n        if (amount > 0) erc20.safeTransfer(to, amount);\n    }\n\n    function settleTransferFrom(\n        address token,\n        address from,\n        address to\n    ) public {\n        _onlyInternal();\n        IERC20 erc20 = IERC20(token);\n        uint256 amount = erc20.balanceOf(from);\n        if (amount > 0) erc20.safeTransferFrom(from, to, amount);\n    }\n\n    function _onlyInternal() internal view {\n        require(msg.sender == address(this), \"Only internal\");\n    }\n}"
}