serinko 4 лет назад
Родитель
Сommit
091f7f9ea4
3 измененных файлов с 58 добавлено и 91 удалено
  1. 0 57
      wallets.py
  2. 22 33
      wallets_dict.json
  3. 36 1
      whallets-cli.py

+ 0 - 57
wallets.py

@@ -1,57 +0,0 @@
-"""Functions automatizing the monitoring of whale wallets"""
-
-#TODO:
-# 1) A program automatizing the dictionary compiling with a given wallet or ens
-# Using blockscan etc
-# 2) A program scanning through the given block explorers and scraping useful
-# data about the wallet actions based on the given parameters of time, amount etc
-# 3) A program exporting the data from #2 into a spread sheet and plotting graph
-
-import json
-
-
-
-def display_wallets(chain):
-    """Displays the wallets according the given chain"""
-    # Chains available 'evm','spl'
-    # evm shows all the forks
-    i = _chain_index(chain)
-    dict = _get_wallets()[i]
-    print(f"\n\n{chain.upper()} WALLETS:")
-
-    for key, value in dict.items():
-        user = key
-        wallets = value['wallets']
-        info = value['info']
-        twitter = value['twitter']
-        chains = []
-        for key, value in wallets.items():
-            chains.append(key)
-        print(f"\nUser: {user}")
-        print(f"Info: {info}")
-        print(f"Twitter: {twitter}")
-        print(f"Wallet address: {value}")
-        print(f"Active networks: {chains}")
-
-def _get_wallets():
-    ''' Gets the info from the dictionary '''
-    filename = 'wallets_dict.json'
-    with open(filename) as f:
-        all_wallets = json.load(f)
-    evm_wallets = all_wallets['evm_wallets']
-    spl_wallets = all_wallets['spl_wallets']
-    return evm_wallets, spl_wallets
-
-def _chain_index(chain):
-    '''Asigns an index based on given parameter of the chain'''
-    if chain.lower() == 'evm':
-        i = 0
-    elif chain.lower() == 'spl':
-        i = 1
-    return i
-
-def display_all_wallets():
-    display_wallets('evm')
-    display_wallets('spl')
-
-display_all_wallets()

+ 22 - 33
wallets_dict.json

@@ -32,25 +32,16 @@
             "info": "3AC founder, enterpreteur, Deribit, uncommon core",
             "wallets": {
                 "erc": "0x4093fbe60ab50ab79a5bd32fa2adec255372f80e"
-                
-        },
-        "alameda": {
-            "twitter": "https://twitter.com/SBF_Alameda",
-            "info": "ftx foundation",
-            "wallets": {
-                "erc": "0xfa34bf9307f2f68a70b4369bb2f522b2b2bb222b",
-                "bsc": "0xfa34bf9307f2f68a70b4369bb2f522b2b2bb222b",
-                "poly": "0xfa34bf9307f2f68a70b4369bb2f522b2b2bb222b",
-                "avax": "0xfa34bf9307f2f68a70b4369bb2f522b2b2bb222b"
-            }
-        },
+                }
+            },
+
         "@zhusu_3ac_3": {
             "twitter": "https://twitter.com/zhusu",
             "info": "3AC founder, enterpreteur, Deribit, uncommon core",
             "wallets": {
-                "erc": "0x3ba21b6477f48273f41d241aa3722ffb9e07e247",
-                
-        },
+                "erc": "0x3ba21b6477f48273f41d241aa3722ffb9e07e247"
+                }
+            },
         "alameda": {
             "twitter": "https://twitter.com/SBF_Alameda",
             "info": "ftx foundation",
@@ -192,7 +183,6 @@
             "wallets": {
                 "erc": "0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3",
                 "ftm": "0xebf4fbb9c81b84dd5cf89bc75588e5d0018501b3"
-               
             }
         },
         "parafi": {
@@ -205,24 +195,23 @@
                 "avax": "0x4655b7ad0b5f5bacb9cf960bbffceb3f0e51f363"
             }
         },
-
-            "gmx_degen": {
-                "twitter": " ",
-                "info": "degen who was early in gmx, active small cap investor",
-                "ens": "",
-                "wallets": {
-                    "erc": "0x1e7127c81c8a58661a0811f026b6be66533934be"
-                }
+        "gmx_degen": {
+            "twitter": " ",
+            "info": "degen who was early in gmx, active small cap investor",
+            "ens": "",
+            "wallets": {
+                "erc": "0x1e7127c81c8a58661a0811f026b6be66533934be"
             }
+        }
         },
-
-                "spl_wallets": {
-                    "@Cyrii": {
-                        "twitter": "https://twitter.com/cyrii_MM",
-                        "info": "$COPE - main dev/founder, main holder, cult",
-                        "wallets": {
-                            "spl": "13pHDZsFyuTJ9uMA8SbY8vjBs5TmZ3jJeiCwvEyax4tu"
-                        }
-                    }
+        "spl_wallets": {
+            "@Cyrii": {
+                "twitter": "https://twitter.com/cyrii_MM",
+                "info": "$COPE - main dev/founder, main holder, cult",
+                "wallets": {
+                    "spl": "13pHDZsFyuTJ9uMA8SbY8vjBs5TmZ3jJeiCwvEyax4tu"
                 }
             }
+        }
+    }
+

+ 36 - 1
whallets-cli.py

@@ -6,6 +6,20 @@
 # 4) Prints options for the user (-h)
 
 import json
+import texts_cli as tc
+
+def cli():
+    """Main program for the cli"""
+    print(tc.welcome_message())
+
+def main_menu():
+    """main cli options"""
+
+def add_wallet():
+    """A function to add wallet to the wallets_dict.json"""
+
+
+
 
 def get_wallets():
     ''' Gets the info from the dictionary '''
@@ -14,4 +28,25 @@ def get_wallets():
         all_wallets = json.load(f)
     evm_wallets = all_wallets['evm_wallets']
     spl_wallets = all_wallets['spl_wallets']
-    return evm_wallets, spl_wallets
+    return evm_wallets, spl_wallets
+
+
+def display_wallets(chain):
+    """Displays the wallets according the given chain"""
+    # Chains available 'evm','spl'
+    # evm shows all the forks
+    i = _chain_index(chain)
+    dict = get_wallets()[i]
+    print(f"\n\n{chain.upper()} WALLETS:")
+
+def _chain_index(chain):
+    '''Asigns an index based on given parameter of the chain'''
+    if chain.lower() == 'evm':
+        i = 0
+    elif chain.lower() == 'spl':
+        i = 1
+    return i
+
+def display_all_wallets():
+    display_wallets('evm')
+    display_wallets('spl')