```\nfunction getUserOpGasPrice(MemoryUserOp memory mUserOp) internal view returns (uint256) {\nunchecked {\n    uint256 maxFeePerGas = mUserOp.maxFeePerGas;\n    uint256 maxPriorityFeePerGas = mUserOp.maxPriorityFeePerGas;\n    if (maxFeePerGas == maxPriorityFeePerGas) {\n        //legacy mode (for networks that don't support basefee opcode)\n        return maxFeePerGas;\n    }\n    return min(maxFeePerGas, maxPriorityFeePerGas + block.basefee);\n}\n}\n```\n