{
    "Function": "restructure",
    "File": "contracts/routers/FullRouter.sol",
    "Parent Contracts": [
        "contracts/routers/StrategyRouter.sol",
        "contracts/helpers/StrategyTypes.sol",
        "contracts/interfaces/IStrategyRouter.sol"
    ],
    "High-Level Calls": [
        "IStrategy",
        "IStrategy",
        "IStrategy",
        "IOracle"
    ],
    "Internal Calls": [
        "_batchSell",
        "_batchBuy",
        "abi.decode()",
        "_startTempEstimateSession",
        "onlyController"
    ],
    "Library Calls": [],
    "Low-Level Calls": [],
    "Code": "function restructure(address strategy, bytes calldata data)\n        external\n        override\n        onlyController\n    {\n        _startTempEstimateSession(strategy);\n        (\n          uint256 currentTotal,\n          int256[] memory currentEstimates,\n          address[] memory currentItems,\n          address[] memory currentDebt\n        ) = abi.decode(data, (uint256, int256[], address[], address[]));\n\n        _batchSell(strategy, currentTotal, currentEstimates, currentItems, currentDebt);\n        (uint256 newTotal, int256[] memory newEstimates) = IOracle(IStrategy(strategy).oracle()).estimateStrategy(IStrategy(strategy));\n        address[] memory newItems = IStrategy(strategy).items();\n        address[] memory newDebt = IStrategy(strategy).debt();\n        _batchBuy(strategy, strategy, newTotal, newEstimates, newItems, newDebt);\n    }"
}