File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -23,8 +23,14 @@ def middleware(requests_info) -> list:
23
23
24
24
if self ._w3 .rpc_batch_max_size == 0 or len (requests_info ) == 1 :
25
25
# if RPC does not support batch requests or single request in batch, make individual requests
26
+ def request_wrapper (method , params ):
27
+ response = make_batch_request .__self__ .make_request (method , params )
28
+ if "error" in response and self ._w3 .should_retry :
29
+ raise Exception (response ["error" ].get ("message" ) or "Unknown RPC Error" )
30
+ return response
31
+
26
32
return [
27
- exponential_retry (method )( make_batch_request . __self__ . make_request )(
33
+ exponential_retry (f"[batch] { method } " )( request_wrapper )(
28
34
method ,
29
35
params ,
30
36
no_retry = not self ._w3 .should_retry
Original file line number Diff line number Diff line change 1
1
from setuptools import setup , find_packages
2
2
3
- VERSION = '0.1.42 '
3
+ VERSION = '0.1.43 '
4
4
DESCRIPTION = 'IceCreamSwap Web3.py wrapper'
5
5
LONG_DESCRIPTION = 'IceCreamSwap Web3.py wrapper with automatic retries, multicall and other advanced functionality'
6
6
You can’t perform that action at this time.
0 commit comments