defi-state-querier 0.2.7__py3-none-any.whl → 0.2.8__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 +1 -1
- defi_services/jobs/processors/state_processor.py +4 -4
- defi_services/services/lending/justlend_service.py +20 -0
- {defi_state_querier-0.2.7.dist-info → defi_state_querier-0.2.8.dist-info}/METADATA +1 -1
- {defi_state_querier-0.2.7.dist-info → defi_state_querier-0.2.8.dist-info}/RECORD +8 -8
- {defi_state_querier-0.2.7.dist-info → defi_state_querier-0.2.8.dist-info}/LICENSE +0 -0
- {defi_state_querier-0.2.7.dist-info → defi_state_querier-0.2.8.dist-info}/WHEEL +0 -0
- {defi_state_querier-0.2.7.dist-info → defi_state_querier-0.2.8.dist-info}/top_level.txt +0 -0
defi_services/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.2.
|
1
|
+
__version__ = "0.2.8"
|
@@ -117,8 +117,8 @@ class StateProcessor:
|
|
117
117
|
def run(self, address: str, queries: list, block_number: int = 'latest',
|
118
118
|
batch_size: int = 100, max_workers: int = 8, ignore_error=False, token_prices=None):
|
119
119
|
wallet = address
|
120
|
-
if self.chain_id == Chain.tron and not self.check_address(address):
|
121
|
-
|
120
|
+
# if self.chain_id == Chain.tron and not self.check_address(address):
|
121
|
+
# wallet = base58_to_hex(address)
|
122
122
|
if token_prices is None:
|
123
123
|
token_prices = {}
|
124
124
|
all_rpc_calls = {}
|
@@ -145,7 +145,7 @@ class StateProcessor:
|
|
145
145
|
token_prices=token_prices, reserve_info=reserves_list)
|
146
146
|
result.append(processed_data)
|
147
147
|
|
148
|
-
if self.chain_id == Chain.tron:
|
149
|
-
|
148
|
+
# if self.chain_id == Chain.tron:
|
149
|
+
# result = convert_address_dict(result)
|
150
150
|
|
151
151
|
return result
|
@@ -63,3 +63,23 @@ class JustLendStateService(CompoundStateService):
|
|
63
63
|
reserves_info[underlying] = {'cToken': token.lower()}
|
64
64
|
return reserves_info
|
65
65
|
|
66
|
+
# REWARDS BALANCE
|
67
|
+
def get_rewards_balance_function_info(
|
68
|
+
self,
|
69
|
+
wallets: str,
|
70
|
+
reserves_info: dict = None,
|
71
|
+
block_number: int = "latest",
|
72
|
+
):
|
73
|
+
rpc_call = self.get_comptroller_function_info("compAccrued", [wallets], block_number)
|
74
|
+
get_reward_id = f"compAccrued_{self.name}_{wallets}_{block_number}".lower()
|
75
|
+
return {get_reward_id: rpc_call}
|
76
|
+
|
77
|
+
def calculate_rewards_balance(self, decoded_data: dict, wallets: str,
|
78
|
+
block_number: int = "latest"):
|
79
|
+
get_reward_id = f"compAccrued_{self.name}_{wallets}_{block_number}".lower()
|
80
|
+
rewards = decoded_data.get(get_reward_id) / 10 ** 18
|
81
|
+
reward_token = self.pool_info.get("rewardToken")
|
82
|
+
result = {
|
83
|
+
reward_token: {"amount": rewards}
|
84
|
+
}
|
85
|
+
return result
|
@@ -1,4 +1,4 @@
|
|
1
|
-
defi_services/__init__.py,sha256=
|
1
|
+
defi_services/__init__.py,sha256=G6Dbxq2ws-1ZAXwDD8q0KWueYtso_Y6Uyvtj8sRWsPI,22
|
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
|
@@ -113,7 +113,7 @@ defi_services/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
113
113
|
defi_services/jobs/processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
114
114
|
defi_services/jobs/processors/multi_state_processor.py,sha256=20pYx-vpOvJwYNM4NvRrc149V4DM_RZGhJ6EQDQ0oJw,4749
|
115
115
|
defi_services/jobs/processors/solana_state_processor.py,sha256=Nf8IRFfs3KdRFXY_ziOnwQpthJJUE-bpZhsxdql31Ko,3973
|
116
|
-
defi_services/jobs/processors/state_processor.py,sha256=
|
116
|
+
defi_services/jobs/processors/state_processor.py,sha256=fZEA5bAuMgxj1QYpWOszOKxJIJ6APfc9LY-oopXDAQc,6455
|
117
117
|
defi_services/jobs/processors/substrate_state_processor.py,sha256=LFKFYdAzarZ_uBKaYSelPg6cppy5ovFP2UI3gAcG7zY,3639
|
118
118
|
defi_services/jobs/queriers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
119
119
|
defi_services/jobs/queriers/solana_state_querier.py,sha256=TQELYo6GUoF8s-LfetqYbclNaH8bakQqC7y2ifACIb8,3239
|
@@ -136,7 +136,7 @@ defi_services/services/lending/flux_services.py,sha256=cRxZFxaH8PZE5tabY4CLZlQVH
|
|
136
136
|
defi_services/services/lending/geist_services.py,sha256=UI5D-MbMqplrt7D4krSFdpaREKOT81k8boD_XhGGpUQ,1035
|
137
137
|
defi_services/services/lending/granary_services.py,sha256=PnQYXw44gWUi9CHEDas7e9bBTmEddgejJt1gES1Q7kc,12301
|
138
138
|
defi_services/services/lending/iron_bank_service.py,sha256=6Wis93qxyyadc-HWlKEgeAGsPZhsr_3_yNt1IUOHNzo,14294
|
139
|
-
defi_services/services/lending/justlend_service.py,sha256=
|
139
|
+
defi_services/services/lending/justlend_service.py,sha256=WRnRZO1lmou0cfT4TdguYFu1ryAZc_ALfBIgSyBN9HM,3247
|
140
140
|
defi_services/services/lending/liqee_service.py,sha256=mNPQ-bx_aoQ3oT9Hm3YM0bkYZnykudlQ36PfGCmSLag,13520
|
141
141
|
defi_services/services/lending/morpho_aave_v2_services.py,sha256=Lq3PYLDhKNRTIX6zL6faw5Shlq4HBhslqdj6A-oL13g,3896
|
142
142
|
defi_services/services/lending/morpho_aave_v3_services.py,sha256=yS0dcibfOmKWDrWxbVkJSEVBxrMLa0ZS-XwTm84mFhk,7123
|
@@ -217,8 +217,8 @@ defi_services/utils/logger_utils.py,sha256=KxDlmaK9aoMOI1gdroRYjMm383myvFiWqW0iK
|
|
217
217
|
defi_services/utils/market_service.py,sha256=imPtPHBkpEx5JnhqeIWYqbCjsIEm8IKBYHNEy6rKjdU,723
|
218
218
|
defi_services/utils/memory_storage.py,sha256=BOT8laB0iVSCGE-oDlpWJQLbSC6X2blKX4zuQbs4inc,851
|
219
219
|
defi_services/utils/thread_proxy.py,sha256=5Z8biAyEReUkh3vfJSvEv7GwMe3CsE5M8CbghkQtePw,2951
|
220
|
-
defi_state_querier-0.2.
|
221
|
-
defi_state_querier-0.2.
|
222
|
-
defi_state_querier-0.2.
|
223
|
-
defi_state_querier-0.2.
|
224
|
-
defi_state_querier-0.2.
|
220
|
+
defi_state_querier-0.2.8.dist-info/LICENSE,sha256=6jmfxa8nUIwfKnzZUxAHJSJ_IS7h7mpbJq26cWjoo-o,1063
|
221
|
+
defi_state_querier-0.2.8.dist-info/METADATA,sha256=KRH7YkElpYceF1bnYAElqWKhFcB_D5mS_mCb_oNjB-o,3932
|
222
|
+
defi_state_querier-0.2.8.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
223
|
+
defi_state_querier-0.2.8.dist-info/top_level.txt,sha256=C-OTxHK6MknKK-nAbEzCPDUl1M6pktRhgJrmsozdf6g,14
|
224
|
+
defi_state_querier-0.2.8.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|