defi-state-querier 0.4.29__py3-none-any.whl → 0.4.30__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.
defi_services/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.4.29"
1
+ __version__ = "0.4.30"
@@ -2,9 +2,8 @@ import logging
2
2
 
3
3
  from query_state_lib.base.mappers.eth_call_mapper import EthCall
4
4
  from query_state_lib.base.mappers.get_balance_mapper import GetBalance
5
- from query_state_lib.base.utils.encoder import encode_eth_call_data
6
5
  from query_state_lib.client.client_querier import ClientQuerier
7
- from web3 import Web3
6
+ from web3 import Web3, contract
8
7
  from web3.middleware import geth_poa_middleware
9
8
 
10
9
  from defi_services.constants.query_constant import Query
@@ -124,7 +123,11 @@ class StateQuerier:
124
123
  item = self._w3.to_checksum_address(item)
125
124
  args.append(item)
126
125
 
127
- data_call = encode_eth_call_data(abi=abi, fn_name=fn_name, args=args)
126
+ c = contract.Contract
127
+ c.w3 = self._w3
128
+ c.abi = abi
129
+ data_call = c.encodeABI(fn_name=fn_name, args=args)
130
+ # data_call = encode_eth_call_data(abi=abi, fn_name=fn_name, args=args)
128
131
  eth_call = EthCall(to=self._w3.to_checksum_address(contract_address), block_number=block_number,
129
132
  data=data_call, abi=abi, fn_name=fn_name, id=call_id)
130
133
  return eth_call
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: defi-state-querier
3
- Version: 0.4.29
3
+ Version: 0.4.30
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=LtSKwkqgueDQK6uLnhs8HgKylJHH36EMo48UDeHgv2Y,23
1
+ defi_services/__init__.py,sha256=oJL8XtG8mmnvRfpE8L0X7P-SyENhGR162XgumWN6O4A,23
2
2
  defi_services/abis/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  defi_services/abis/dex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  defi_services/abis/dex/biswap/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -317,7 +317,7 @@ defi_services/jobs/processors/state_processor.py,sha256=Ze_5isU_l_APB262E-VV_4KZ
317
317
  defi_services/jobs/processors/substrate_state_processor.py,sha256=KkiY1NkaxnizNJBTfn4twB-zuQo3fT3akOlbie8VF5g,3940
318
318
  defi_services/jobs/queriers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
319
319
  defi_services/jobs/queriers/solana_state_querier.py,sha256=TQELYo6GUoF8s-LfetqYbclNaH8bakQqC7y2ifACIb8,3239
320
- defi_services/jobs/queriers/state_querier.py,sha256=-bx71x2ZobwuAlc2pVp5Ju_fxYt48wLrs8IdLN1KJVs,7306
320
+ defi_services/jobs/queriers/state_querier.py,sha256=q7cAW395urZjcWTpqw8m_nDunLyyTuAXJ3DRx_1HOxo,7384
321
321
  defi_services/jobs/queriers/substrate_state_querier.py,sha256=_T0Dk06sP_uBKaxgj2J_EBtJDoq-hi8jU7Np4iuO0LA,3858
322
322
  defi_services/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
323
323
  defi_services/services/cosmos_token_services.py,sha256=6z_eE7lF5tY461VJ6uVoG18hOdXKeWR4NgDDP-MGI0k,1603
@@ -452,8 +452,8 @@ defi_services/utils/market_service.py,sha256=imPtPHBkpEx5JnhqeIWYqbCjsIEm8IKBYHN
452
452
  defi_services/utils/memory_storage.py,sha256=BOT8laB0iVSCGE-oDlpWJQLbSC6X2blKX4zuQbs4inc,851
453
453
  defi_services/utils/sqrt_price_math.py,sha256=9lgUeWFT4wjl3Vq3b7-jZ2bGvvZx7dDBSfVnM3lsZ8o,5575
454
454
  defi_services/utils/thread_proxy.py,sha256=5Z8biAyEReUkh3vfJSvEv7GwMe3CsE5M8CbghkQtePw,2951
455
- defi_state_querier-0.4.29.dist-info/LICENSE,sha256=6jmfxa8nUIwfKnzZUxAHJSJ_IS7h7mpbJq26cWjoo-o,1063
456
- defi_state_querier-0.4.29.dist-info/METADATA,sha256=g77_aICw-H-02oRz1njjw6NjNphiU_-p-IpgK8C9tdA,4388
457
- defi_state_querier-0.4.29.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
458
- defi_state_querier-0.4.29.dist-info/top_level.txt,sha256=C-OTxHK6MknKK-nAbEzCPDUl1M6pktRhgJrmsozdf6g,14
459
- defi_state_querier-0.4.29.dist-info/RECORD,,
455
+ defi_state_querier-0.4.30.dist-info/LICENSE,sha256=6jmfxa8nUIwfKnzZUxAHJSJ_IS7h7mpbJq26cWjoo-o,1063
456
+ defi_state_querier-0.4.30.dist-info/METADATA,sha256=9gw44vjCnsAPTaMyK6PNHXp9WKHXuOtnvVGCN2zWtrs,4388
457
+ defi_state_querier-0.4.30.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
458
+ defi_state_querier-0.4.30.dist-info/top_level.txt,sha256=C-OTxHK6MknKK-nAbEzCPDUl1M6pktRhgJrmsozdf6g,14
459
+ defi_state_querier-0.4.30.dist-info/RECORD,,