serinko 4 лет назад
Родитель
Сommit
1470efdc3c
2 измененных файлов с 13 добавлено и 2 удалено
  1. 1 1
      wallets_dict.json
  2. 12 1
      whallets-cli.py

+ 1 - 1
wallets_dict.json

@@ -31,7 +31,7 @@
             "twitter": "https://twitter.com/zhusu",
             "info": "3AC founder, enterpreteur, Deribit, uncommon core",
             "wallets": {
-                "erc": "0x4093fbe60ab50ab79a5bd32fa2adec255372f80e",
+                "erc": "0x4093fbe60ab50ab79a5bd32fa2adec255372f80e"
                 
         },
         "alameda": {

+ 12 - 1
whallets-cli.py

@@ -1,6 +1,17 @@
 """CLI for users to manage the wallet database and run research functions"""
-# TODO:
+#TODO:
 # 1) Interacting with APIs
 # 2) easy adding data to the wallets_dict.json
 # 3) Scanning through APIs based on given parameters
 # 4) Prints options for the user (-h)
+
+import json
+
+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