Kingmaxjj commited on
Commit
82c974d
·
verified ·
1 Parent(s): 62e6bf4

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +212 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Eth Flasher
3
- emoji: 🔥
4
- colorFrom: pink
5
- colorTo: gray
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: eth-flasher
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,212 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>USDT Transaction Sender</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ .gradient-bg {
11
+ background: linear-gradient(135deg, #6b46c1 0%, #3b82f6 100%);
12
+ }
13
+ .transaction-card {
14
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
15
+ transition: all 0.3s ease;
16
+ }
17
+ .transaction-card:hover {
18
+ transform: translateY(-5px);
19
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
20
+ }
21
+ .code-block {
22
+ font-family: 'Courier New', monospace;
23
+ background-color: #1e293b;
24
+ color: #f8fafc;
25
+ border-radius: 0.5rem;
26
+ padding: 1rem;
27
+ overflow-x: auto;
28
+ }
29
+ .highlight {
30
+ color: #f472b6;
31
+ }
32
+ </style>
33
+ </head>
34
+ <body class="min-h-screen gradient-bg flex items-center justify-center p-4">
35
+ <div class="w-full max-w-2xl">
36
+ <div class="bg-white rounded-xl transaction-card p-8">
37
+ <div class="flex items-center justify-center mb-6">
38
+ <div class="bg-indigo-100 p-3 rounded-full mr-4">
39
+ <i class="fas fa-coins text-indigo-600 text-2xl"></i>
40
+ </div>
41
+ <h1 class="text-3xl font-bold text-gray-800">USDT Transaction Sender</h1>
42
+ </div>
43
+
44
+ <div class="mb-8">
45
+ <p class="text-gray-600 mb-4">Complete the transaction details below to send USDT on the Ethereum network.</p>
46
+
47
+ <div class="space-y-4">
48
+ <div>
49
+ <label class="block text-gray-700 font-medium mb-2" for="amount">Amount (ETH)</label>
50
+ <div class="relative">
51
+ <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">
52
+ <div class="absolute inset-y-0 right-0 flex items-center pr-3 pointer-events-none">
53
+ <span class="text-gray-500">ETH</span>
54
+ </div>
55
+ </div>
56
+ </div>
57
+
58
+ <div>
59
+ <label class="block text-gray-700 font-medium mb-2" for="sender">Sender Address</label>
60
+ <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...">
61
+ </div>
62
+
63
+ <div>
64
+ <label class="block text-gray-700 font-medium mb-2" for="privateKey">Private Key</label>
65
+ <div class="relative">
66
+ <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">
67
+ <button id="toggleKey" class="absolute inset-y-0 right-0 flex items-center pr-3 text-gray-500 hover:text-indigo-600">
68
+ <i class="fas fa-eye"></i>
69
+ </button>
70
+ </div>
71
+ </div>
72
+
73
+ <div class="grid grid-cols-2 gap-4">
74
+ <div>
75
+ <label class="block text-gray-700 font-medium mb-2" for="gasPrice">Gas Price (Gwei)</label>
76
+ <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">
77
+ </div>
78
+ <div>
79
+ <label class="block text-gray-700 font-medium mb-2" for="gasLimit">Gas Limit</label>
80
+ <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">
81
+ </div>
82
+ </div>
83
+
84
+ <div>
85
+ <label class="block text-gray-700 font-medium mb-2" for="chainId">Chain ID</label>
86
+ <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">
87
+ <option value="1">Ethereum Mainnet (1)</option>
88
+ <option value="5">Goerli Testnet (5)</option>
89
+ <option value="56">Binance Smart Chain (56)</option>
90
+ <option value="137">Polygon Mainnet (137)</option>
91
+ </select>
92
+ </div>
93
+ </div>
94
+ </div>
95
+
96
+ <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">
97
+ <i class="fas fa-paper-plane mr-2"></i> Send Transaction
98
+ </button>
99
+
100
+ <div id="result" class="mt-6 hidden">
101
+ <div class="bg-green-50 border-l-4 border-green-500 p-4 rounded">
102
+ <div class="flex">
103
+ <div class="flex-shrink-0">
104
+ <i class="fas fa-check-circle text-green-500"></i>
105
+ </div>
106
+ <div class="ml-3">
107
+ <p class="text-sm text-green-700">
108
+ Transaction sent successfully! Transaction hash:
109
+ <span id="txHash" class="font-mono text-green-900 break-all"></span>
110
+ </p>
111
+ </div>
112
+ </div>
113
+ </div>
114
+
115
+ <div class="mt-6">
116
+ <h3 class="text-lg font-medium text-gray-900 mb-2">Completed Python Code:</h3>
117
+ <div class="code-block">
118
+ <pre><code>def send_usdt_transaction(amount_eth, sender_address, private_key, gas_price_gwei, gas_limit, chain_id=1):
119
+ # USDT contract address (mainnet)
120
+ usdt_contract_address = "0xdAC17F958D2ee523a2206206994597C13D831ec7"
121
+
122
+ # Amount to send in wei
123
+ amount_in_wei = web3.to_wei(amount_eth, 'ether')
124
+
125
+ # Get transaction nonce
126
+ nonce = web3.eth.get_transaction_count(sender_address)
127
+
128
+ # Build the transaction
129
+ transaction = {
130
+ 'to': usdt_contract_address,
131
+ 'value': amount_in_wei,
132
+ 'gasPrice': web3.to_wei(gas_price_gwei, 'gwei'),
133
+ 'gas': gas_limit,
134
+ 'nonce': nonce,
135
+ 'chainId': chain_id
136
+ }
137
+
138
+ # Sign the transaction with EIP-155 replay protection
139
+ signed_tx = Account.sign_transaction(transaction, private_key)
140
+
141
+ # Send the raw transaction
142
+ tx_hash = web3.eth.send_raw_transaction(signed_tx.rawTransaction)
143
+
144
+ return tx_hash.hex()</code></pre>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <div class="mt-6 text-center text-white text-sm">
151
+ <p>This is a demo interface. Always keep your private keys secure.</p>
152
+ </div>
153
+ </div>
154
+
155
+ <script>
156
+ document.addEventListener('DOMContentLoaded', function() {
157
+ // Toggle private key visibility
158
+ const toggleKey = document.getElementById('toggleKey');
159
+ const privateKey = document.getElementById('privateKey');
160
+
161
+ toggleKey.addEventListener('click', function() {
162
+ if (privateKey.type === 'password') {
163
+ privateKey.type = 'text';
164
+ toggleKey.innerHTML = '<i class="fas fa-eye-slash"></i>';
165
+ } else {
166
+ privateKey.type = 'password';
167
+ toggleKey.innerHTML = '<i class="fas fa-eye"></i>';
168
+ }
169
+ });
170
+
171
+ // Simulate transaction sending
172
+ document.getElementById('sendTransaction').addEventListener('click', function() {
173
+ const amount = document.getElementById('amount').value;
174
+ const sender = document.getElementById('sender').value;
175
+ const privateKeyValue = document.getElementById('privateKey').value;
176
+ const gasPrice = document.getElementById('gasPrice').value;
177
+ const gasLimit = document.getElementById('gasLimit').value;
178
+ const chainId = document.getElementById('chainId').value;
179
+
180
+ if (!amount || !sender || !privateKeyValue) {
181
+ alert('Please fill all required fields');
182
+ return;
183
+ }
184
+
185
+ // Show loading state
186
+ const btn = this;
187
+ const originalText = btn.innerHTML;
188
+ btn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Processing...';
189
+ btn.disabled = true;
190
+
191
+ // Simulate API call delay
192
+ setTimeout(function() {
193
+ // Generate random transaction hash for demo
194
+ const txHash = '0x' + Array.from({length: 64}, () =>
195
+ Math.floor(Math.random() * 16).toString(16)).join('');
196
+
197
+ // Display result
198
+ document.getElementById('txHash').textContent = txHash;
199
+ document.getElementById('result').classList.remove('hidden');
200
+
201
+ // Reset button
202
+ btn.innerHTML = originalText;
203
+ btn.disabled = false;
204
+
205
+ // Scroll to result
206
+ document.getElementById('result').scrollIntoView({behavior: 'smooth'});
207
+ }, 1500);
208
+ });
209
+ });
210
+ </script>
211
+ <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>
212
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Complete the following python code. # 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' : 1 # assuming mainnet change to the appropriate chain ID if necessary } # sign the transaction with EIP - 155 replay protection signed _ tx = Account.sign_transaction (transaction, private _ key) tx _ hash = web3.eth.send _ raw _ transaction (signed _ txn.raw _ transaction) return tx _ hash.hex ()