iwa 0.0.19__py3-none-any.whl → 0.0.21__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.
Files changed (39) hide show
  1. iwa/core/chain/interface.py +8 -1
  2. iwa/core/chainlist.py +116 -0
  3. iwa/core/constants.py +1 -0
  4. iwa/core/contracts/cache.py +131 -0
  5. iwa/core/contracts/contract.py +7 -0
  6. iwa/core/monitor.py +2 -2
  7. iwa/core/rpc_monitor.py +60 -0
  8. iwa/core/services/safe.py +2 -2
  9. iwa/plugins/gnosis/safe.py +1 -1
  10. iwa/plugins/gnosis/tests/test_safe.py +1 -1
  11. iwa/plugins/olas/contracts/activity_checker.py +63 -25
  12. iwa/plugins/olas/contracts/staking.py +115 -19
  13. iwa/plugins/olas/events.py +141 -0
  14. iwa/plugins/olas/plugin.py +2 -2
  15. iwa/plugins/olas/service_manager/base.py +7 -2
  16. iwa/plugins/olas/service_manager/lifecycle.py +30 -5
  17. iwa/plugins/olas/service_manager/mech.py +9 -0
  18. iwa/plugins/olas/service_manager/staking.py +6 -2
  19. iwa/plugins/olas/tests/test_olas_integration.py +38 -10
  20. iwa/plugins/olas/tests/test_plugin_full.py +3 -5
  21. iwa/plugins/olas/tests/test_service_manager.py +7 -1
  22. iwa/plugins/olas/tests/test_service_manager_errors.py +22 -11
  23. iwa/plugins/olas/tests/test_service_manager_flows.py +24 -8
  24. iwa/plugins/olas/tests/test_service_staking.py +59 -15
  25. iwa/plugins/olas/tests/test_staking_validation.py +8 -14
  26. iwa/tools/test_chainlist.py +38 -0
  27. iwa/tui/rpc.py +1 -1
  28. iwa/tui/screens/wallets.py +2 -2
  29. iwa/tui/tests/test_rpc.py +2 -2
  30. iwa/tui/widgets/base.py +1 -1
  31. iwa/web/routers/olas/staking.py +9 -4
  32. {iwa-0.0.19.dist-info → iwa-0.0.21.dist-info}/METADATA +1 -1
  33. {iwa-0.0.19.dist-info → iwa-0.0.21.dist-info}/RECORD +39 -33
  34. tests/test_monitor.py +3 -3
  35. tests/test_rpc_efficiency.py +103 -0
  36. {iwa-0.0.19.dist-info → iwa-0.0.21.dist-info}/WHEEL +0 -0
  37. {iwa-0.0.19.dist-info → iwa-0.0.21.dist-info}/entry_points.txt +0 -0
  38. {iwa-0.0.19.dist-info → iwa-0.0.21.dist-info}/licenses/LICENSE +0 -0
  39. {iwa-0.0.19.dist-info → iwa-0.0.21.dist-info}/top_level.txt +0 -0
@@ -1,16 +1,18 @@
1
1
  iwa/__init__.py,sha256=vu12UytYNREtMRvIWp6AfV1GgUe53XWwCMhYyqKAPgo,19
2
2
  iwa/__main__.py,sha256=eJU5Uxeu9Y7shWg5dt5Mcq0pMC4wFVNWjeYGKSf4Apw,88
3
3
  iwa/core/__init__.py,sha256=GJv4LJOXeZ3hgGvbt5I6omkoFkP2A9qhHjpDlOep9ik,24
4
+ iwa/core/chainlist.py,sha256=IOnlfRFaPlzdg91HbILynzvRfEJ9afikjFUS06K4rfU,4021
4
5
  iwa/core/cli.py,sha256=GCrHSUp5W1KdLHoWbk0aCLTphkKDLROoFh82uyUqdY8,7729
5
- iwa/core/constants.py,sha256=En-1uT5Anv0_NCSMdQjTGvjqiNAWfbSb_kGlH4Ct0Ag,966
6
+ iwa/core/constants.py,sha256=_CYUVQpR--dRPuxotsmbzQE-22y61tlnjUD7IhlvVVA,997
6
7
  iwa/core/db.py,sha256=WI-mP0tQAmwFPeEi9w7RCa_Mcf_zBfd_7JcbHJwU1aU,10377
7
8
  iwa/core/ipfs.py,sha256=aHjq_pflgwDVHl8g5EMQv0q2RAmMs-a0pOTVsj_L5xE,4980
8
9
  iwa/core/keys.py,sha256=ckacVZxm_02V9hlmHIxz-CkxjXdGHqvGGAXfO6EeHCw,22365
9
10
  iwa/core/mnemonic.py,sha256=LiG1VmpydQoHQ0pHUJ1OIlrWJry47VSMnOqPM_Yk-O8,12930
10
11
  iwa/core/models.py,sha256=kBQ0cBe6uFmL2QfW7mjKiMFeZxhT-FRN-RyK3Ko0vE8,12849
11
- iwa/core/monitor.py,sha256=OmhKVMkfhvtxig3wDUL6iGwBIClTx0YUqMncCao4SqI,7953
12
+ iwa/core/monitor.py,sha256=6hQHAdJIsyoOwnZ9KdYDk_k0mclgr94iFk8V6BtatFQ,7957
12
13
  iwa/core/plugins.py,sha256=FLvOG4S397fKi0aTH1fWBEtexn4yvGv_QzGWqFrhSKE,1102
13
14
  iwa/core/pricing.py,sha256=uENpqVMmuogZHctsLuEsU7WJ1cLSNAI-rZTtbpTDjeQ,4048
15
+ iwa/core/rpc_monitor.py,sha256=-NHR1Mn2IJKJ9x975NGfsze_shI12yL0OyTPtmjUMKg,1661
14
16
  iwa/core/secrets.py,sha256=U7DZKrwKuSOFV00Ij3ISrrO1cWn_t1GBW_0PyAqjcD4,2588
15
17
  iwa/core/tables.py,sha256=y7Cg67PAGHYVMVyAjbo_CQ9t2iz7UXE-OTuUHRyFRTo,2021
16
18
  iwa/core/test.py,sha256=gey0dql5eajo1itOhgkSrgfyGWue2eSfpr0xzX3vc38,643
@@ -20,12 +22,13 @@ iwa/core/utils.py,sha256=shJuANkXSWVO3NF49syPA9hCG7H5AzaMJOG8V4fo6IM,4279
20
22
  iwa/core/wallet.py,sha256=sNFK-_0y-EgeLpNHt9o5tCqTM0oVqJra-eAWjR7AgyU,13038
21
23
  iwa/core/chain/__init__.py,sha256=XJMmn0ed-_aVkY2iEMKpuTxPgIKBd41dexSVmEZTa-o,1604
22
24
  iwa/core/chain/errors.py,sha256=9SEbhxZ-qASPkzt-DoI51qq0GRJVqRgqgL720gO7a64,1275
23
- iwa/core/chain/interface.py,sha256=uUIUo9Q6Sr4h9AjqFe6WqQzdbMs9VkJcUj0mgd6lfx4,18602
25
+ iwa/core/chain/interface.py,sha256=04eGlhonHAvxFnqLoHRWUaQBzys6jW6BppUuNNjlnSk,18809
24
26
  iwa/core/chain/manager.py,sha256=cFEzh6pK5OyVhjhpeMAqhc9RnRDQR1DjIGiGKp-FXBI,1159
25
27
  iwa/core/chain/models.py,sha256=0OgBo08FZEQisOdd00YUMXSAV7BC0CcWpqJ2y-gs0cI,4863
26
28
  iwa/core/chain/rate_limiter.py,sha256=gU7TmWdH9D_wbXKT1X7mIgoIUCWVuebgvRhxiyLGAmI,6613
27
29
  iwa/core/contracts/__init__.py,sha256=P5GFY_pnuI02teqVY2U0t98bn1_SSPAbcAzRMpCdTi4,34
28
- iwa/core/contracts/contract.py,sha256=N2I4-38O_6awqVrTEdJFh4XhsMbeu2JtFvkboUC4ZMg,12517
30
+ iwa/core/contracts/cache.py,sha256=7wGQgyXAmofvx-irbxSnGgIDzQik6Pcpm7up6wMQcoo,4454
31
+ iwa/core/contracts/contract.py,sha256=DCSQmlOom_SkGXElcr1VQyAt2nt0GjkYhLpiQsWDJPY,12810
29
32
  iwa/core/contracts/erc20.py,sha256=VqriOdUXej0ilTgpukpm1FUF_9sSrVMAPuEpIvyZ2SQ,2646
30
33
  iwa/core/contracts/multisend.py,sha256=tSdBCWe7LSdBoKZ7z2QebmRFK4M2ln7H3kmJBeEb4Ho,2431
31
34
  iwa/core/contracts/abis/erc20.json,sha256=vrdExMWcIogg_nO59j1Pmipmpa2Ulj3oCCdcdrrFVCE,16995
@@ -35,7 +38,7 @@ iwa/core/services/__init__.py,sha256=ab5pYzmu3LrZLTO5N-plx6Rp4R0hBEnbbzsgz84zWGM
35
38
  iwa/core/services/account.py,sha256=01MoEvl6FJlMnMB4fGwsPtnGa4kgA-d5hJeKu_ACg7Y,1982
36
39
  iwa/core/services/balance.py,sha256=mPE12CuOFfCaJXaQXWOcQM1O03ZF3ghpy_-oOjNk_GE,4104
37
40
  iwa/core/services/plugin.py,sha256=GNNlbtELyHl7MNVChrypF76GYphxXduxDog4kx1MLi8,3277
38
- iwa/core/services/safe.py,sha256=ytNJMndXrzTMHwhDZKYLIh4Q0UTWDBgQgTpof-UqIkA,14827
41
+ iwa/core/services/safe.py,sha256=ZmgVwbQhYlH5r3qhlY5uP8nCPtkkvV3sNnYG7_UCWUQ,14831
39
42
  iwa/core/services/transaction.py,sha256=DiEVwE1L_UpCyC5UmknaRwRYRxsDlAkwMQRN64NiwIQ,15162
40
43
  iwa/core/services/transfer/__init__.py,sha256=ZJfshFxJRsp8rkOqfVvd1cqEzIJ9tqBJh8pc0l90GLk,5576
41
44
  iwa/core/services/transfer/base.py,sha256=sohz-Ss2i-pGYGl4x9bD93cnYKcSvsXaXyvyRawvgQs,9043
@@ -48,26 +51,27 @@ iwa/plugins/__init__.py,sha256=zy-DjOZn8GSgIETN2X_GAb9O6yk71t6ZRzeUgoZ52KA,23
48
51
  iwa/plugins/gnosis/__init__.py,sha256=dpx0mE84eV-g5iZaH5nKivZJnoKWyRFX5rhdjowBwuU,114
49
52
  iwa/plugins/gnosis/cow_utils.py,sha256=iSvbfgTr2bCqRsUznKCWqmoTnyuX-WZX4oh0E-l3XBU,2263
50
53
  iwa/plugins/gnosis/plugin.py,sha256=AgkgOGYfnrcjWrPUiAvySMj6ITnss0SFXiEi6Z6fnMs,1885
51
- iwa/plugins/gnosis/safe.py,sha256=aDcBz50Bliur90sVqxgjGoQJyCqsfZlm0PDsmWIDBak,5517
54
+ iwa/plugins/gnosis/safe.py,sha256=ye5GQhzKALPNiyJhr7lyrhDgdrDyIj_h3TN2QWI4Xds,5519
52
55
  iwa/plugins/gnosis/cow/__init__.py,sha256=lZN5QpIYWL67rE8r7z7zS9dlr8OqFrYeD9T4-RwUghU,224
53
56
  iwa/plugins/gnosis/cow/quotes.py,sha256=u2xFKgL7QTKqCkSPMv1RHaXvZ6WzID4haaZDMVS42Bs,5177
54
57
  iwa/plugins/gnosis/cow/swap.py,sha256=XZdvJbTbh54hxer7cKkum7lNQ-03gddMK95K3MenaFE,15209
55
58
  iwa/plugins/gnosis/cow/types.py,sha256=-9VRiFhAkmN1iIJ95Pg7zLFSeXtkkW00sl13usxi3o8,470
56
59
  iwa/plugins/gnosis/tests/test_cow.py,sha256=iVy5ockMIcPZWsX4WGXU91DhBsYEZ5NOxtFzAQ2sK3o,8440
57
- iwa/plugins/gnosis/tests/test_safe.py,sha256=pw1zrYvAiVtmPIU5k7BtOQpDNAQTSTrLIaeljCjSahc,3216
60
+ iwa/plugins/gnosis/tests/test_safe.py,sha256=hQHVHBWQhGnuvzvx4U9fOWEwASJWwql42q6cfRcuAls,3218
58
61
  iwa/plugins/olas/__init__.py,sha256=_NhBczzM61fhGYwGhnWfEeL8Jywyy_730GASe2BxzeQ,106
59
62
  iwa/plugins/olas/constants.py,sha256=iTFoO2QW3KbhL5k5sKsJxxyDytl9wVIb_9hAih55KrE,7728
63
+ iwa/plugins/olas/events.py,sha256=SWD3wYdQ-l6dLUJSkfh_WsLmedH4Vsw_EvYXg7QC3yc,5970
60
64
  iwa/plugins/olas/importer.py,sha256=f8KlZ9dGcNbpg8uoTYbO9sDvbluZoslhpWFLqPjPnLA,26717
61
65
  iwa/plugins/olas/mech_reference.py,sha256=CaSCpQnQL4F7wOG6Ox6Zdoy-uNEQ78YBwVLILQZKL8Q,5782
62
66
  iwa/plugins/olas/models.py,sha256=xC5hYakX53pBT6zZteM9cyiC7t6XRLLpobjQmDYueOo,3520
63
- iwa/plugins/olas/plugin.py,sha256=S_vnvZ02VdVWD7N5kp7u5JIRQ2JLtfwGDZ7OHkAN0M8,9390
64
- iwa/plugins/olas/contracts/activity_checker.py,sha256=PTLvsFdi3PdsFMxRVcXfwlQMRyJYHIzrHf3OaPVtFqU,3943
67
+ iwa/plugins/olas/plugin.py,sha256=h7Wjw-ozalu9ocZbFcQGEw_TM8fgW6Qyh_DY1VOGeLY,9393
68
+ iwa/plugins/olas/contracts/activity_checker.py,sha256=WXxuzbpXGVqIfEiMPiiqN3Z_UxIY-Lvx0raa1ErBfPA,5323
65
69
  iwa/plugins/olas/contracts/base.py,sha256=y73aQbDq6l4zUpz_eQAg4MsLkTAEqjjupXlcvxjfgCI,240
66
70
  iwa/plugins/olas/contracts/mech.py,sha256=dXYtyORc-oiu9ga5PtTquOFkoakb6BLGKvlUsteygIg,2767
67
71
  iwa/plugins/olas/contracts/mech_marketplace.py,sha256=hMADl5MQGvT2wLRKu4vHGe4RrAZVq8Y2M_EvXWWz528,1554
68
72
  iwa/plugins/olas/contracts/mech_marketplace_v1.py,sha256=ooF5uw1wxwYsoriGUGGxXxmaD8DtWZtK4TJBCUNTGtI,2501
69
73
  iwa/plugins/olas/contracts/service.py,sha256=BDQKeCTCnBNrwKD1a8rrlLytpKG3CAdjr-s0ec-dsFY,8243
70
- iwa/plugins/olas/contracts/staking.py,sha256=vt2UZ6G0edg1EbPrzFK5AIse531bQTu4PLydQ6rgrAA,14494
74
+ iwa/plugins/olas/contracts/staking.py,sha256=TimiHSJy5wAlx35uplyeG7TG6NpxPigkmKcrz_ZBCjY,18487
71
75
  iwa/plugins/olas/contracts/abis/activity_checker.json,sha256=HT0IMbyTLMO71ITBKwoS950rHe772suPP4b8eDAodJ0,2230
72
76
  iwa/plugins/olas/contracts/abis/mech.json,sha256=bMMCXInjE_2PTPnc_sIyS_H8pod5Sm_e-xTbKgZppKc,16369
73
77
  iwa/plugins/olas/contracts/abis/mech_marketplace.json,sha256=KPnF-H_UATb3wdb_7o6ky_hSp5xwgvckD-QqylsWJLg,32468
@@ -81,33 +85,33 @@ iwa/plugins/olas/contracts/abis/staking_token.json,sha256=cuUOmi1s4Z6VSIX0an_IxK
81
85
  iwa/plugins/olas/scripts/test_full_mech_flow.py,sha256=Fqoq5bn7Z_3YyRrnuqNAZy9cwQDLiXP6Vf3EIeWPo2I,9024
82
86
  iwa/plugins/olas/scripts/test_simple_lifecycle.py,sha256=8T50tOZx3afeECSfCNAb0rAHNtYOsBaeXlMwKXElCk8,2099
83
87
  iwa/plugins/olas/service_manager/__init__.py,sha256=GXiThMEY3nPgHUl1i-DLrF4h96z9jPxxI8Jepo2E1PM,1926
84
- iwa/plugins/olas/service_manager/base.py,sha256=CCTH7RiYtgyFwRszrMLxNf1rNM_6leWHuJJmse4m2wI,4854
88
+ iwa/plugins/olas/service_manager/base.py,sha256=EBPg0ymqgtAb7ZvVSfTt31QYgv_6gp4UAc6je00NLAg,5009
85
89
  iwa/plugins/olas/service_manager/drain.py,sha256=IS7YYKuQdkULcNdxfHVzjcq95pXKdpajolzLL78u4jc,12430
86
- iwa/plugins/olas/service_manager/lifecycle.py,sha256=DIB6yrP0VPICu6558uQJuFp2sgrA66iVNTzZVUUowGw,47159
87
- iwa/plugins/olas/service_manager/mech.py,sha256=WJtf90y9JrFAo6QHosFn0bfM_2q9VjMBmXhYzwDsUpU,27620
88
- iwa/plugins/olas/service_manager/staking.py,sha256=Z9GzlPfY7qSSjc9xPhWvb9qywxu_7OB3Gc1eBli07pY,28058
90
+ iwa/plugins/olas/service_manager/lifecycle.py,sha256=Lr2O3Vmv8dLlzwUVt_Ga8bFRQD3TbrM6LGs5kKeiAOE,48410
91
+ iwa/plugins/olas/service_manager/mech.py,sha256=NVzVbEmyOe3wK92VEzCCOSuy3HDkEP1MSoVt7Av8Psk,27949
92
+ iwa/plugins/olas/service_manager/staking.py,sha256=7REp_HziKtqF9uSvbcq01C9XiaxgVT3gCimuLAAdNnM,28219
89
93
  iwa/plugins/olas/tests/conftest.py,sha256=4vM7EI00SrTGyeP0hNzsGSQHEj2-iznVgzlNh2_OGfo,739
90
94
  iwa/plugins/olas/tests/test_importer.py,sha256=i9LKov7kNRECB3hmRnhKBwcfx3uxtjWe4BB77bOOpeo,4282
91
95
  iwa/plugins/olas/tests/test_importer_error_handling.py,sha256=X37TrvJ6-3-NuJ2megm0Cnx3KJdA1wke563pRf_EPJk,12084
92
96
  iwa/plugins/olas/tests/test_mech_contracts.py,sha256=wvxuigPafF-ySIHVBdWVei3AO418iPh7cSVdAlUGm_s,3566
93
97
  iwa/plugins/olas/tests/test_olas_contracts.py,sha256=B8X-5l1KfYMoZOiM94_rcNzbILLl78rqt_jhyxzAOqE,10835
94
- iwa/plugins/olas/tests/test_olas_integration.py,sha256=uIA9NB1iaOSTOaPgY5gRvrFxFLeq6Z93239yi2qzj1g,20488
98
+ iwa/plugins/olas/tests/test_olas_integration.py,sha256=vjL8-RNdxXu6RFR5F1Bn7xqnxnUVWTzl2--Pp7-0r5A,22973
95
99
  iwa/plugins/olas/tests/test_olas_models.py,sha256=5scX-wvRLGH3G44S2okq_tyQ9Rk7Pd0Ak1zNCZ2HtI4,4957
96
100
  iwa/plugins/olas/tests/test_olas_view.py,sha256=kh3crsriyoRiZC6l8vzGllocvQnYmqziv-csbmXih0E,10489
97
101
  iwa/plugins/olas/tests/test_olas_view_actions.py,sha256=jAxr9bjFNAaxGf1btIrxdMaHgJ0PWX9aDwVU-oPGMpk,5109
98
102
  iwa/plugins/olas/tests/test_olas_view_modals.py,sha256=8j0PNFjKqFC5V1kBdVFWNLMvqGt49H6fLSYGxn02c8o,5562
99
103
  iwa/plugins/olas/tests/test_plugin.py,sha256=RVgU-Cq6t_3mOh90xFAGwlJOV7ZIgp0VNaK5ZAxisAQ,2565
100
- iwa/plugins/olas/tests/test_plugin_full.py,sha256=xevLYmdU4zd5FyEEEn9gvzGimPztmt6vymybeZHXnq8,8507
104
+ iwa/plugins/olas/tests/test_plugin_full.py,sha256=HdEJf_beqH18TaA-PFFMsKFA4ycXY-bz_kbaHQknaic,8390
101
105
  iwa/plugins/olas/tests/test_service_lifecycle.py,sha256=sOCtpz8T9s55AZe9AoqP1h3XrXw5NDSjDqwLgYThvU4,5559
102
- iwa/plugins/olas/tests/test_service_manager.py,sha256=wUdgB_73WtMxzpO3olMCwet9v9EudGr9uQyXeF9o_yE,40380
103
- iwa/plugins/olas/tests/test_service_manager_errors.py,sha256=M49aZQYVBvPAEvJdpJO6gN8wC1tUdHnln7XxmqO_O50,8151
104
- iwa/plugins/olas/tests/test_service_manager_flows.py,sha256=lxkXdK2Ht92wAywMUyXYYRfkR3boixzGGF47MEgcq54,19418
106
+ iwa/plugins/olas/tests/test_service_manager.py,sha256=rS2m0A26apc-o4HsfP5oXmVcmZSR5e874bjhQKZRaSg,40650
107
+ iwa/plugins/olas/tests/test_service_manager_errors.py,sha256=udlAsQj_t1F5TwVQuWhroF6jDJ4RmGEXaxPh87tMsuA,8538
108
+ iwa/plugins/olas/tests/test_service_manager_flows.py,sha256=QvRFpJIapZXbagxPApr-995i64aJDapxSFyae8tNSHU,20722
105
109
  iwa/plugins/olas/tests/test_service_manager_mech.py,sha256=qG6qu5IPRNypXUsblU2OEkuiuwDJ0TH8RXZbibmTFcQ,4937
106
110
  iwa/plugins/olas/tests/test_service_manager_rewards.py,sha256=hIVckGl5rEr-KHGNUxxVopal0Tpw4EZharBt0MbaCVA,11798
107
111
  iwa/plugins/olas/tests/test_service_manager_validation.py,sha256=ajlfH5uc4mAHf8A7GLE5cW7X8utM2vUilM0JdGDdlVg,5382
108
- iwa/plugins/olas/tests/test_service_staking.py,sha256=XkC8H_qVumOQ1i4_vidEdXqkK5stInd2tgT50l0SRMk,12201
112
+ iwa/plugins/olas/tests/test_service_staking.py,sha256=miNGZZoIrZf0Am-pJ8gTyvVAruL4P7jMvrtFEhG5wxQ,15694
109
113
  iwa/plugins/olas/tests/test_staking_integration.py,sha256=QCBQf6P2ZmmsEGt2k8W2r53lG2aVRuoMJE-aFxVDLss,9701
110
- iwa/plugins/olas/tests/test_staking_validation.py,sha256=J7DgDdIiVTkKv_7obtSHQ2lgfUGPmUwuPjTUkiT4cbs,4198
114
+ iwa/plugins/olas/tests/test_staking_validation.py,sha256=uug64jFcXYJ3Nw_lNa3O4fnhNr5wAWHHIrchSbR2MVE,4020
111
115
  iwa/plugins/olas/tui/__init__.py,sha256=5ZRsbC7J3z1xfkZRiwr4bLEklf78rNVjdswe2p7SlS8,28
112
116
  iwa/plugins/olas/tui/olas_view.py,sha256=qcPxhurDPJjHWln6R64ZVAJ2h82IXzw48unhRvQVZqQ,36448
113
117
  iwa/tools/__init__.py,sha256=jQyuwDQGRigSe7S9JMb4yK3CXPgZFJNffzt6N2v9PU0,21
@@ -117,21 +121,22 @@ iwa/tools/release.py,sha256=-Z9GG6Y-K6KG32K0VUf_MruiUdJxG6W7ToOMzhyCH7Y,3963
117
121
  iwa/tools/reset_env.py,sha256=FKN0wuh9Xq00c94B2kEFehHPKcWldxYqgU45yJwg5Cg,3140
118
122
  iwa/tools/reset_tenderly.py,sha256=usKfOLrQvdCzEncueg-Sz3spqX80vHPQmbh2tIygo8o,11295
119
123
  iwa/tools/restore_backup.py,sha256=_LJbmKv9SlekLUQFdjI3aHCvAc6uePobJe3bQEFyatk,2455
124
+ iwa/tools/test_chainlist.py,sha256=9J06sTsKgnEcN7WSn-YgJkCHhfbGDdVS-KNMDBhYllA,1143
120
125
  iwa/tools/wallet_check.py,sha256=IQLgb8oCt4oG6FMEAqzUxM57DLv_UE24dFUSVxtBo_Y,4774
121
126
  iwa/tui/__init__.py,sha256=XYIZNQNy-fZC1NHHM0sd9qUO0vE1slml-cm0CpQ4NLY,27
122
127
  iwa/tui/app.py,sha256=XDQ4nAPGBwhrEmdL_e3V8oYSOho8pY7jsd3C_wk92UU,4163
123
- iwa/tui/rpc.py,sha256=4q2zcBu7XXDU9c66UYtfbXiNdQyS_uLa9xOs3UmPOO0,2131
128
+ iwa/tui/rpc.py,sha256=iEp7aQ2MZxeXWqvxYud_5Y5oX2NoweMd1DQQlGYBGv8,2133
124
129
  iwa/tui/workers.py,sha256=lvzbIS375_H1rj7-9d-w0PKnkDJ4lW_13aWzZRaX9fY,1192
125
130
  iwa/tui/modals/__init__.py,sha256=OyrjWjaPqQAllZcUJ-Ac_e1PtTouJy8m1eGo132p-EA,130
126
131
  iwa/tui/modals/base.py,sha256=q9dEV6We_SPxbMRh711amFDwAOBywD00Qg0jcqvh5LE,12060
127
132
  iwa/tui/screens/__init__.py,sha256=j0brLsuVd9M8hM5LHH05E7manY3ZVj24yf7nFyGryp4,31
128
- iwa/tui/screens/wallets.py,sha256=F_1feKuml3rUUHSfdT2XmgBIViGHNrdQeUcgpFUb0Ys,30821
133
+ iwa/tui/screens/wallets.py,sha256=U6IUbV_7ByAyUi3aBVdFr3A1QlGzNORRE4uOHBQXQB0,30825
129
134
  iwa/tui/tests/test_app.py,sha256=F0tJthsyWzwNbHcGtiyDQtKDPn3m9N1qt2vMGiXrQTQ,3868
130
- iwa/tui/tests/test_rpc.py,sha256=chH9b6GunfymaYdqz3GVQ_LQui4zihyBkrCG6xOUY1Q,4326
135
+ iwa/tui/tests/test_rpc.py,sha256=4m2HC-R5R9kO5pluo2G_CrTBQv63YYrdZNufTjtnGUk,4330
131
136
  iwa/tui/tests/test_wallets_refactor.py,sha256=71G3HLbhTtgDy3ffVbYv0MFYRgdYd-NWGBdvdzW4M9c,998
132
137
  iwa/tui/tests/test_widgets.py,sha256=C9UgIGeWRaQ459JygFEQx-7hOi9mWrSUDDIMZH1ge50,3994
133
138
  iwa/tui/widgets/__init__.py,sha256=UzD6nJbwv9hOtkWl9I7faXm1a-rcu4xFRxrf4KBwwY4,161
134
- iwa/tui/widgets/base.py,sha256=G844GU61qSS6AgY5NxmOVHTghbgHlyTfo8hhE2VUrqQ,3379
139
+ iwa/tui/widgets/base.py,sha256=Z8FigMhsfD76PkFVERqMaotd-xwXfuFZm_8TmCMOsl4,3381
135
140
  iwa/web/dependencies.py,sha256=0_dAJlRh6gKrUDRPKUe92eshFsg572yx_H0lQgSqGDA,2103
136
141
  iwa/web/models.py,sha256=MSD9WPy_Nz_amWgoo2KSDTn4ZLv_AV0o0amuNtSf-68,3035
137
142
  iwa/web/server.py,sha256=4ZLVFEKoGs_NoCcXMeyYzDNdxUXazjwHQaX7CR1pwHE,5239
@@ -144,7 +149,7 @@ iwa/web/routers/olas/admin.py,sha256=PMRdNelqYgQ1xbqh3floFV5xrVtBRQiwZPd8J9_ffxg
144
149
  iwa/web/routers/olas/funding.py,sha256=f8fADNtbZEBFl-vuVKfas6os38Vot6K5tJBTenZmCD0,4832
145
150
  iwa/web/routers/olas/general.py,sha256=dPsBQppTGoQY1RztliUhseOHOZGeeCR10lhThD9kyXo,803
146
151
  iwa/web/routers/olas/services.py,sha256=IpjvkpJeCwREbdHt47gov-fvTl9bY4EBUmZZZEHi3iI,16310
147
- iwa/web/routers/olas/staking.py,sha256=N1pMcPjhpfSPi7Sl7XIIAPoFxf0hptdvkUqkTtgqPcc,12424
152
+ iwa/web/routers/olas/staking.py,sha256=Ak29SIIMNAgPqIij6sdNAG4z7LUeUGRVRpplZw4hsAU,12666
148
153
  iwa/web/static/app.js,sha256=CWm_TR2nKSDe8z0-nUQp7VaBHIGJg7mAOU-XJDveFsk,113487
149
154
  iwa/web/static/index.html,sha256=q7s7plnMbN1Nkzr5bRxZgvgOFerUChEGIZW7SpAVtPc,28514
150
155
  iwa/web/static/style.css,sha256=aTtE42mmfYV6y7xfo9cUgUhT8x-KyNC1zmPjSdskxIk,24315
@@ -152,7 +157,7 @@ iwa/web/tests/test_web_endpoints.py,sha256=C264MH-CTyDW4GLUrTXBgLJKUk4-89pFAScBd
152
157
  iwa/web/tests/test_web_olas.py,sha256=0CVSsrncOeJ3x0ECV7mVLQV_CXZRrOqGiVjgLIi6hZ8,16308
153
158
  iwa/web/tests/test_web_swap.py,sha256=7A4gBJFL01kIXPtW1E1J17SCsVc_0DmUn-R8kKrnnVA,2974
154
159
  iwa/web/tests/test_web_swap_coverage.py,sha256=zGNrzlhZ_vWDCvWmLcoUwFgqxnrp_ACbo49AtWBS_Kw,5584
155
- iwa-0.0.19.dist-info/licenses/LICENSE,sha256=eIubm_IlBHPYRQlLNZKbBNKhJUUP3JH0A2miZUhAVfI,1078
160
+ iwa-0.0.21.dist-info/licenses/LICENSE,sha256=eIubm_IlBHPYRQlLNZKbBNKhJUUP3JH0A2miZUhAVfI,1078
156
161
  tests/legacy_cow.py,sha256=oOkZvIxL70ReEoD9oHQbOD5GpjIr6AGNHcOCgfPlerU,8389
157
162
  tests/legacy_safe.py,sha256=AssM2g13E74dNGODu_H0Q0y412lgqsrYnEzI97nm_Ts,2972
158
163
  tests/legacy_transaction_retry_logic.py,sha256=D9RqZ7DBu61Xr2djBAodU2p9UE939LL-DnQXswX5iQk,1497
@@ -177,12 +182,13 @@ tests/test_migration.py,sha256=fYoxzI3KqGh0cPV0bFcbvGrAnKcNlvnwjggG_uD0QGo,1789
177
182
  tests/test_mnemonic.py,sha256=BFtXMMg17uHWh_H-ZwAOn0qzgbUCqL8BRLkgRjzfzxo,7379
178
183
  tests/test_modals.py,sha256=R_lXa7wnnGewAP5jJvVZDyQyY1FbE98IeO2B7y3x86c,2945
179
184
  tests/test_models.py,sha256=1bEfPiDVgEdtwFEzwecSPAHjCF8kjOPSMeQExJ7eCJ4,7107
180
- tests/test_monitor.py,sha256=P_hF61VMlCX2rh9yu_a6aKhlgXOAcCMGOZRntjcqrd0,7255
185
+ tests/test_monitor.py,sha256=dRVS6EkTwfvGEOg7t0dVhs6M3oEZExBH7iBZe6hmk4M,7261
181
186
  tests/test_multisend.py,sha256=IvXpwnC5xSDRCyCDGcMdO3L-eQegvdjAzHZB0FoVFUI,2685
182
187
  tests/test_plugin_service.py,sha256=ZEe37kV_sv4Eb04032O1hZIoo9yf5gJo83ks7Grzrng,3767
183
188
  tests/test_pricing.py,sha256=ptu_2Csc6d64bIzMMw3TheJge2Kfn05Gs-twz_KmBzg,5276
184
189
  tests/test_rate_limiter.py,sha256=DOIlrBP2AtVFHCpznIoFn2FjFc33emG7M_FffLh4MGE,7314
185
190
  tests/test_reset_tenderly.py,sha256=GVoqbDT3n4_GnlKF5Lx-8ew15jT8I2hIPdTulQDb6dI,7215
191
+ tests/test_rpc_efficiency.py,sha256=EEcBlbUXEi9JVBorLU7mK7mmK0vcFt53KhefHr1oPQc,3741
186
192
  tests/test_rpc_rotation.py,sha256=YU21TrMnEbcb36zu_L8dpCSbaHX7CkqXLjipz1swkkc,10554
187
193
  tests/test_rpc_view.py,sha256=sgZ53KEHl8VGb7WKYa0VI7Cdxbf8JH1SdroHYbWHjfQ,2031
188
194
  tests/test_safe_coverage.py,sha256=g9Bdrpkc-Mc8HBjk07lYNRkzxWZiF922uiVLZqhehBE,5093
@@ -204,8 +210,8 @@ tests/test_utils.py,sha256=vkP49rYNI8BRzLpWR3WnKdDr8upeZjZcs7Rx0pjbQMo,1292
204
210
  tests/test_workers.py,sha256=MInwdkFY5LdmFB3o1odIaSD7AQZb3263hNafO1De5PE,2793
205
211
  tools/create_and_stake_service.py,sha256=1xwy_bJQI1j9yIQ968Oc9Db_F6mk1659LuuZntTASDE,3742
206
212
  tools/verify_drain.py,sha256=PkMjblyOOAuQge88FwfEzRtCYeEtJxXhPBmtQYCoQ-8,6743
207
- iwa-0.0.19.dist-info/METADATA,sha256=ueADSL3j41OZTVAxdOovoGm6S4pPn9g2M4g2l7yVRgM,7295
208
- iwa-0.0.19.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
209
- iwa-0.0.19.dist-info/entry_points.txt,sha256=nwB6kscrfA7M00pYmL2j-sBH6eF6h2ga9IK1BZxdiyQ,241
210
- iwa-0.0.19.dist-info/top_level.txt,sha256=kedS9cRUbm4JE2wYeabIXilhHjN8KCw0IGbqqqsw0Bs,16
211
- iwa-0.0.19.dist-info/RECORD,,
213
+ iwa-0.0.21.dist-info/METADATA,sha256=G_17iq72W9SNwyz3rr7rrvVgRA_iKLlVgxUnbrXdLNk,7295
214
+ iwa-0.0.21.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
215
+ iwa-0.0.21.dist-info/entry_points.txt,sha256=nwB6kscrfA7M00pYmL2j-sBH6eF6h2ga9IK1BZxdiyQ,241
216
+ iwa-0.0.21.dist-info/top_level.txt,sha256=kedS9cRUbm4JE2wYeabIXilhHjN8KCw0IGbqqqsw0Bs,16
217
+ iwa-0.0.21.dist-info/RECORD,,
tests/test_monitor.py CHANGED
@@ -12,7 +12,7 @@ def mock_chain_interfaces():
12
12
  instance = mock.return_value
13
13
  gnosis_interface = MagicMock()
14
14
  gnosis_interface.chain.name = "Gnosis"
15
- gnosis_interface.chain.rpc = "https://rpc"
15
+ gnosis_interface.current_rpc = "https://rpc"
16
16
  gnosis_interface.web3 = MagicMock()
17
17
  instance.get.return_value = gnosis_interface
18
18
  yield instance
@@ -46,7 +46,7 @@ def test_monitor_init_rpc_fail(mock_chain_interfaces, mock_callback):
46
46
 
47
47
  def test_monitor_init_no_rpc(mock_chain_interfaces, mock_callback):
48
48
  chain_interface = mock_chain_interfaces.get.return_value
49
- chain_interface.chain.rpc = ""
49
+ chain_interface.current_rpc = ""
50
50
 
51
51
  monitor = EventMonitor(["0x1234567890123456789012345678901234567890"], mock_callback)
52
52
  assert monitor.last_checked_block == 0
@@ -54,7 +54,7 @@ def test_monitor_init_no_rpc(mock_chain_interfaces, mock_callback):
54
54
 
55
55
  def test_start_no_rpc(mock_chain_interfaces, mock_callback):
56
56
  chain_interface = mock_chain_interfaces.get.return_value
57
- chain_interface.chain.rpc = ""
57
+ chain_interface.current_rpc = ""
58
58
 
59
59
  monitor = EventMonitor(["0x1234567890123456789012345678901234567890"], mock_callback)
60
60
 
@@ -0,0 +1,103 @@
1
+ from unittest.mock import MagicMock, patch
2
+
3
+ import pytest
4
+
5
+ from iwa.core.contracts.cache import ContractCache
6
+ from iwa.plugins.olas.contracts.staking import StakingContract
7
+
8
+
9
+ @pytest.fixture
10
+ def mock_chain_interface():
11
+ with patch("iwa.core.contracts.contract.ChainInterfaces") as mock_chains:
12
+ mock_interface = MagicMock()
13
+ mock_chains.return_value.get.return_value = mock_interface
14
+
15
+ # Mock web3 and contract
16
+ mock_web3_backend = MagicMock()
17
+ mock_interface.web3._web3 = mock_web3_backend
18
+
19
+ mock_contract = MagicMock()
20
+ mock_web3_backend.eth.contract.return_value = mock_contract
21
+
22
+ # Mock with_retry to execute the function
23
+ mock_interface.with_retry.side_effect = lambda func, **kwargs: func()
24
+
25
+ # Yield both interface and contract mock
26
+ yield mock_interface, mock_contract
27
+
28
+ def test_staking_contract_lazy_loading(mock_chain_interface):
29
+ """Verify StakingContract init does NOT make RPC calls."""
30
+ mock_interface, mock_contract = mock_chain_interface
31
+
32
+ # Reset ContractCache
33
+ ContractCache().clear()
34
+
35
+ # Instantiate logic
36
+ contract = StakingContract(address="0x123", chain_name="gnosis")
37
+
38
+ # Assert NO calls to call yet (since we mock with_retry to execute immediately, 0 calls means 0 executions)
39
+ assert mock_interface.with_retry.call_count == 0
40
+
41
+ # Setup return value
42
+ # livenessPeriod is a property that calls "livenessPeriod" on contract
43
+ mock_contract.functions.livenessPeriod.return_value.call.return_value = 3600
44
+
45
+ # Access property
46
+ val = contract.liveness_period
47
+ assert val == 3600
48
+
49
+ # Assert 1 call
50
+ assert mock_contract.functions.livenessPeriod.return_value.call.call_count == 1
51
+
52
+ # Access again
53
+ val = contract.liveness_period
54
+
55
+ # Assert still 1 call (cached)
56
+ assert mock_contract.functions.livenessPeriod.return_value.call.call_count == 1
57
+
58
+ def test_contract_cache_singleton(mock_chain_interface):
59
+ """Verify ContractCache returns same instance and reuses property cache."""
60
+ mock_interface, mock_contract = mock_chain_interface
61
+ ContractCache().clear()
62
+
63
+ c1 = ContractCache().get_contract(StakingContract, "0xABC", "gnosis")
64
+ c2 = ContractCache().get_contract(StakingContract, "0xabc", "gnosis") # Check ignore case
65
+
66
+ assert c1 is c2
67
+
68
+ # populate cache on c1
69
+ mock_contract.functions.maxNumServices.return_value.call.return_value = 500
70
+
71
+ val1 = c1.max_num_services
72
+ assert val1 == 500
73
+ assert mock_contract.functions.maxNumServices.return_value.call.call_count == 1
74
+
75
+ # access on c2
76
+ val2 = c2.max_num_services
77
+ assert val2 == 500
78
+ # Call count should NOT increase
79
+ assert mock_contract.functions.maxNumServices.return_value.call.call_count == 1
80
+
81
+ def test_epoch_aware_caching(mock_chain_interface):
82
+ """Verify ts_checkpoint caching logic."""
83
+ mock_interface, mock_contract = mock_chain_interface
84
+ ContractCache().clear()
85
+ contract = StakingContract(address="0xEpoch", chain_name="gnosis")
86
+
87
+ # Mock return values for tsCheckpoint
88
+ # We use side_effect on the call() method to simulate changing return values if needed
89
+ # But here we just want it to return 1000 once
90
+ mock_contract.functions.tsCheckpoint.return_value.call.return_value = 1000
91
+
92
+ # Set liveness period in cache to avoid RPC call for it
93
+ contract._contract_params_cache["livenessPeriod"] = 600
94
+
95
+ # 1. Fetch ts_checkpoint
96
+ ts = contract.ts_checkpoint()
97
+ assert ts == 1000
98
+ assert mock_contract.functions.tsCheckpoint.return_value.call.call_count == 1
99
+
100
+ # 2. Call again - should be cached
101
+ ts2 = contract.ts_checkpoint()
102
+ assert ts2 == 1000
103
+ assert mock_contract.functions.tsCheckpoint.return_value.call.call_count == 1
File without changes