solver-multirpc 3.1.12__tar.gz → 3.1.13__tar.gz
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.
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/PKG-INFO +1 -1
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/multirpc/tx_trace.py +12 -5
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/pyproject.toml +1 -1
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/README.md +0 -0
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/multirpc/__init__.py +0 -0
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/multirpc/async_multi_rpc_interface.py +0 -0
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/multirpc/base_multi_rpc_interface.py +0 -0
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/multirpc/constants.py +0 -0
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/multirpc/exceptions.py +0 -0
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/multirpc/gas_estimation.py +0 -0
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/multirpc/sync_multi_rpc_interface.py +0 -0
- {solver_multirpc-3.1.12 → solver_multirpc-3.1.13}/multirpc/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: solver-multirpc
|
|
3
|
-
Version: 3.1.
|
|
3
|
+
Version: 3.1.13
|
|
4
4
|
Summary: A robust Python library for interacting with Ethereum smart contracts via multiple RPC endpoints, ensuring reliability, availability, and load distribution with automatic retries on failure.
|
|
5
5
|
License: MIT
|
|
6
6
|
Author: rorschach
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import json
|
|
2
|
+
|
|
1
3
|
import requests
|
|
2
4
|
|
|
3
5
|
from multirpc.constants import MultiRPCLogger
|
|
@@ -64,12 +66,17 @@ class TxTrace:
|
|
|
64
66
|
}
|
|
65
67
|
|
|
66
68
|
response = requests.post(self.rpc, json=data)
|
|
69
|
+
try:
|
|
70
|
+
json_response = response.json()
|
|
71
|
+
except json.decoder.JSONDecodeError:
|
|
72
|
+
MultiRPCLogger.error(f'tx_trace({self.tx_hash}) invalid JSON response: {response.text[:200]}')
|
|
73
|
+
return None
|
|
67
74
|
if response.status_code == 200:
|
|
68
|
-
if error :=
|
|
75
|
+
if error := json_response.get('error'):
|
|
69
76
|
MultiRPCLogger.error(f'failed to get tx({self.tx_hash}) trace with error: {error}')
|
|
70
77
|
return None
|
|
71
78
|
return response
|
|
72
|
-
MultiRPCLogger.error(f'tx_trace({self.tx_hash}) status = {response.status_code}, \n {
|
|
79
|
+
MultiRPCLogger.error(f'tx_trace({self.tx_hash}) status = {response.status_code}, \n {json_response}')
|
|
73
80
|
|
|
74
81
|
except requests.HTTPError:
|
|
75
82
|
MultiRPCLogger.exception('Exception in debug_traceTransaction')
|
|
@@ -146,8 +153,8 @@ class TxTraceResult:
|
|
|
146
153
|
def first_usable_error(self):
|
|
147
154
|
for error in [self.error()] + self.all_revert_reasons():
|
|
148
155
|
if error and \
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
156
|
+
'execution reverted' not in error and \
|
|
157
|
+
'MultiAccount: Error occurred' not in error and \
|
|
158
|
+
'Execution reverted' not in error:
|
|
152
159
|
return error
|
|
153
160
|
return ''
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "solver-multirpc"
|
|
3
|
-
version = "3.1.
|
|
3
|
+
version = "3.1.13"
|
|
4
4
|
description = "A robust Python library for interacting with Ethereum smart contracts via multiple RPC endpoints, ensuring reliability, availability, and load distribution with automatic retries on failure."
|
|
5
5
|
authors = ["rorschach <rorschach45001@gmail.com>"]
|
|
6
6
|
license = "MIT"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|