defi-state-querier 0.5.0__py3-none-any.whl → 0.5.1__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
defi_services/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.5.0"
1
+ __version__ = "0.5.1"
@@ -0,0 +1,12 @@
1
+ import logging
2
+
3
+ from defi_services.jobs.processors.state_processor import StateProcessor
4
+ from defi_services.jobs.queriers.call_state_querier import CallStateQuerier
5
+
6
+ logger = logging.getLogger("CallStateProcessor")
7
+
8
+
9
+ class CallStateProcessor(StateProcessor):
10
+ def __init__(self, provider_uri: str, chain_id: str):
11
+ super().__init__(provider_uri, chain_id)
12
+ self.state_querier = CallStateQuerier(provider_uri, chain_id)
@@ -0,0 +1,12 @@
1
+ import logging
2
+
3
+ from defi_services.jobs.processors.multi_state_processor import MultiStateProcessor
4
+ from defi_services.jobs.queriers.call_state_querier import CallStateQuerier
5
+
6
+ logger = logging.getLogger("MultiCallStateProcessor")
7
+
8
+
9
+ class MultiCallStateProcessor(MultiStateProcessor):
10
+ def __init__(self, provider_uri: str, chain_id: str):
11
+ super().__init__(provider_uri, chain_id)
12
+ self.state_querier = CallStateQuerier(provider_uri, chain_id)
@@ -10,7 +10,7 @@ from defi_services.services.protocol_services import ProtocolServices
10
10
  from defi_services.services.token_services import TokenServices
11
11
  from defi_services.utils.init_services import init_services
12
12
 
13
- logger = logging.getLogger("StateProcessor")
13
+ logger = logging.getLogger("MultiStateProcessor")
14
14
 
15
15
 
16
16
  class MultiStateProcessor:
@@ -11,10 +11,10 @@ from defi_services.services.multicall.batch_queries_service import decode_data_r
11
11
  decode_data_response
12
12
  from defi_services.services.multicall.multicall_v2 import W3Multicall, add_rpc_multicall
13
13
 
14
- logger = logging.getLogger("MulticallStateQuerier")
14
+ logger = logging.getLogger("CallStateQuerier")
15
15
 
16
16
 
17
- class MulticallStateQuerier(StateQuerier):
17
+ class CallStateQuerier(StateQuerier):
18
18
  def __init__(self, provider_uri, chain_id):
19
19
  super().__init__(provider_uri)
20
20
  self.chain_id = chain_id
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: defi-state-querier
3
- Version: 0.5.0
3
+ Version: 0.5.1
4
4
  Summary: Calculate apy, apr, and wallet information,... in decentralized applications.
5
5
  Home-page: https://github.com/Centic-io/defi-state-querier
6
6
  Author: Viet-Bang Pham
@@ -1,4 +1,4 @@
1
- defi_services/__init__.py,sha256=LBK46heutvn3KmsCrKIYu8RQikbfnjZaj2xFrXaeCzQ,22
1
+ defi_services/__init__.py,sha256=eZ1bOun1DDVV0YLOBW4wj2FP1ajReLjbIrGmzN7ASBw,22
2
2
  defi_services/abis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  defi_services/abis/multicall_v3_abi.py,sha256=0aPxjrJJFU17fODjvYFRDn5Y5J1yi_AJKc8v1uohNGY,12352
4
4
  defi_services/abis/dex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -312,14 +312,15 @@ defi_services/constants/entities/vault_constant.py,sha256=IGGd4--T-BQcm8mlU8XAJ_
312
312
  defi_services/constants/entities/vault_services.py,sha256=IMmQc15wS1KA7EuQqM_AraQtCthnZ7hoNee0E_DOyw8,567
313
313
  defi_services/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
314
314
  defi_services/jobs/processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
315
+ defi_services/jobs/processors/call_state_processor.py,sha256=LTWnDHJMHGvEMK6gpaQokCkJMDHi7hIA799RgIBUhb0,435
315
316
  defi_services/jobs/processors/cosmos_state_processor.py,sha256=2S5fhqHQ4pUtRaLnbFJNUo4jKc5MHq7HA-0FHebOJyo,1334
316
- defi_services/jobs/processors/multi_state_processor.py,sha256=W-5qLwIFj4kfx0V2Tj7eg0mjrRb3jyPdxEBB2TBxbW4,5726
317
- defi_services/jobs/processors/multicall_state_processor.py,sha256=BDM7vI86wXt7drmJtRwE8mcclTsANs1k4lX61XDhqbk,636
317
+ defi_services/jobs/processors/multi_call_state_processor.py,sha256=AksswGMSyStbnvkQcBVb0Y2tdpkUgc1CWoeSiMpGy8U,462
318
+ defi_services/jobs/processors/multi_state_processor.py,sha256=Od7Y8zPz7xj0L-_0YuK4wg_94fX8Q1PquuKUUYteIJU,5731
318
319
  defi_services/jobs/processors/solana_state_processor.py,sha256=szsBYrkEV8kBzuA_iaSVescnwKJ2MHoTbut5kORbWTs,4065
319
320
  defi_services/jobs/processors/state_processor.py,sha256=Ze_5isU_l_APB262E-VV_4KZwEG6W0XE6PikJZIcAoM,7291
320
321
  defi_services/jobs/processors/substrate_state_processor.py,sha256=KkiY1NkaxnizNJBTfn4twB-zuQo3fT3akOlbie8VF5g,3940
321
322
  defi_services/jobs/queriers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
322
- defi_services/jobs/queriers/multicall_state_querier.py,sha256=QP0qlwQijbad_joA7efPGjewVU7Z-2x-XIQrttx6ID4,4789
323
+ defi_services/jobs/queriers/call_state_querier.py,sha256=xbprHHL3BHMTsYEwaxjAZkueFfQIbcxtMoGqDBOsm4A,4779
323
324
  defi_services/jobs/queriers/solana_state_querier.py,sha256=TQELYo6GUoF8s-LfetqYbclNaH8bakQqC7y2ifACIb8,3239
324
325
  defi_services/jobs/queriers/state_querier.py,sha256=q7cAW395urZjcWTpqw8m_nDunLyyTuAXJ3DRx_1HOxo,7384
325
326
  defi_services/jobs/queriers/substrate_state_querier.py,sha256=_T0Dk06sP_uBKaxgj2J_EBtJDoq-hi8jU7Np4iuO0LA,3858
@@ -463,8 +464,8 @@ defi_services/utils/market_service.py,sha256=imPtPHBkpEx5JnhqeIWYqbCjsIEm8IKBYHN
463
464
  defi_services/utils/memory_storage.py,sha256=BOT8laB0iVSCGE-oDlpWJQLbSC6X2blKX4zuQbs4inc,851
464
465
  defi_services/utils/sqrt_price_math.py,sha256=9lgUeWFT4wjl3Vq3b7-jZ2bGvvZx7dDBSfVnM3lsZ8o,5575
465
466
  defi_services/utils/thread_proxy.py,sha256=5Z8biAyEReUkh3vfJSvEv7GwMe3CsE5M8CbghkQtePw,2951
466
- defi_state_querier-0.5.0.dist-info/LICENSE,sha256=6jmfxa8nUIwfKnzZUxAHJSJ_IS7h7mpbJq26cWjoo-o,1063
467
- defi_state_querier-0.5.0.dist-info/METADATA,sha256=wQPFZHEEnKa0PO4-dOTkfqgUqj-SEEJnJtJn5D8PEnc,4387
468
- defi_state_querier-0.5.0.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
469
- defi_state_querier-0.5.0.dist-info/top_level.txt,sha256=C-OTxHK6MknKK-nAbEzCPDUl1M6pktRhgJrmsozdf6g,14
470
- defi_state_querier-0.5.0.dist-info/RECORD,,
467
+ defi_state_querier-0.5.1.dist-info/LICENSE,sha256=6jmfxa8nUIwfKnzZUxAHJSJ_IS7h7mpbJq26cWjoo-o,1063
468
+ defi_state_querier-0.5.1.dist-info/METADATA,sha256=My_FdzcFMNe0h84UFQbTuxIdVPLKrCtl65fCeMr7ohc,4387
469
+ defi_state_querier-0.5.1.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
470
+ defi_state_querier-0.5.1.dist-info/top_level.txt,sha256=C-OTxHK6MknKK-nAbEzCPDUl1M6pktRhgJrmsozdf6g,14
471
+ defi_state_querier-0.5.1.dist-info/RECORD,,
@@ -1,15 +0,0 @@
1
- import logging
2
-
3
- from defi_services.constants.chain_constant import Chain
4
- from defi_services.constants.query_constant import Query
5
- from defi_services.jobs.processors.state_processor import StateProcessor
6
- from defi_services.jobs.queriers.multicall_state_querier import MulticallStateQuerier
7
- from defi_services.utils.convert_address import base58_to_hex
8
-
9
- logger = logging.getLogger("MulticallStateProcessor")
10
-
11
-
12
- class MulticallStateProcessor(StateProcessor):
13
- def __init__(self, provider_uri: str, chain_id: str):
14
- super().__init__(provider_uri, chain_id)
15
- self.state_querier = MulticallStateQuerier(provider_uri, chain_id)