py-near 1.1.45__tar.gz → 1.1.46__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.
- {py_near-1.1.45 → py_near-1.1.46}/PKG-INFO +1 -1
- {py_near-1.1.45 → py_near-1.1.46}/pyproject.toml +2 -2
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/providers.py +7 -1
- {py_near-1.1.45 → py_near-1.1.46}/LICENSE +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/README.md +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/__init__.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/account.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/constants.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/__init__.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/__pycache__/__init__.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/__pycache__/core.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/__pycache__/fts.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/core.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/__init__.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/__pycache__/__init__.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/__pycache__/async_client.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/__pycache__/exceptions.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/__pycache__/models.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/async_client.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/exceptions.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/models.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/fts.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/keypom/__init__.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/keypom/async_client.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/keypom/exceptions.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/keypom/models.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/__init__.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/__pycache__/__init__.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/__pycache__/async_client.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/__pycache__/exceptions.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/__pycache__/models.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/async_client.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/exceptions.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/models.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/exceptions/__init__.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/exceptions/__pycache__/__init__.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/exceptions/__pycache__/exceptions.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/exceptions/__pycache__/provider.cpython-311.pyc +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/exceptions/exceptions.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/exceptions/provider.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/models.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/transactions.py +0 -0
- {py_near-1.1.45 → py_near-1.1.46}/src/py_near/utils.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "py-near"
|
3
|
-
version = "1.1.
|
3
|
+
version = "1.1.46"
|
4
4
|
description="Pretty simple and fully asynchronous framework for working with NEAR blockchain"
|
5
5
|
authors = ["pvolnov <petr@herewallet.app>"]
|
6
6
|
readme = "README.md"
|
@@ -22,7 +22,7 @@ base58 = "^2.1.1"
|
|
22
22
|
|
23
23
|
[project]
|
24
24
|
name = "py-near"
|
25
|
-
version = "1.1.
|
25
|
+
version = "1.1.46"
|
26
26
|
description = "Pretty simple and fully asynchronous framework for working with NEAR blockchaink"
|
27
27
|
authors = [ {name = "pvolnov", email = "petr@herewallet.app"} ]
|
28
28
|
requires-python = ">=3.7"
|
@@ -172,6 +172,8 @@ class JsonProvider(object):
|
|
172
172
|
|
173
173
|
responses = []
|
174
174
|
correct_responses = []
|
175
|
+
result = None
|
176
|
+
|
175
177
|
while pending and len(pending):
|
176
178
|
done, pending = await asyncio.wait(
|
177
179
|
pending, return_when=asyncio.FIRST_COMPLETED
|
@@ -194,8 +196,11 @@ class JsonProvider(object):
|
|
194
196
|
for task in pending:
|
195
197
|
task.cancel()
|
196
198
|
return most_frequent_element
|
197
|
-
|
199
|
+
if threshold and threshold > 0:
|
200
|
+
raise RpcEmptyResponse(f"Threshold not reached: {len(correct_responses)}/{threshold}")
|
201
|
+
return result
|
198
202
|
else:
|
203
|
+
res = None
|
199
204
|
for rpc_addr in self._available_rpcs:
|
200
205
|
try:
|
201
206
|
res = await f(rpc_addr)
|
@@ -204,6 +209,7 @@ class JsonProvider(object):
|
|
204
209
|
except Exception as e:
|
205
210
|
logger.error(f"Rpc error: {e}")
|
206
211
|
continue
|
212
|
+
return res
|
207
213
|
raise RpcEmptyResponse("RPC returned empty response")
|
208
214
|
|
209
215
|
@staticmethod
|
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
|
File without changes
|
File without changes
|
File without changes
|
{py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/__pycache__/async_client.cpython-311.pyc
RENAMED
File without changes
|
{py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/ft/__pycache__/exceptions.cpython-311.pyc
RENAMED
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
|
File without changes
|
File without changes
|
{py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/__pycache__/__init__.cpython-311.pyc
RENAMED
File without changes
|
{py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/__pycache__/async_client.cpython-311.pyc
RENAMED
File without changes
|
{py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/__pycache__/exceptions.cpython-311.pyc
RENAMED
File without changes
|
{py_near-1.1.45 → py_near-1.1.46}/src/py_near/dapps/staking/__pycache__/models.cpython-311.pyc
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{py_near-1.1.45 → py_near-1.1.46}/src/py_near/exceptions/__pycache__/__init__.cpython-311.pyc
RENAMED
File without changes
|
{py_near-1.1.45 → py_near-1.1.46}/src/py_near/exceptions/__pycache__/exceptions.cpython-311.pyc
RENAMED
File without changes
|
{py_near-1.1.45 → py_near-1.1.46}/src/py_near/exceptions/__pycache__/provider.cpython-311.pyc
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|