|
|
<!DOCTYPE html> |
|
|
<html lang="en"> |
|
|
<head> |
|
|
<meta charset="UTF-8"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
<title>SolGuardian - Smart Contract Analysis</title> |
|
|
<link rel="stylesheet" href="style.css"> |
|
|
<script src="https://cdn.tailwindcss.com"></script> |
|
|
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> |
|
|
<script src="https://unpkg.com/feather-icons"></script> |
|
|
<script src="https://cdn.jsdelivr.net/npm/three@0.132.2/build/three.min.js"></script> |
|
|
<script src="https://cdn.jsdelivr.net/npm/three@0.132.2/examples/js/controls/OrbitControls.js"></script> |
|
|
<script src="https://cdn.jsdelivr.net/npm/d3@7"></script> |
|
|
<script src="components/navbar.js"></script> |
|
|
<script src="components/file-card.js"></script> |
|
|
</head> |
|
|
<body class="bg-gray-100 min-h-screen"> |
|
|
<custom-navbar></custom-navbar> |
|
|
|
|
|
<main class="container mx-auto px-4 py-8"> |
|
|
<div class="text-center mb-12"> |
|
|
<h1 class="text-4xl font-bold text-gray-800 mb-4">Smart Contract Vulnerability Scanner</h1> |
|
|
<p class="text-xl text-gray-600 max-w-3xl mx-auto">Upload your Solidity files to detect vulnerabilities with AI-powered analysis</p> |
|
|
</div> |
|
|
|
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6" id="file-container"> |
|
|
|
|
|
|
|
|
|
|
|
<div class="bg-white rounded-xl shadow-md overflow-hidden hover:shadow-lg transition-shadow duration-300 cursor-pointer" id="add-file-card" onclick="document.getElementById('upload-modal').classList.remove('hidden')"> |
|
|
<div class="p-8 flex flex-col items-center justify-center h-full"> |
|
|
<i data-feather="plus" class="w-16 h-16 text-blue-500 mb-4"></i> |
|
|
<h3 class="text-xl font-semibold text-gray-800">Add New Contract</h3> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div id="upload-modal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center hidden z-50"> |
|
|
<div class="bg-white rounded-xl p-8 w-full max-w-md"> |
|
|
<div class="flex justify-between items-center mb-6"> |
|
|
<h3 class="text-2xl font-bold text-gray-800">Upload Solidity File</h3> |
|
|
<button id="close-modal" class="text-gray-500 hover:text-gray-700"> |
|
|
<i data-feather="x"></i> |
|
|
</button> |
|
|
</div> |
|
|
|
|
|
<form id="upload-form" class="space-y-6"> |
|
|
<div> |
|
|
<label for="file-name" class="block text-sm font-medium text-gray-700 mb-1">Project Name</label> |
|
|
<input type="text" id="file-name" required class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500"> |
|
|
</div> |
|
|
|
|
|
<div> |
|
|
<label for="file-upload" class="block text-sm font-medium text-gray-700 mb-1">Solidity File</label> |
|
|
<div class="mt-1 flex justify-center px-6 pt-5 pb-6 border-2 border-gray-300 border-dashed rounded-lg"> |
|
|
<div class="space-y-1 text-center"> |
|
|
<div class="flex text-sm text-gray-600"> |
|
|
<label for="file-upload" class="relative cursor-pointer bg-white rounded-md font-medium text-blue-600 hover:text-blue-500 focus-within:outline-none"> |
|
|
<span>Upload a file</span> |
|
|
<input id="file-upload" name="file-upload" type="file" accept=".sol" class="sr-only" required> |
|
|
</label> |
|
|
<p class="pl-1">or drag and drop</p> |
|
|
</div> |
|
|
<p class="text-xs text-gray-500">.sol files only</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<button type="submit" class="w-full bg-blue-600 text-white py-3 px-4 rounded-lg hover:bg-blue-700 transition-colors duration-300 flex items-center justify-center"> |
|
|
<i data-feather="upload" class="mr-2"></i> |
|
|
Analyze Contract |
|
|
</button> |
|
|
</form> |
|
|
</div> |
|
|
</div> |
|
|
</main> |
|
|
|
|
|
<script src="script.js"></script> |
|
|
<script> |
|
|
feather.replace(); |
|
|
</script> |
|
|
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script> |
|
|
</body> |
|
|
</html> |