ratio1 3.4.53__py3-none-any.whl → 3.4.55__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 CHANGED
@@ -1,4 +1,4 @@
1
- __VER__ = "3.4.53"
1
+ __VER__ = "3.4.55"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
ratio1/bc/evm.py CHANGED
@@ -945,7 +945,7 @@ class _EVMMixin:
945
945
  signed_tx = w3vars.w3.eth.account.sign_transaction(tx, self.eth_account.key)
946
946
 
947
947
  # Broadcast the signed transaction.
948
- tx_hash = w3vars.w3.eth.send_raw_transaction(signed_tx.raw_transaction)
948
+ tx_hash = w3vars.w3.eth.send_raw_transaction(self.get_raw_transaction(signed_tx))
949
949
 
950
950
  if wait_for_tx:
951
951
  # Wait for the transaction receipt with the specified timeout.
@@ -1109,7 +1109,7 @@ class _EVMMixin:
1109
1109
  signed_tx = w3vars.w3.eth.account.sign_transaction(tx, eth_account.key)
1110
1110
 
1111
1111
  # Broadcast the transaction.
1112
- tx_hash = w3vars.w3.eth.send_raw_transaction(signed_tx.raw_transaction)
1112
+ tx_hash = w3vars.w3.eth.send_raw_transaction(self.get_raw_transaction(signed_tx))
1113
1113
 
1114
1114
  if wait_for_tx:
1115
1115
  # Wait for the transaction receipt if required.
@@ -1339,18 +1339,19 @@ class _EVMMixin:
1339
1339
  details = {
1340
1340
  "network": network,
1341
1341
  "jobId": result_tuple[0],
1342
- "requestTimestamp": result_tuple[1],
1343
- "startTimestamp": result_tuple[2],
1344
- "lastNodesChangeTimestamp": result_tuple[3],
1345
- "jobType": result_tuple[4],
1346
- "pricePerEpoch": result_tuple[5],
1347
- "lastExecutionEpoch": result_tuple[6],
1348
- "numberOfNodesRequested": result_tuple[7],
1349
- "balance": result_tuple[8],
1350
- "lastAllocatedEpoch": result_tuple[9],
1351
- "activeNodes": result_tuple[10],
1352
- "escrowAddress": result_tuple[11],
1353
- "escrowOwner": result_tuple[12],
1342
+ "projectHash": "0x" + result_tuple[1].hex(),
1343
+ "requestTimestamp": result_tuple[2],
1344
+ "startTimestamp": result_tuple[3],
1345
+ "lastNodesChangeTimestamp": result_tuple[4],
1346
+ "jobType": result_tuple[5],
1347
+ "pricePerEpoch": result_tuple[6],
1348
+ "lastExecutionEpoch": result_tuple[7],
1349
+ "numberOfNodesRequested": result_tuple[8],
1350
+ "balance": result_tuple[9],
1351
+ "lastAllocatedEpoch": result_tuple[10],
1352
+ "activeNodes": result_tuple[11],
1353
+ "escrowAddress": result_tuple[12],
1354
+ "escrowOwner": result_tuple[13],
1354
1355
  }
1355
1356
  self.P(f"Job Details:\n{json.dumps(details, indent=2)}", verbosity=2)
1356
1357
 
@@ -1431,7 +1432,7 @@ class _EVMMixin:
1431
1432
  signed_tx = w3vars.w3.eth.account.sign_transaction(tx, eth_account.key)
1432
1433
 
1433
1434
  # Broadcast the transaction.
1434
- tx_hash = w3vars.w3.eth.send_raw_transaction(signed_tx.raw_transaction)
1435
+ tx_hash = w3vars.w3.eth.send_raw_transaction(self.get_raw_transaction(signed_tx))
1435
1436
 
1436
1437
  if wait_for_tx:
1437
1438
  # Wait for the transaction receipt if required.
@@ -1508,7 +1509,7 @@ class _EVMMixin:
1508
1509
  signed_tx = w3vars.w3.eth.account.sign_transaction(tx, eth_account.key)
1509
1510
 
1510
1511
  # Broadcast the transaction.
1511
- tx_hash = w3vars.w3.eth.send_raw_transaction(signed_tx.raw_transaction)
1512
+ tx_hash = w3vars.w3.eth.send_raw_transaction(self.get_raw_transaction(signed_tx))
1512
1513
 
1513
1514
  if wait_for_tx:
1514
1515
  # Wait for the transaction receipt if required.
@@ -1604,4 +1605,13 @@ class _EVMMixin:
1604
1605
  """
1605
1606
  current_network = self.current_evm_network
1606
1607
  deeploy_api_base_url = EVM_NET_DATA[current_network][EvmNetData.EE_DEEPLOY_API_URL_KEY]
1607
- return deeploy_api_base_url
1608
+ return deeploy_api_base_url
1609
+
1610
+ def get_raw_transaction(self, signed_tx):
1611
+ """
1612
+ Web3 7.x changed the name of the raw_transaction attribute from rawTransaction to raw_transaction
1613
+ """
1614
+ if hasattr(signed_tx, 'rawTransaction'):
1615
+ return signed_tx.rawTransaction
1616
+ else:
1617
+ return signed_tx.raw_transaction
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ratio1
3
- Version: 3.4.53
3
+ Version: 3.4.55
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,5 +1,5 @@
1
1
  ratio1/__init__.py,sha256=YimqgDbjLuywsf8zCWE0EaUXH4MBUrqLxt0TDV558hQ,632
2
- ratio1/_ver.py,sha256=epalyun16wNffDlGP2Ne2BpGbElRDwOkcK182S7o9QQ,331
2
+ ratio1/_ver.py,sha256=zaLXxh0k6voIEc54-N4b0za_LYv37Y_Y5Y-_D5gV6gM,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
@@ -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=SUyx1qPaUVgDiuWS1WvHWdXECHAZ5wwVSO2WpuuKgIY,51320
20
+ ratio1/bc/evm.py,sha256=bzTSskv1rORKV-00jJJSLFVMNmzC57h3LnNcQK704f4,51709
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=IMXAN9bpHePKEuTFGRRqFJXz_vBa-wi7s9gLhFEheRY,9953
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.53.dist-info/METADATA,sha256=VCplx7Q6vIktIOeWy6v8FU943996TjYu3wpRh4NNxhE,12248
107
- ratio1-3.4.53.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
108
- ratio1-3.4.53.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
109
- ratio1-3.4.53.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
110
- ratio1-3.4.53.dist-info/RECORD,,
106
+ ratio1-3.4.55.dist-info/METADATA,sha256=13EVvxi4lsA4qCUjuXv2hP1I-uFXctNCTW8jvLBYm5s,12248
107
+ ratio1-3.4.55.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
108
+ ratio1-3.4.55.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
109
+ ratio1-3.4.55.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
110
+ ratio1-3.4.55.dist-info/RECORD,,