abstract-solana 0.0.2.73__py3-none-any.whl → 0.0.2.76__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of abstract-solana might be problematic. Click here for more details.
- abstract_solana/abstract_rpcs/rate_limiter.py +7 -6
- {abstract_solana-0.0.2.73.dist-info → abstract_solana-0.0.2.76.dist-info}/METADATA +1 -1
- {abstract_solana-0.0.2.73.dist-info → abstract_solana-0.0.2.76.dist-info}/RECORD +5 -5
- {abstract_solana-0.0.2.73.dist-info → abstract_solana-0.0.2.76.dist-info}/WHEEL +1 -1
- {abstract_solana-0.0.2.73.dist-info → abstract_solana-0.0.2.76.dist-info}/top_level.txt +0 -0
|
@@ -13,10 +13,9 @@ def readSaveState():
|
|
|
13
13
|
path= getSaveStatePath()
|
|
14
14
|
if not os.path.isfile(path):
|
|
15
15
|
state = {'last_method':None,'rate_limit': [],'last_mb': {},'cooldown_time': False,'last_url':None}
|
|
16
|
-
safe_dump_to_file(file_path=path
|
|
16
|
+
safe_dump_to_file(data=state,file_path=path)
|
|
17
17
|
return safe_read_from_json(getSaveStatePath())
|
|
18
18
|
def is_time_interval(time_obj, interval):
|
|
19
|
-
print([time.time() - time_obj,interval-1])
|
|
20
19
|
return (time.time() - time_obj) < interval-1
|
|
21
20
|
|
|
22
21
|
def get_mb(sum_list, limit, last_mb):
|
|
@@ -59,7 +58,7 @@ class RateLimiter(metaclass=SingletonMeta):
|
|
|
59
58
|
'cooldown_time': self.cooldown_time,
|
|
60
59
|
'last_url': self.last_url
|
|
61
60
|
}
|
|
62
|
-
safe_dump_to_file(self.state_file
|
|
61
|
+
safe_dump_to_file(data=state,file_path=self.state_file)
|
|
63
62
|
|
|
64
63
|
def load_state(self):
|
|
65
64
|
state = readSaveState()
|
|
@@ -111,10 +110,10 @@ class RateLimiter(metaclass=SingletonMeta):
|
|
|
111
110
|
|
|
112
111
|
return False
|
|
113
112
|
|
|
114
|
-
def log_response(self, method=None,
|
|
113
|
+
def log_response(self, method=None, response=None):
|
|
115
114
|
method = method or 'default_method'
|
|
116
|
-
|
|
117
|
-
data_size = datasize(
|
|
115
|
+
response = response or {}
|
|
116
|
+
data_size = datasize(response)
|
|
118
117
|
self.last_mb[method] = data_size
|
|
119
118
|
|
|
120
119
|
if self.last_url == self.url1:
|
|
@@ -139,3 +138,5 @@ class RateLimiter(metaclass=SingletonMeta):
|
|
|
139
138
|
return {"rate_limited":"limit has been reached"}
|
|
140
139
|
return self.last_url
|
|
141
140
|
|
|
141
|
+
|
|
142
|
+
|
|
@@ -3,7 +3,7 @@ abstract_solana/abstract_rpcs/__init__.py,sha256=DP-TZ8GGPUu4ETVDuFFLFxkJH2_QY-j
|
|
|
3
3
|
abstract_solana/abstract_rpcs/db_templates.py,sha256=sjdHfHIq9bO6VuDm3hwzn46NUrXXrGnB0knYNeVU7k8,29839
|
|
4
4
|
abstract_solana/abstract_rpcs/get_api_gui.py,sha256=OZ61HHb0gwdYjirwFFmnwk8z9x5np3cecCj9MdmuF8U,12372
|
|
5
5
|
abstract_solana/abstract_rpcs/get_body.py,sha256=UV85217q7mIpYOhVZdnzfmgZxD3QM0w0J0oevXyYtdE,51272
|
|
6
|
-
abstract_solana/abstract_rpcs/rate_limiter.py,sha256=
|
|
6
|
+
abstract_solana/abstract_rpcs/rate_limiter.py,sha256=AuHtjpCfTw5os-v5kW0bt1wWOvaRvZIkoWjlexlego8,5216
|
|
7
7
|
abstract_solana/abstract_rpcs/solana_rpc_client.py,sha256=Dg2tUgMxIdmyFzfXyZxgCF-e5Snp2uC8s2GE_Q1Y9Ec,3822
|
|
8
8
|
abstract_solana/abstract_utils/__init__.py,sha256=HCbBVQ5BIFCVkFqqTMHp1Y__YQAO4HTq_KHVdMCe89U,296
|
|
9
9
|
abstract_solana/abstract_utils/account_key_utils.py,sha256=VMJd4GOTK1vn8UZsfXDnjxDOGoQWGY6fvflJqPZ7Xvs,877
|
|
@@ -20,7 +20,7 @@ abstract_solana/pump_functions/__init__.py,sha256=BiRxwJd1JWwEft63zqYwZ_Xs6UDp4h
|
|
|
20
20
|
abstract_solana/pump_functions/buy_sell_pump.py,sha256=gjv_1et20s1Li0ygcURofO29VPkO1v-a5G5Bo_sZs_c,7860
|
|
21
21
|
abstract_solana/pump_functions/pump_fun_keys.py,sha256=BeWbV9_wd-c6ydF33drW-gZBDPWolbsMZL4cNhP3eOU,8537
|
|
22
22
|
abstract_solana/pump_functions/token_utils.py,sha256=O-Fgj3L1NhND-k4INa3WvLAEXg2N9u1fVqyLFzn1PwM,2714
|
|
23
|
-
abstract_solana-0.0.2.
|
|
24
|
-
abstract_solana-0.0.2.
|
|
25
|
-
abstract_solana-0.0.2.
|
|
26
|
-
abstract_solana-0.0.2.
|
|
23
|
+
abstract_solana-0.0.2.76.dist-info/METADATA,sha256=4jAIOV8sVHP6QX5B7y7VvK-atymOwHrzofzfqTrFw5s,981
|
|
24
|
+
abstract_solana-0.0.2.76.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
|
|
25
|
+
abstract_solana-0.0.2.76.dist-info/top_level.txt,sha256=SsJYent8eZQ0FU2jmP8wTj7aFZFhNwxxP-5cCTQ2B-o,16
|
|
26
|
+
abstract_solana-0.0.2.76.dist-info/RECORD,,
|
|
File without changes
|