{
    "Function": "_startBridge",
    "File": "src/Facets/NXTPFacet.sol",
    "Parent Contracts": [
        "src/Facets/Swapper.sol",
        "src/Interfaces/ILiFi.sol"
    ],
    "High-Level Calls": [
        "ITransactionManager",
        "LibAsset",
        "LibAsset"
    ],
    "Internal Calls": [
        "getStorage"
    ],
    "Library Calls": [
        "approveERC20",
        "isNativeAsset"
    ],
    "Low-Level Calls": [],
    "Code": "function _startBridge(bytes32 _transactionId, ITransactionManager.PrepareArgs memory _nxtpData) internal {\n        Storage storage s = getStorage();\n        IERC20 sendingAssetId = IERC20(_nxtpData.invariantData.sendingAssetId);\n\n        // Give Connext approval to bridge tokens\n        LibAsset.approveERC20(IERC20(sendingAssetId), address(s.nxtpTxManager), _nxtpData.amount);\n\n        uint256 value = LibAsset.isNativeAsset(address(sendingAssetId)) ? _nxtpData.amount : 0;\n\n        // Initiate bridge transaction on sending chain\n        ITransactionManager.TransactionData memory result = s.nxtpTxManager.prepare{ value: value }(_nxtpData);\n\n        emit NXTPBridgeStarted(_transactionId, result.transactionId, result);\n    }"
}