```\nfunction swap(\n    string calldata aggregatorId,\n    IERC20 tokenFrom,\n    uint256 amount,\n    bytes calldata data\n) external payable whenNotPaused nonReentrant {\n    Adapter storage adapter = adapters[aggregatorId];\n\n    if (address(tokenFrom) != Constants.ETH) {\n        tokenFrom.safeTransferFrom(msg.sender, address(spender), amount);\n    }\n\n    spender.swap{value: msg.value}(\n        adapter.addr,\n```\n