File size: 11,091 Bytes
82c974d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>USDT Transaction Sender</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        .gradient-bg {
            background: linear-gradient(135deg, #6b46c1 0%, #3b82f6 100%);
        }
        .transaction-card {
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
            transition: all 0.3s ease;
        }
        .transaction-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
        }
        .code-block {
            font-family: 'Courier New', monospace;
            background-color: #1e293b;
            color: #f8fafc;
            border-radius: 0.5rem;
            padding: 1rem;
            overflow-x: auto;
        }
        .highlight {
            color: #f472b6;
        }
    </style>
</head>
<body class="min-h-screen gradient-bg flex items-center justify-center p-4">
    <div class="w-full max-w-2xl">
        <div class="bg-white rounded-xl transaction-card p-8">
            <div class="flex items-center justify-center mb-6">
                <div class="bg-indigo-100 p-3 rounded-full mr-4">
                    <i class="fas fa-coins text-indigo-600 text-2xl"></i>
                </div>
                <h1 class="text-3xl font-bold text-gray-800">USDT Transaction Sender</h1>
            </div>
            
            <div class="mb-8">
                <p class="text-gray-600 mb-4">Complete the transaction details below to send USDT on the Ethereum network.</p>
                
                <div class="space-y-4">
                    <div>
                        <label class="block text-gray-700 font-medium mb-2" for="amount">Amount (ETH)</label>
                        <div class="relative">
                            <input type="number" id="amount" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" placeholder="0.1">
                            <div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
                                <span class="text-gray-500">ETH</span>
                            </div>
                        </div>
                    </div>
                    
                    <div>
                        <label class="block text-gray-700 font-medium mb-2" for="sender">Sender Address</label>
                        <input type="text" id="sender" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" placeholder="0x...">
                    </div>
                    
                    <div>
                        <label class="block text-gray-700 font-medium mb-2" for="privateKey">Private Key</label>
                        <div class="relative">
                            <input type="password" id="privateKey" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" placeholder="Enter your private key">
                            <button id="toggleKey" class="absolute inset-y-0 right-0 flex items-center pr-3 text-gray-500 hover:text-indigo-600">
                                <i class="fas fa-eye"></i>
                            </button>
                        </div>
                    </div>
                    
                    <div class="grid grid-cols-2 gap-4">
                        <div>
                            <label class="block text-gray-700 font-medium mb-2" for="gasPrice">Gas Price (Gwei)</label>
                            <input type="number" id="gasPrice" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" value="20">
                        </div>
                        <div>
                            <label class="block text-gray-700 font-medium mb-2" for="gasLimit">Gas Limit</label>
                            <input type="number" id="gasLimit" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500" value="21000">
                        </div>
                    </div>
                    
                    <div>
                        <label class="block text-gray-700 font-medium mb-2" for="chainId">Chain ID</label>
                        <select id="chainId" class="w-full px-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
                            <option value="1">Ethereum Mainnet (1)</option>
                            <option value="5">Goerli Testnet (5)</option>
                            <option value="56">Binance Smart Chain (56)</option>
                            <option value="137">Polygon Mainnet (137)</option>
                        </select>
                    </div>
                </div>
            </div>
            
            <button id="sendTransaction" class="w-full bg-indigo-600 hover:bg-indigo-700 text-white font-bold py-3 px-4 rounded-lg transition duration-200 flex items-center justify-center">
                <i class="fas fa-paper-plane mr-2"></i> Send Transaction
            </button>
            
            <div id="result" class="mt-6 hidden">
                <div class="bg-green-50 border-l-4 border-green-500 p-4 rounded">
                    <div class="flex">
                        <div class="flex-shrink-0">
                            <i class="fas fa-check-circle text-green-500"></i>
                        </div>
                        <div class="ml-3">
                            <p class="text-sm text-green-700">
                                Transaction sent successfully! Transaction hash:
                                <span id="txHash" class="font-mono text-green-900 break-all"></span>
                            </p>
                        </div>
                    </div>
                </div>
                
                <div class="mt-6">
                    <h3 class="text-lg font-medium text-gray-900 mb-2">Completed Python Code:</h3>
                    <div class="code-block">
                        <pre><code>def send_usdt_transaction(amount_eth, sender_address, private_key, gas_price_gwei, gas_limit, chain_id=1):
    # USDT contract address (mainnet)
    usdt_contract_address = "0xdAC17F958D2ee523a2206206994597C13D831ec7"
    
    # Amount to send in wei
    amount_in_wei = web3.to_wei(amount_eth, 'ether')
    
    # Get transaction nonce
    nonce = web3.eth.get_transaction_count(sender_address)
    
    # Build the transaction
    transaction = {
        'to': usdt_contract_address,
        'value': amount_in_wei,
        'gasPrice': web3.to_wei(gas_price_gwei, 'gwei'),
        'gas': gas_limit,
        'nonce': nonce,
        'chainId': chain_id
    }
    
    # Sign the transaction with EIP-155 replay protection
    signed_tx = Account.sign_transaction(transaction, private_key)
    
    # Send the raw transaction
    tx_hash = web3.eth.send_raw_transaction(signed_tx.rawTransaction)
    
    return tx_hash.hex()</code></pre>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="mt-6 text-center text-white text-sm">
            <p>This is a demo interface. Always keep your private keys secure.</p>
        </div>
    </div>

    <script>
        document.addEventListener('DOMContentLoaded', function() {
            // Toggle private key visibility
            const toggleKey = document.getElementById('toggleKey');
            const privateKey = document.getElementById('privateKey');
            
            toggleKey.addEventListener('click', function() {
                if (privateKey.type === 'password') {
                    privateKey.type = 'text';
                    toggleKey.innerHTML = '<i class="fas fa-eye-slash"></i>';
                } else {
                    privateKey.type = 'password';
                    toggleKey.innerHTML = '<i class="fas fa-eye"></i>';
                }
            });
            
            // Simulate transaction sending
            document.getElementById('sendTransaction').addEventListener('click', function() {
                const amount = document.getElementById('amount').value;
                const sender = document.getElementById('sender').value;
                const privateKeyValue = document.getElementById('privateKey').value;
                const gasPrice = document.getElementById('gasPrice').value;
                const gasLimit = document.getElementById('gasLimit').value;
                const chainId = document.getElementById('chainId').value;
                
                if (!amount || !sender || !privateKeyValue) {
                    alert('Please fill all required fields');
                    return;
                }
                
                // Show loading state
                const btn = this;
                const originalText = btn.innerHTML;
                btn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Processing...';
                btn.disabled = true;
                
                // Simulate API call delay
                setTimeout(function() {
                    // Generate random transaction hash for demo
                    const txHash = '0x' + Array.from({length: 64}, () => 
                        Math.floor(Math.random() * 16).toString(16)).join('');
                    
                    // Display result
                    document.getElementById('txHash').textContent = txHash;
                    document.getElementById('result').classList.remove('hidden');
                    
                    // Reset button
                    btn.innerHTML = originalText;
                    btn.disabled = false;
                    
                    // Scroll to result
                    document.getElementById('result').scrollIntoView({behavior: 'smooth'});
                }, 1500);
            });
        });
    </script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Kingmaxjj/eth-flasher" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html>