ratio1 3.4.91__py3-none-any.whl → 3.4.92__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.91"
1
+ __VER__ = "3.4.92"
2
2
 
3
3
  if __name__ == "__main__":
4
4
  with open("pyproject.toml", "rt") as fd:
ratio1/bc/evm.py CHANGED
@@ -1561,6 +1561,41 @@ class _EVMMixin:
1561
1561
 
1562
1562
  return result
1563
1563
 
1564
+ def web3_get_first_closable_job_id(
1565
+ self,
1566
+ network: str = None
1567
+ ):
1568
+ """
1569
+ Retrieve the ID of the first job that can be closed using getFirstClosableJobId().
1570
+
1571
+ Parameters
1572
+ ----------
1573
+ network : str, optional
1574
+ The network to use. If None, defaults to self.evm_network.
1575
+
1576
+ Returns
1577
+ -------
1578
+ int or None
1579
+ The ID of the first closable job, or None if no such job exists.
1580
+ """
1581
+ w3vars = self._get_web3_vars(network)
1582
+ network = w3vars.network
1583
+
1584
+ contract = w3vars.w3.eth.contract(
1585
+ address=w3vars.poai_manager_address,
1586
+ abi=EVM_ABI_DATA.POAI_MANAGER_ABI
1587
+ )
1588
+
1589
+ self.P(f"`getFirstClosableJobId` on {network} via {w3vars.rpc_url}", verbosity=2)
1590
+
1591
+ # Call the contract function to get the first closable job ID.
1592
+ result = contract.functions.getFirstClosableJobId().call()
1593
+ if result == 0:
1594
+ result = None
1595
+ self.P(f"First closable job ID: {result}", verbosity=2)
1596
+
1597
+ return result
1598
+
1564
1599
  def web3_get_is_last_epoch_allocated(
1565
1600
  self,
1566
1601
  network: str = None
ratio1/const/evm_net.py CHANGED
@@ -417,6 +417,19 @@ _POAI_MANAGER_ABI = [
417
417
  ],
418
418
  "stateMutability": "view",
419
419
  "type": "function"
420
+ },
421
+ {
422
+ "inputs": [],
423
+ "name": "getFirstClosableJobId",
424
+ "outputs": [
425
+ {
426
+ "internalType": "uint256",
427
+ "name": "",
428
+ "type": "uint256"
429
+ }
430
+ ],
431
+ "stateMutability": "view",
432
+ "type": "function"
420
433
  }
421
434
  ]
422
435
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ratio1
3
- Version: 3.4.91
3
+ Version: 3.4.92
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=CG1uVx6N_JWkoDGCIqSi6Ya8ker6PN2LEgvsHIxDnHo,331
2
+ ratio1/_ver.py,sha256=jr82AXwgHwGADT5iLJq0XMsii56EJRQuow9NbIZHlb8,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=F-tBJlM_o_-fFipUjEfPWk4AKkyNSta4wcxCpECPWSk,51497
20
+ ratio1/bc/evm.py,sha256=E_W6mjmk1-rBrRaCaYE5mM0LItHwkCTpjAEWR9JgmAM,52511
21
21
  ratio1/certs/51.15.142.167.crt,sha256=rLxkwDIQm-u6Kw570NmdSFgjSChcdSJvXPxr4Mj-EU8,1167
22
22
  ratio1/certs/72.60.187.24.crt,sha256=R_7KRS9zLONRxk6FpB72674Z45rKG5prKOd5MZGKk1E,1164
23
23
  ratio1/certs/72.60.81.67.crt,sha256=1Lw19spbXnswqKoQVih78xuZe5NxP5z9HS6bh3-0U_g,1159
@@ -44,7 +44,7 @@ ratio1/const/apps.py,sha256=0NiuoAPak0HjEULF3fs3xaUH8IRSZ0i4fZw7T2fEd_g,785
44
44
  ratio1/const/base.py,sha256=QIeRH6X-u8DbezQCGipI3isL1LGComBQC5hLedO1jrQ,6042
45
45
  ratio1/const/comms.py,sha256=qEYX4ciYg8SYWSDZZTUYxzpR1--2a7UusrWzAq0hxo8,2259
46
46
  ratio1/const/environment.py,sha256=632L5GrcNqF3-JhvrC6kXzXwLMcihRgMlOkLurnOwGY,1031
47
- ratio1/const/evm_net.py,sha256=9is8Gx2_xtKlWRNAZTNAmmaA33c30xvpBT-zL4AtIuM,16774
47
+ ratio1/const/evm_net.py,sha256=v53s5Cm_0iZqHdBjkR-3FLYKElB2_PKikHltqZz_H3s,17013
48
48
  ratio1/const/formatter.py,sha256=AW3bWlqf39uaqV4BBUuW95qKYfF2OkkU4f9hy3kSVhM,200
49
49
  ratio1/const/heartbeat.py,sha256=Z_n87yI-L4vlBmlHZhkruysEJV5JVbXLQlGI26R42C4,3197
50
50
  ratio1/const/misc.py,sha256=VDCwwpf5bl9ltx9rzT2WPVP8B3mZFRufU1tSS5MO240,413
@@ -105,8 +105,8 @@ ratio1/utils/comm_utils.py,sha256=4cS9llRr_pK_3rNgDcRMCQwYPO0kcNU7AdWy_LtMyCY,10
105
105
  ratio1/utils/config.py,sha256=Elfkl7W4aDMvB5WZLiYlPXrecBncgTxb4hcKhQedMzI,10111
106
106
  ratio1/utils/dotenv.py,sha256=_AgSo35n7EnQv5yDyu7C7i0kHragLJoCGydHjvOkrYY,2008
107
107
  ratio1/utils/oracle_sync/oracle_tester.py,sha256=aJOPcZhtbw1XPqsFG4qYpfv2Taj5-qRXbwJzrPyeXDE,27465
108
- ratio1-3.4.91.dist-info/METADATA,sha256=wGOM7ipeHJbAEwAbE72zSfkbbNlhdJwC_Xiv1p9jfmk,12255
109
- ratio1-3.4.91.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
110
- ratio1-3.4.91.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
111
- ratio1-3.4.91.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
112
- ratio1-3.4.91.dist-info/RECORD,,
108
+ ratio1-3.4.92.dist-info/METADATA,sha256=LBq9it3rOtn9ztF0CeGxauX8HCght4h4k_2oR0t7NhI,12255
109
+ ratio1-3.4.92.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
110
+ ratio1-3.4.92.dist-info/entry_points.txt,sha256=DR_olREzU1egwmgek3s4GfQslBi-KR7lXsd4ap0TFxE,46
111
+ ratio1-3.4.92.dist-info/licenses/LICENSE,sha256=cvOsJVslde4oIaTCadabXnPqZmzcBO2f2zwXZRmJEbE,11311
112
+ ratio1-3.4.92.dist-info/RECORD,,