{
    "Function": "completeBridgeTokensViaNXTP",
    "File": "src/Facets/NXTPFacet.sol",
    "Parent Contracts": [
        "src/Facets/Swapper.sol",
        "src/Interfaces/ILiFi.sol"
    ],
    "High-Level Calls": [
        "LibAsset",
        "LibAsset",
        "LibAsset"
    ],
    "Internal Calls": [
        "require(bool,string)",
        "require(bool,string)"
    ],
    "Library Calls": [
        "transferAsset",
        "transferFromERC20",
        "isNativeAsset"
    ],
    "Low-Level Calls": [],
    "Code": "function completeBridgeTokensViaNXTP(\n        LiFiData memory _lifiData,\n        address assetId,\n        address receiver,\n        uint256 amount\n    ) public payable {\n        if (LibAsset.isNativeAsset(assetId)) {\n            require(msg.value == amount, \"INVALID_ETH_AMOUNT\");\n        } else {\n            require(msg.value == 0, \"ETH_WITH_ERC\");\n            LibAsset.transferFromERC20(assetId, msg.sender, address(this), amount);\n        }\n\n        LibAsset.transferAsset(assetId, payable(receiver), amount);\n\n        emit LiFiTransferCompleted(_lifiData.transactionId, assetId, receiver, amount, block.timestamp);\n    }"
}