defi-state-querier 0.5.6__py3-none-any.whl → 0.5.7__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.5.6"
1
+ __version__ = "0.5.7"
@@ -28,6 +28,8 @@ class Chain:
28
28
  okc = '0x42'
29
29
  aurora = '0x4e454152'
30
30
  moonriver = '0x505'
31
+ blast = '0xee'
32
+ oasis_sapphire = '0x5afe'
31
33
 
32
34
  native_decimals = {
33
35
  tron: 6,
@@ -43,7 +43,9 @@ class Token:
43
43
  Chain.linea: '0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f',
44
44
  Chain.okc: '0x8f8526dbfd6e38e3d8307702ca8469bae6c56c15',
45
45
  Chain.aurora: '0xc9bdeed33cd01541e1eed10f90519d2c06fe3feb',
46
- Chain.moonriver: '0x98878b06940ae243284ca214f92bb71a2b032b8a'
46
+ Chain.moonriver: '0x98878b06940ae243284ca214f92bb71a2b032b8a',
47
+ Chain.blast: '0x4300000000000000000000000000000000000004',
48
+ Chain.oasis_sapphire: '0x8bc2b030b299964eefb5e1e0b36991352e56d2d3'
47
49
  }
48
50
 
49
51
 
@@ -61,5 +61,10 @@ class TokenServices:
61
61
  decimals_token = token
62
62
  if token == Token.native_token:
63
63
  decimals_token = Token.wrapped_token.get(self.chain_id)
64
+
65
+ # Ignore decimals of missing native's wrapped token
66
+ if not decimals_token:
67
+ return {}
68
+
64
69
  key = f"decimals_{token}_{block_number}".lower()
65
70
  return {key: self.state_service.get_function_info(decimals_token, ERC20_ABI, "decimals", [], block_number)}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: defi-state-querier
3
- Version: 0.5.6
3
+ Version: 0.5.7
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=CMH34Gt1AqO7z_TqRj94XwohGoVCf8aes0djkqm45mk,22
1
+ defi_services/__init__.py,sha256=KiyyYbyEe0O858kmiWcg1RdmqGUYtk_JqRmc3_Ev2Q8,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
@@ -294,14 +294,14 @@ defi_services/abis/vault/lido/lido_withdrawl_queue.py,sha256=qKdsXQLKlNU3a_Nk68q
294
294
  defi_services/abis/vault/lido/lido_wsteth.py,sha256=DJhMToJS43vV2r5WP2kZSiagt7R8MtKFT8u1xJBjZKU,8780
295
295
  defi_services/abis/vault/lido/lidor_accounting_oracle_hash_consensus.py,sha256=TWCLaccDgvWJZZKLAeoznYgGi3g3M_hFqoo3KE_L7K8,21039
296
296
  defi_services/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
297
- defi_services/constants/chain_constant.py,sha256=aU7xLaQYLro-7sI5Jpyi0tEHhEQcchyxlxEEJaotFMM,1018
297
+ defi_services/constants/chain_constant.py,sha256=llTCq697jtt64a_6QRxZK71Q3SMeoIyOY8RJXw5i5s8,1067
298
298
  defi_services/constants/cosmos_decimals_constant.py,sha256=SjFkFbkvxVAk0jtok_1EaBh69ZE8S1fFAbVn6bdJO4s,13635
299
299
  defi_services/constants/db_constant.py,sha256=gDMFFjhPOgQHuS9sPOTFbsfSdIfdWQEE4tGlxHQhNsE,2566
300
300
  defi_services/constants/mongo_constant.py,sha256=qsDIq2Gg5MkBGaEOh4Fd9y6fOOidF4gGPnQwtaPon3E,398
301
301
  defi_services/constants/network_constants.py,sha256=aCUhPFOA9oAMXrIrw67wfEvc4B3HcTlCCz9U1Ku4o50,13574
302
302
  defi_services/constants/query_constant.py,sha256=6HSK5IToUQpKLqmTeCgKf0npwmog7GWFUmQpz_mbkgY,1088
303
303
  defi_services/constants/time_constant.py,sha256=bC-0pYnfIFFR_0iVvkxhfyHfOclWNw9O3DbdO_nh258,181
304
- defi_services/constants/token_constant.py,sha256=4iDWis589XF4_OIcBOqA7_qIfCde-nV6fDaV__5c2D4,4822
304
+ defi_services/constants/token_constant.py,sha256=dGO_i-L_LLx4mSA0wIG4FoaL-OWOAd5bp6k7VucUjUQ,4965
305
305
  defi_services/constants/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
306
306
  defi_services/constants/entities/dex_constant.py,sha256=oCt8RS-0KjFW5zR5IU1Ys49nYCCAraY8pTivOpXoyvs,343
307
307
  defi_services/constants/entities/dex_info_constant.py,sha256=6sLHxCmRz_6HW8WRe27FkOS-FGR-zC354iCTcEIjp78,1604
@@ -331,7 +331,7 @@ defi_services/services/nft_services.py,sha256=vKva0OJQTTxgP1lrZ5ij2sw2N44JxN5dfL
331
331
  defi_services/services/protocol_services.py,sha256=3Yca433xGXowcV4EjFoQ90AJHg-SfuOBsDF7aMCJ8Zk,7626
332
332
  defi_services/services/solana_token_services.py,sha256=NQKUHGMBe9eQciOaY3N20rPbIuNz108akrysX-mXfJU,1865
333
333
  defi_services/services/substrate_token_services.py,sha256=HsjceBHo0fxQIcXgDaV0OBANLuggRwXAEPt7ASB0BKk,2904
334
- defi_services/services/token_services.py,sha256=t6eJYemNyiG_4TObjKnQOz8MmSqXBKjsC0A3fPBeDuM,2800
334
+ defi_services/services/token_services.py,sha256=vISaOgwHsokpwWENGshRssvq2xuCVeL5gtr20SSYX78,2927
335
335
  defi_services/services/dex/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
336
336
  defi_services/services/dex/pancakeswap_service.py,sha256=cN_L7897l8dh7DnNuHo6fcnYa-JLHI7yLLzBW1C9RlI,4637
337
337
  defi_services/services/dex/pancakeswap_v2_service.py,sha256=ppRruxXHKeY3BQY5DxBQoNDjNIc6kqo3Wjgd6mO9CcA,13098
@@ -464,8 +464,8 @@ defi_services/utils/market_service.py,sha256=imPtPHBkpEx5JnhqeIWYqbCjsIEm8IKBYHN
464
464
  defi_services/utils/memory_storage.py,sha256=BOT8laB0iVSCGE-oDlpWJQLbSC6X2blKX4zuQbs4inc,851
465
465
  defi_services/utils/sqrt_price_math.py,sha256=9lgUeWFT4wjl3Vq3b7-jZ2bGvvZx7dDBSfVnM3lsZ8o,5575
466
466
  defi_services/utils/thread_proxy.py,sha256=5Z8biAyEReUkh3vfJSvEv7GwMe3CsE5M8CbghkQtePw,2951
467
- defi_state_querier-0.5.6.dist-info/LICENSE,sha256=6jmfxa8nUIwfKnzZUxAHJSJ_IS7h7mpbJq26cWjoo-o,1063
468
- defi_state_querier-0.5.6.dist-info/METADATA,sha256=jksOD0A7CWoHH9ykENU3VhLBGav0P_DA5MWriPxQ74o,4417
469
- defi_state_querier-0.5.6.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
470
- defi_state_querier-0.5.6.dist-info/top_level.txt,sha256=C-OTxHK6MknKK-nAbEzCPDUl1M6pktRhgJrmsozdf6g,14
471
- defi_state_querier-0.5.6.dist-info/RECORD,,
467
+ defi_state_querier-0.5.7.dist-info/LICENSE,sha256=6jmfxa8nUIwfKnzZUxAHJSJ_IS7h7mpbJq26cWjoo-o,1063
468
+ defi_state_querier-0.5.7.dist-info/METADATA,sha256=2jNWm8RrkBwLUcc5rH05G4bzi4I98wrRKdKw6dyAttw,4417
469
+ defi_state_querier-0.5.7.dist-info/WHEEL,sha256=y4mX-SOX4fYIkonsAGA5N0Oy-8_gI4FXw5HNI1xqvWg,91
470
+ defi_state_querier-0.5.7.dist-info/top_level.txt,sha256=C-OTxHK6MknKK-nAbEzCPDUl1M6pktRhgJrmsozdf6g,14
471
+ defi_state_querier-0.5.7.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (70.1.1)
2
+ Generator: setuptools (70.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5