ratio1 3.4.73__py3-none-any.whl → 3.4.75__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.
- ratio1/_ver.py +1 -1
- ratio1/base/generic_session.py +19 -5
- ratio1/bc/evm.py +1 -3
- {ratio1-3.4.73.dist-info → ratio1-3.4.75.dist-info}/METADATA +1 -1
- {ratio1-3.4.73.dist-info → ratio1-3.4.75.dist-info}/RECORD +8 -8
- {ratio1-3.4.73.dist-info → ratio1-3.4.75.dist-info}/WHEEL +0 -0
- {ratio1-3.4.73.dist-info → ratio1-3.4.75.dist-info}/entry_points.txt +0 -0
- {ratio1-3.4.73.dist-info → ratio1-3.4.75.dist-info}/licenses/LICENSE +0 -0
ratio1/_ver.py
CHANGED
ratio1/base/generic_session.py
CHANGED
|
@@ -4701,6 +4701,7 @@ class GenericSession(BaseDecentrAIObject):
|
|
|
4701
4701
|
best_super = supervisor
|
|
4702
4702
|
best_super_alias = None
|
|
4703
4703
|
# done found best supervisor
|
|
4704
|
+
nodes_for_eth = []
|
|
4704
4705
|
for _, node_info in best_info.items():
|
|
4705
4706
|
is_online = node_info.get(PAYLOAD_DATA.NETMON_STATUS_KEY, None) == PAYLOAD_DATA.NETMON_STATUS_ONLINE
|
|
4706
4707
|
is_supervisor = node_info.get(PAYLOAD_DATA.NETMON_IS_SUPERVISOR, False)
|
|
@@ -4745,17 +4746,29 @@ class GenericSession(BaseDecentrAIObject):
|
|
|
4745
4746
|
eth_addr = val
|
|
4746
4747
|
add_balance = True
|
|
4747
4748
|
if add_balance:
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
res['
|
|
4749
|
+
nodes_for_eth.append(eth_addr)
|
|
4750
|
+
# eth_balance = self.bc_engine.web3_get_balance_eth(eth_addr)
|
|
4751
|
+
# r1_balance = self.bc_engine.web3_get_balance_r1(eth_addr)
|
|
4752
|
+
# res['ETH'].append(round(eth_balance,4))
|
|
4753
|
+
# res['$R1'].append(round(r1_balance,4))
|
|
4752
4754
|
elif key == PAYLOAD_DATA.NETMON_WHITELIST:
|
|
4753
4755
|
val = client_is_allowed
|
|
4754
4756
|
elif key in [PAYLOAD_DATA.NETMON_STATUS_KEY, PAYLOAD_DATA.NETMON_NODE_VERSION]:
|
|
4755
4757
|
val = val.split(' ')[0]
|
|
4756
4758
|
res[column].append(val)
|
|
4757
4759
|
# end for
|
|
4760
|
+
if len(nodes_for_eth) > 0:
|
|
4761
|
+
balances = self.bc_engine.web3_get_addresses_balances(nodes_for_eth)
|
|
4762
|
+
self.P("Executed web3_get_addresses_balances: {}".format(balances))
|
|
4763
|
+
for _addr in nodes_for_eth:
|
|
4764
|
+
eth_balance = balances[_addr]['ethBalance']
|
|
4765
|
+
r1_balance = balances[_addr]['r1Balance']
|
|
4766
|
+
res['ETH'].append(round(eth_balance,4))
|
|
4767
|
+
res['$R1'].append(round(r1_balance,4))
|
|
4768
|
+
# end for
|
|
4769
|
+
# end if
|
|
4758
4770
|
# end if
|
|
4771
|
+
|
|
4759
4772
|
pd.options.display.float_format = '{:.1f}'.format
|
|
4760
4773
|
df_res = pd.DataFrame(res)
|
|
4761
4774
|
if alias_filter is not None:
|
|
@@ -4931,8 +4944,9 @@ class GenericSession(BaseDecentrAIObject):
|
|
|
4931
4944
|
|
|
4932
4945
|
lst_plugin_instance_data.append({
|
|
4933
4946
|
'Node' : node,
|
|
4947
|
+
'Node Alias' : self.get_node_alias(node),
|
|
4934
4948
|
'Owner' : pipeline_owner,
|
|
4935
|
-
'Alias' : pipeline_alias,
|
|
4949
|
+
'Owner Alias' : pipeline_alias,
|
|
4936
4950
|
'App': pipeline_name,
|
|
4937
4951
|
'Plugin': instance.signature,
|
|
4938
4952
|
'Id': instance.instance_id,
|
ratio1/bc/evm.py
CHANGED
|
@@ -1400,9 +1400,7 @@ class _EVMMixin:
|
|
|
1400
1400
|
|
|
1401
1401
|
# Estimate gas fees for the token transfer.
|
|
1402
1402
|
gas_price = w3vars.w3.eth.gas_price # This fetches the current suggested gas price from the network.
|
|
1403
|
-
estimated_gas =
|
|
1404
|
-
{'from': self.eth_address}
|
|
1405
|
-
)
|
|
1403
|
+
estimated_gas = 750_000 # Have enough gas to cover all the actions if consensus is reached
|
|
1406
1404
|
gas_cost = estimated_gas * gas_price
|
|
1407
1405
|
|
|
1408
1406
|
# Check that the sender's ETH balance can cover gas costs plus an extra buffer.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ratio1
|
|
3
|
-
Version: 3.4.
|
|
3
|
+
Version: 3.4.75
|
|
4
4
|
Summary: `ratio1` or Ration1 SDK is the Python SDK required for client app development for the Ratio1 ecosystem
|
|
5
5
|
Project-URL: Homepage, https://github.com/Ratio1/ratio1_sdk
|
|
6
6
|
Project-URL: Bug Tracker, https://github.com/Ratio1/ratio1_sdk/issues
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
ratio1/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
|
|
2
|
-
ratio1/_ver.py,sha256=
|
|
2
|
+
ratio1/_ver.py,sha256=8h5wspMl-T_eYFIH_KQ5wUPikkG8SiVYj9v2YVwA_AQ,331
|
|
3
3
|
ratio1/base_decentra_object.py,sha256=iXvAAf6wPnGWzeeiRfwLojVoan-m1e_VsyPzjUQuENo,4492
|
|
4
4
|
ratio1/plugins_manager_mixin.py,sha256=X1JdGLDz0gN1rPnTN_5mJXR8JmqoBFQISJXmPR9yvCo,11106
|
|
5
5
|
ratio1/base/__init__.py,sha256=hACh83_cIv7-PwYMM3bQm2IBmNqiHw-3PAfDfAEKz9A,259
|
|
6
6
|
ratio1/base/distributed_custom_code_presets.py,sha256=cvz5R88P6Z5V61Ce1vHVVh8bOkgXd6gve_vdESDNAsg,2544
|
|
7
|
-
ratio1/base/generic_session.py,sha256=
|
|
7
|
+
ratio1/base/generic_session.py,sha256=T_ZY8ifZkrEwYGPFytfAfB_1YfScT7xiqJhomNBJDP8,187405
|
|
8
8
|
ratio1/base/instance.py,sha256=oQvwzzRvir7851wyhDx_BwN6y_VgsNWwYo53vN33QI4,21914
|
|
9
9
|
ratio1/base/pipeline.py,sha256=szoHrk1qBdY6NKPUk3tUTsJx3XzYp5C2GTOlzRiQi48,62489
|
|
10
10
|
ratio1/base/plugin_template.py,sha256=Gs438cSkhvxPujE4CRH_32pcuZaVwI9kia8E4VDRpSU,138794
|
|
@@ -17,7 +17,7 @@ ratio1/bc/__init__.py,sha256=BI5pcqHdhwnMdbWTYDLW1cVP_844VtLra-lz7xprgsk,171
|
|
|
17
17
|
ratio1/bc/base.py,sha256=g7tARNgi_0N1p9HpvqRDWDVYxuqU7W6S0q3ARC6oxKk,45870
|
|
18
18
|
ratio1/bc/chain.py,sha256=HCTQGnmuKqTvUo95OKdg8rL2jhKfSMwrich2e_7Nyms,2336
|
|
19
19
|
ratio1/bc/ec.py,sha256=FwlkWmJvQ9aHuf_BZX1CWSUAxw6OZ9jBparLIWcs_e4,18933
|
|
20
|
-
ratio1/bc/evm.py,sha256=
|
|
20
|
+
ratio1/bc/evm.py,sha256=F-tBJlM_o_-fFipUjEfPWk4AKkyNSta4wcxCpECPWSk,51497
|
|
21
21
|
ratio1/certs/51.15.142.167.crt,sha256=rLxkwDIQm-u6Kw570NmdSFgjSChcdSJvXPxr4Mj-EU8,1167
|
|
22
22
|
ratio1/certs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
23
23
|
ratio1/certs/a0d9818f.ala.eu-central-1.emqxsl.com.crt,sha256=y-6io0tseyx9-a4Pmde1z1gPULtJNSYUpG_YFkYaMKU,1337
|
|
@@ -103,8 +103,8 @@ ratio1/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,10
|
|
|
103
103
|
ratio1/utils/config.py,sha256=Elfkl7W4aDMvB5WZLiYlPXrecBncgTxb4hcKhQedMzI,10111
|
|
104
104
|
ratio1/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
|
|
105
105
|
ratio1/utils/oracle_sync/oracle_tester.py,sha256=aJOPcZhtbw1XPqsFG4qYpfv2Taj5-qRXbwJzrPyeXDE,27465
|
|
106
|
-
ratio1-3.4.
|
|
107
|
-
ratio1-3.4.
|
|
108
|
-
ratio1-3.4.
|
|
109
|
-
ratio1-3.4.
|
|
110
|
-
ratio1-3.4.
|
|
106
|
+
ratio1-3.4.75.dist-info/METADATA,sha256=RsayptZ8gb0dehe2eZsQlj4wxzRt5bdQAxf7YhFs-X4,12255
|
|
107
|
+
ratio1-3.4.75.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
108
|
+
ratio1-3.4.75.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
|
|
109
|
+
ratio1-3.4.75.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
|
|
110
|
+
ratio1-3.4.75.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|