defi-state-querier 0.0.6__py3-none-any.whl → 0.0.9__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/abis/lending/morpho/__init__.py +0 -0
- defi_services/abis/lending/morpho/morpho_aave_v2_comptroller_abi.py +2301 -0
- defi_services/abis/lending/morpho/morpho_aave_v2_lens_abi.py +1208 -0
- defi_services/abis/lending/morpho/morpho_aave_v3_comptroller_abi.py +2994 -0
- defi_services/abis/lending/morpho/morpho_compound_comptroller_abi.py +2301 -0
- defi_services/abis/lending/morpho/morpho_compound_lens_abi.py +1402 -0
- defi_services/abis/lending/morpho/morpho_compound_reward_manager_abi.py +307 -0
- defi_services/abis/lending/radiant_v2/__init__.py +0 -0
- defi_services/abis/lending/radiant_v2/radiant_v2_incentive_abi.py +1016 -0
- defi_services/abis/lending/wepiggy/__init__.py +0 -0
- defi_services/abis/lending/wepiggy/wepiggy_distribution_abi.py +1047 -0
- defi_services/constants/chain_constant.py +1 -0
- defi_services/constants/entities/lending_constant.py +26 -0
- defi_services/constants/entities/lending_services.py +85 -0
- defi_services/constants/query_constant.py +1 -0
- defi_services/constants/token_constant.py +2 -0
- defi_services/jobs/processors/__init__.py +0 -0
- defi_services/jobs/processors/solana_state_processor.py +101 -0
- defi_services/jobs/{state_processor.py → processors/state_processor.py} +9 -4
- defi_services/jobs/processors/substrate_state_processor.py +97 -0
- defi_services/jobs/queriers/__init__.py +0 -0
- defi_services/jobs/queriers/solana_state_querier.py +83 -0
- defi_services/jobs/{state_querier.py → queriers/state_querier.py} +3 -2
- defi_services/jobs/queriers/substrate_state_querier.py +84 -0
- defi_services/services/lending/aave_v2_services.py +8 -7
- defi_services/services/lending/aave_v3_services.py +12 -9
- defi_services/services/lending/compound_service.py +29 -10
- defi_services/services/lending/cream_services.py +5 -4
- defi_services/services/lending/flux_services.py +34 -27
- defi_services/services/lending/geist_services.py +4 -3
- defi_services/services/lending/granary_v1_services.py +6 -7
- defi_services/services/lending/iron_bank_service.py +20 -13
- defi_services/services/lending/lending_info/aave_v2_services.py +2 -2
- defi_services/services/lending/lending_info/ethereum/morpho_aave_v2_eth.py +53 -0
- defi_services/services/lending/lending_info/ethereum/morpho_aave_v3_eth.py +51 -0
- defi_services/services/lending/lending_info/ethereum/morpho_compound_eth.py +44 -0
- defi_services/services/lending/lending_info/ethereum/wepiggy_eth.py +41 -0
- defi_services/services/lending/liqee_service.py +5 -26
- defi_services/services/lending/morpho_aave_v2_services.py +89 -0
- defi_services/services/lending/morpho_aave_v3_services.py +159 -0
- defi_services/services/lending/morpho_compound_services.py +233 -0
- defi_services/services/lending/onyx_service.py +32 -13
- defi_services/services/lending/radiant_v2_services.py +30 -3
- defi_services/services/lending/strike_service.py +29 -10
- defi_services/services/lending/trava_services.py +8 -7
- defi_services/services/lending/uwu_services.py +8 -7
- defi_services/services/lending/valas_services.py +6 -5
- defi_services/services/lending/venus_services.py +28 -8
- defi_services/services/lending/wepiggy_services.py +519 -0
- defi_services/services/nft_services.py +1 -1
- defi_services/services/solana_token_services.py +46 -0
- defi_services/services/substrate_token_services.py +70 -0
- defi_services/services/token_services.py +1 -3
- defi_services/utils/init_services.py +3 -3
- {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/METADATA +3 -3
- {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/RECORD +60 -32
- defi_services/constants/entities/lending.py +0 -97
- {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/LICENSE +0 -0
- {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/WHEEL +0 -0
- {defi_state_querier-0.0.6.dist-info → defi_state_querier-0.0.9.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,46 @@
|
|
1
|
+
from defi_services.constants.token_constant import Token
|
2
|
+
from defi_services.jobs.queriers.solana_state_querier import SolanaStateQuerier
|
3
|
+
|
4
|
+
|
5
|
+
class SolanaTokenServices:
|
6
|
+
def __init__(self, state_service: SolanaStateQuerier, chain_id: str = "solana"):
|
7
|
+
self.chain_id = chain_id
|
8
|
+
self.state_service = state_service
|
9
|
+
|
10
|
+
def get_service_info(self):
|
11
|
+
info = {
|
12
|
+
"token": {
|
13
|
+
"chain_id": self.chain_id,
|
14
|
+
"type": "token"
|
15
|
+
}
|
16
|
+
}
|
17
|
+
return info
|
18
|
+
|
19
|
+
def get_function_info(self, wallet: str, token: str):
|
20
|
+
result = self.get_function_balance_info(wallet, token)
|
21
|
+
return result
|
22
|
+
|
23
|
+
def get_function_balance_info(self, wallet, token):
|
24
|
+
key = f"balanceOf_{wallet}_{token}".lower()
|
25
|
+
if token == Token.native_token:
|
26
|
+
params = [wallet]
|
27
|
+
rpc_call = self.state_service.get_function_info('getBalance', params)
|
28
|
+
else:
|
29
|
+
params = [wallet, {"mint": token}, {"encoding": "jsonParsed"}]
|
30
|
+
rpc_call = self.state_service.get_function_info("getTokenAccountsByOwner", params)
|
31
|
+
return {key: rpc_call}
|
32
|
+
|
33
|
+
@staticmethod
|
34
|
+
def get_data(wallet, token, decoded_data, token_prices):
|
35
|
+
key = f"balanceOf_{wallet}_{token}".lower()
|
36
|
+
data = decoded_data.get(key)
|
37
|
+
token_price = token_prices.get(token, 1)
|
38
|
+
if token == Token.native_token:
|
39
|
+
balance = data.get("value", 0) * token_price / 10**9
|
40
|
+
return balance
|
41
|
+
balance = 0
|
42
|
+
for item in data.get('value'):
|
43
|
+
balance_info = item.get('account', {}).get('data', {}).get('parsed').get('info').get('tokenAmount')
|
44
|
+
balance += balance_info.get("uiAmount", 0) * token_price
|
45
|
+
|
46
|
+
return balance
|
@@ -0,0 +1,70 @@
|
|
1
|
+
from defi_services.constants.token_constant import Token
|
2
|
+
from defi_services.jobs.queriers.substrate_state_querier import SubstrateStateQuerier
|
3
|
+
|
4
|
+
|
5
|
+
class SubstrateTokenServices:
|
6
|
+
def __init__(self, state_service: SubstrateStateQuerier, chain_id: str = "polkadot"):
|
7
|
+
self.chain_id = chain_id
|
8
|
+
self.state_service = state_service
|
9
|
+
self.token_info = self.get_assets()
|
10
|
+
|
11
|
+
def get_assets(self):
|
12
|
+
if self.chain_id in ['polkadot']:
|
13
|
+
return {}
|
14
|
+
client_querier = self.state_service.get_client_querier()
|
15
|
+
assets = client_querier.query_map("Assets", "Metadata")
|
16
|
+
result = {}
|
17
|
+
for asset in assets.records:
|
18
|
+
token_id = str(asset[0].value)
|
19
|
+
result[token_id] = asset[1].value_serialized
|
20
|
+
|
21
|
+
return result
|
22
|
+
|
23
|
+
def get_service_info(self):
|
24
|
+
info = {
|
25
|
+
"token": {
|
26
|
+
"chain_id": self.chain_id,
|
27
|
+
"type": "token"
|
28
|
+
}
|
29
|
+
}
|
30
|
+
return info
|
31
|
+
|
32
|
+
def get_function_info(self, wallet: str, token: str, block_number: int = "latest"):
|
33
|
+
result = self.get_function_balance_info(wallet, token, block_number)
|
34
|
+
|
35
|
+
return result
|
36
|
+
|
37
|
+
def get_function_balance_info(self, wallet: str, token: str = None, block_number: int = "latest"):
|
38
|
+
if not token or token == Token.native_token:
|
39
|
+
key = f"System_Account_{[wallet]}_{block_number}".lower()
|
40
|
+
rpc_call = self.state_service.get_function_info("System", "Account", [wallet], block_number)
|
41
|
+
else:
|
42
|
+
token = int(token)
|
43
|
+
params = [int(token), wallet]
|
44
|
+
key = f"Assets_Account_{params}_{block_number}".lower()
|
45
|
+
rpc_call = self.state_service.get_function_info("Assets", "Account", params, block_number)
|
46
|
+
|
47
|
+
return {key: rpc_call}
|
48
|
+
|
49
|
+
def get_asset_info(self, token: str):
|
50
|
+
token = int(token)
|
51
|
+
key = f"Assets_Asset_{token}".lower()
|
52
|
+
rpc_call = self.state_service.get_function_info("Assets", "Asset", [token])
|
53
|
+
return {key, rpc_call}
|
54
|
+
|
55
|
+
def get_data(self, wallet: str, token: str = None, decoded_data: dict = None,
|
56
|
+
token_prices: dict = None, block_number: int = "latest"):
|
57
|
+
if not token or token == Token.native_token:
|
58
|
+
key = f"System_Account_{[wallet]}_{block_number}".lower()
|
59
|
+
balance = decoded_data.get(key).get('data').get("free") / 10 ** 10
|
60
|
+
else:
|
61
|
+
if token not in self.token_info:
|
62
|
+
self.token_info = self.get_assets()
|
63
|
+
token_decimals = self.token_info.get(token, {}).get('decimals', 0)
|
64
|
+
token = int(token)
|
65
|
+
params = [int(token), wallet]
|
66
|
+
key = f"Assets_Account_{params}_{block_number}".lower()
|
67
|
+
balance = decoded_data.get(key).get("balance") / 10 ** token_decimals
|
68
|
+
token_price = token_prices.get(token, 1)
|
69
|
+
balance = balance * token_price
|
70
|
+
return balance
|
@@ -1,8 +1,6 @@
|
|
1
|
-
from query_state_lib.base.mappers.eth_call_balance_of_mapper import EthCallBalanceOf
|
2
|
-
|
3
1
|
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
4
2
|
from defi_services.constants.token_constant import Token
|
5
|
-
from defi_services.jobs.state_querier import StateQuerier
|
3
|
+
from defi_services.jobs.queriers.state_querier import StateQuerier
|
6
4
|
|
7
5
|
|
8
6
|
class TokenServices:
|
@@ -1,10 +1,10 @@
|
|
1
|
-
from defi_services.constants.entities.
|
2
|
-
from defi_services.jobs.state_querier import StateQuerier
|
1
|
+
from defi_services.constants.entities.lending_services import LendingServices
|
2
|
+
from defi_services.jobs.queriers.state_querier import StateQuerier
|
3
3
|
|
4
4
|
|
5
5
|
def init_services(state_querier: StateQuerier, chain_id: str):
|
6
6
|
services = {}
|
7
|
-
for protocol, value in
|
7
|
+
for protocol, value in LendingServices.mapping.get(chain_id, {}).items():
|
8
8
|
services[protocol] = value(state_querier, chain_id)
|
9
9
|
|
10
10
|
return services
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: defi-state-querier
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.9
|
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
|
@@ -93,9 +93,9 @@ Get some information of protocols in their github or documents.
|
|
93
93
|
|
94
94
|
### Important files
|
95
95
|
|
96
|
-
[1] [state_querier.py](src/defi_services/jobs/state_querier.py) - create function information, encode function calls, push function calls, and decode response data.
|
96
|
+
[1] [state_querier.py](src/defi_services/jobs/queriers/state_querier.py) - create function information, encode function calls, push function calls, and decode response data.
|
97
97
|
|
98
|
-
[2] [state_processor.py](src/defi_services/jobs/state_processor.py) - receive [input](#input), combine all encoded function calls in a batch, execute function call batch, process response data, and return [output](#output).
|
98
|
+
[2] [state_processor.py](src/defi_services/jobs/processors/state_processor.py) - receive [input](#input), combine all encoded function calls in a batch, execute function call batch, process response data, and return [output](#output).
|
99
99
|
|
100
100
|
[3] [protocol_services.py](src/defi_services/services/protocol_services.py) - protocol service pattern file, all protocols should follow this file like [aave_v2_services.py](src/defi_services/services/lending/aave_v2_services.py). There are 4 main functions of a service: get service info, get token list related to protocol, get asset information supported by protocol (dapp), get all information of function calls, and process response data.
|
101
101
|
|
@@ -1,4 +1,4 @@
|
|
1
|
-
defi_services/__init__.py,sha256=
|
1
|
+
defi_services/__init__.py,sha256=46Yjk3fz9o8aTN8E95McnzpJcjGzVJmHmQqUZ5mXzfc,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
|
@@ -36,12 +36,21 @@ defi_services/abis/lending/liqee/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
36
36
|
defi_services/abis/lending/liqee/liqee_comptroller_abi.py,sha256=UbMnkWmApWs2oBUHz0t0xgDIpHC-HiP3HKBoZqEZxLs,32288
|
37
37
|
defi_services/abis/lending/liqee/liqee_lending_data_abi.py,sha256=qs7_ynzZxuG0AtKRRU8SAh4zXxKpcoVT7zkuU_sNOrc,17504
|
38
38
|
defi_services/abis/lending/liqee/liqee_token_abi.py,sha256=ApFOMcmdskkX1dPJIxofQTqlguBlDyzrKYcVOGlCEW4,28252
|
39
|
+
defi_services/abis/lending/morpho/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
|
+
defi_services/abis/lending/morpho/morpho_aave_v2_comptroller_abi.py,sha256=3ThdzPUy5B_nwVHNCoDpJ9L4y1_EyAbrinu6KGCjNqk,45749
|
41
|
+
defi_services/abis/lending/morpho/morpho_aave_v2_lens_abi.py,sha256=IjNp8W8AU8awn-cwgShNQrsllxk_n2Vze2IG92Qxk38,24940
|
42
|
+
defi_services/abis/lending/morpho/morpho_aave_v3_comptroller_abi.py,sha256=rUK7stLGRAQu-tbcO3n8GZGZObiADxivhHyVU3-wUjk,60734
|
43
|
+
defi_services/abis/lending/morpho/morpho_compound_comptroller_abi.py,sha256=AZc1PbQj3XH9Jqcztt1Lhc_kix5A0_o4ulDGKEf2dSU,44863
|
44
|
+
defi_services/abis/lending/morpho/morpho_compound_lens_abi.py,sha256=NJ6pfIIbBzOBjxaHBJphWOLfjvp6Ig-_sQNzyIvpDWA,28690
|
45
|
+
defi_services/abis/lending/morpho/morpho_compound_reward_manager_abi.py,sha256=QBlnZLXJ5ruMrcCPG3CxBLmPC6jf16E06qtqOfCXfUc,5883
|
39
46
|
defi_services/abis/lending/onyx/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
40
47
|
defi_services/abis/lending/onyx/onyx_comptroller_abi.py,sha256=GSBQSY7Ok50KpIUwroN9QtSqzE8p-qzOn6XTeocxE40,43692
|
41
48
|
defi_services/abis/lending/onyx/onyx_lens_abi.py,sha256=bBJvkOVTX52xiBil2lEveTRMzcC4dRQY9X2Hh4Uw_bI,19043
|
42
49
|
defi_services/abis/lending/onyx/onyx_token_abi.py,sha256=g6qJBTdKUW1eN7iBrWFFFpCySY5e5as4oZgoDYKqH9g,28847
|
43
50
|
defi_services/abis/lending/other/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
44
51
|
defi_services/abis/lending/other/chain_link_abi.py,sha256=xMqktcNzIrN59jX9kDOVg57ROSZEySRHIWqkOc-oRqU,1418
|
52
|
+
defi_services/abis/lending/radiant_v2/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
53
|
+
defi_services/abis/lending/radiant_v2/radiant_v2_incentive_abi.py,sha256=Z6xs9pGo0YrrSmqB_-b9aP1AUE0JjSG2ih4bmZaEShU,19364
|
45
54
|
defi_services/abis/lending/strike/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
46
55
|
defi_services/abis/lending/strike/strike_comptroller_abi.py,sha256=dhK6kcJkTI3pgr-xMif_Z9ioUYUyDe1LxJaPk3f1Ifg,46652
|
47
56
|
defi_services/abis/lending/strike/strike_lens_abi.py,sha256=MeYyFkRYQuwyIQLqhbpA_ANLynZqDKAqzu1-1w0uZG0,16309
|
@@ -55,6 +64,8 @@ defi_services/abis/lending/venus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRk
|
|
55
64
|
defi_services/abis/lending/venus/venus_comptroller_abi.py,sha256=e8H50OSNAIl69aj4VF8kyp6i3s9CtlcuAwNDN8hWpeo,43234
|
56
65
|
defi_services/abis/lending/venus/venus_lens_abi.py,sha256=F3CXzXSiRqr5Ogrul24A_gQHUzUBSb2pbyAEp1f0uUI,18613
|
57
66
|
defi_services/abis/lending/venus/venus_lens_abi_v1.py,sha256=uI1GPBVVgEAT3ZZ4GM4waM6gAQuIR3r0HUsbsOtdTs0,14433
|
67
|
+
defi_services/abis/lending/wepiggy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
68
|
+
defi_services/abis/lending/wepiggy/wepiggy_distribution_abi.py,sha256=hG8Of4sMKYs4VIeIwx_roa3liNwbVl8i5Sxa3RgmMhQ,21269
|
58
69
|
defi_services/abis/token/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
59
70
|
defi_services/abis/token/ctoken_abi.py,sha256=rEyzs_TttNG56CPM-M_F_HfaPPRvLL1E9HR0EdV4Lyc,23605
|
60
71
|
defi_services/abis/token/erc20_abi.py,sha256=BQKzaRjwCdc7Pt1X0GqHlnXTmec6f67wIpWbiYOe6c8,5636
|
@@ -65,42 +76,55 @@ defi_services/abis/vault/trava_vault_abi.py,sha256=eiAc8ImfAQ1lSkN0gRN4T4YlxCxmA
|
|
65
76
|
defi_services/abis/vault/valuator_abi.py,sha256=j44uj0hqmKj7lY0ajfUaY4N3xjVEaSBYaWilploBlDI,598
|
66
77
|
defi_services/abis/vault/ve_abi.py,sha256=uoc08LyW9_Y7xxDVIgXOzLjo_kOy1YGP3cUAOZhyizw,38341
|
67
78
|
defi_services/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
68
|
-
defi_services/constants/chain_constant.py,sha256=
|
79
|
+
defi_services/constants/chain_constant.py,sha256=DcG3U8Nov1eMLGA-2SNqsVpuKDTu8HPgRjrs073pA9c,183
|
69
80
|
defi_services/constants/db_constant.py,sha256=qAPZOrV8dtDf75mmhizquka2unv8Ob-oiC8GeMRxIjg,2534
|
70
81
|
defi_services/constants/mongo_constant.py,sha256=7EjyDPn7lIkjJTRqQ_xeD4zt4zG_Pazc2XKLl8Uhobg,394
|
71
|
-
defi_services/constants/query_constant.py,sha256=
|
82
|
+
defi_services/constants/query_constant.py,sha256=10Dew5MfkDDV6OOZHovQNx9kgdGIv6lmIfu3XATXeko,465
|
72
83
|
defi_services/constants/time_constant.py,sha256=bC-0pYnfIFFR_0iVvkxhfyHfOclWNw9O3DbdO_nh258,181
|
73
|
-
defi_services/constants/token_constant.py,sha256=
|
84
|
+
defi_services/constants/token_constant.py,sha256=u1h5zZNEq16UWkh6ZXhto33FG0mRNWIc5amtI8KtwIE,2176
|
74
85
|
defi_services/constants/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
75
|
-
defi_services/constants/entities/
|
86
|
+
defi_services/constants/entities/lending_constant.py,sha256=IuTqWSB2UTuibcqGNxr6fw2RSPwx62nUB04ISvi2Hy4,814
|
87
|
+
defi_services/constants/entities/lending_services.py,sha256=0ZNRnUBAh0H6IZ3dzSDW-5nZP3X3KPmUxjuY_9Txn8E,3520
|
76
88
|
defi_services/database/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
77
89
|
defi_services/database/mongodb.py,sha256=hygAesHERCJT5qqPhEWNGI0Z1zFMZFip6puwgNOylKo,1170
|
78
90
|
defi_services/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
79
|
-
defi_services/jobs/
|
80
|
-
defi_services/jobs/
|
91
|
+
defi_services/jobs/processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
92
|
+
defi_services/jobs/processors/solana_state_processor.py,sha256=PBjqwHtzVLw87cfRuzYI6FxM-AUtuxWRW9mqR2vBz6c,4257
|
93
|
+
defi_services/jobs/processors/state_processor.py,sha256=rGwZC2zQue-pIlodGUxbhQ_XYkmulpnU1u002Ui-0Uk,5992
|
94
|
+
defi_services/jobs/processors/substrate_state_processor.py,sha256=xZm-gbLHCgDMIKffohm9OJGapfqlkD2yzDqRQG0o8Wk,3935
|
95
|
+
defi_services/jobs/queriers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
96
|
+
defi_services/jobs/queriers/solana_state_querier.py,sha256=TQELYo6GUoF8s-LfetqYbclNaH8bakQqC7y2ifACIb8,3239
|
97
|
+
defi_services/jobs/queriers/state_querier.py,sha256=mV9VUPLXnS_zBDF9peQRMwZ1WRqK_He4kPhwHfm4aTw,5756
|
98
|
+
defi_services/jobs/queriers/substrate_state_querier.py,sha256=tQEKndP8zARySIxilnduA5GYgq-h9qYCuLyL-DjDmek,3225
|
81
99
|
defi_services/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
82
|
-
defi_services/services/nft_services.py,sha256=
|
100
|
+
defi_services/services/nft_services.py,sha256=EAp_fOlA-Gee3VM1QqoHRigs4Q2-JIHDSrMMJxZ4PMU,2142
|
83
101
|
defi_services/services/protocol_services.py,sha256=kqhZogkwg26zoKWS3EZuZwYqPtsM_TWbYYnz45qVqQ0,818
|
84
|
-
defi_services/services/
|
102
|
+
defi_services/services/solana_token_services.py,sha256=ecFBTOxCLueoyAHSHovvNCWqASIZY7J1C0u4Ca1ewEg,1753
|
103
|
+
defi_services/services/substrate_token_services.py,sha256=HsjceBHo0fxQIcXgDaV0OBANLuggRwXAEPt7ASB0BKk,2904
|
104
|
+
defi_services/services/token_services.py,sha256=mHTvu5tHGB9kfoeYf12sOjSgFm0TyxyFyKX3X7Vm-iA,2766
|
85
105
|
defi_services/services/lending/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
86
|
-
defi_services/services/lending/aave_v2_services.py,sha256=-
|
87
|
-
defi_services/services/lending/aave_v3_services.py,sha256=
|
88
|
-
defi_services/services/lending/compound_service.py,sha256=
|
89
|
-
defi_services/services/lending/cream_services.py,sha256=
|
90
|
-
defi_services/services/lending/flux_services.py,sha256=
|
91
|
-
defi_services/services/lending/geist_services.py,sha256=
|
92
|
-
defi_services/services/lending/granary_v1_services.py,sha256=
|
93
|
-
defi_services/services/lending/iron_bank_service.py,sha256=
|
94
|
-
defi_services/services/lending/liqee_service.py,sha256=
|
95
|
-
defi_services/services/lending/
|
96
|
-
defi_services/services/lending/
|
97
|
-
defi_services/services/lending/
|
98
|
-
defi_services/services/lending/
|
99
|
-
defi_services/services/lending/
|
100
|
-
defi_services/services/lending/
|
101
|
-
defi_services/services/lending/
|
106
|
+
defi_services/services/lending/aave_v2_services.py,sha256=-yUX2PNaMSuo3AgKW1XxtUccQ5jiPYTFjvKRMrjM6cQ,23742
|
107
|
+
defi_services/services/lending/aave_v3_services.py,sha256=9dag6lTzvBYGGEgwjq4fi8TLa2yFDTGnEp11AIXieu8,15506
|
108
|
+
defi_services/services/lending/compound_service.py,sha256=g8B-BNpAkVB_C8feuspjoLWrk36w3USec2IAHYp8R7A,25461
|
109
|
+
defi_services/services/lending/cream_services.py,sha256=aNVeIganORLv7mYtjQw4lw52B6aZbhG9YK-fjlszX6c,1742
|
110
|
+
defi_services/services/lending/flux_services.py,sha256=kEvtrxt9otIdVn-7Ul83P9u_g7uNUVu9ts2vXL0Olgk,16098
|
111
|
+
defi_services/services/lending/geist_services.py,sha256=UI5D-MbMqplrt7D4krSFdpaREKOT81k8boD_XhGGpUQ,1035
|
112
|
+
defi_services/services/lending/granary_v1_services.py,sha256=K54Yzrlyf5A67V9xB43tQIkxwYAmHD7pi1gIpuh79AQ,12435
|
113
|
+
defi_services/services/lending/iron_bank_service.py,sha256=N6wt9KUQITHmFbOn7-aZxZHPOjUplFOIaCUxqtmlZDU,16617
|
114
|
+
defi_services/services/lending/liqee_service.py,sha256=o7Tzt6cpWbwOKqZvhhotbng2y8z27n9aCplKECaWTdQ,13905
|
115
|
+
defi_services/services/lending/morpho_aave_v2_services.py,sha256=i1UR58XulFyk35PLq6s1Fd3s-JDPtbWStUfg0p2XB6E,3937
|
116
|
+
defi_services/services/lending/morpho_aave_v3_services.py,sha256=OIvyqkcJCKigNfCn9-w3nH-Tw5D9F05Lp0Eu0FLqJ78,7360
|
117
|
+
defi_services/services/lending/morpho_compound_services.py,sha256=96TP8dOSFt4Yz3ds40YZrEwIBBnHjAlxM7SiBb8NUE4,10422
|
118
|
+
defi_services/services/lending/onyx_service.py,sha256=81f8CVyAeDxcw4TX19VGI8Wy_OX1tRBuRoV6MizWqXI,15602
|
119
|
+
defi_services/services/lending/radiant_v2_services.py,sha256=rT7TbSJEOF4oUS9gOE8m2kIvpDP6cCTBwAy9hK89vDg,2182
|
120
|
+
defi_services/services/lending/strike_service.py,sha256=HXdFDk2aVbIML08WTRaMsMoTuBQMPmJz6kShuf8j4lw,17370
|
121
|
+
defi_services/services/lending/trava_services.py,sha256=vCpey07spMB4PyDBX-6U9UMGDGUnFJjIeKNHCNBTZP0,20902
|
122
|
+
defi_services/services/lending/uwu_services.py,sha256=AY-lio6HZLBXIPHh_VTe_DoXnJW4GXy3Z45rbtgObZc,23368
|
123
|
+
defi_services/services/lending/valas_services.py,sha256=vYx8oYY7BY4pRNEFBVVX2T0ca-V3ixcilEwA5i5vnL0,20453
|
124
|
+
defi_services/services/lending/venus_services.py,sha256=WWw6JC_KRjBv391V59FEMutO_CwmiCaxXW6pfTEc8JQ,16812
|
125
|
+
defi_services/services/lending/wepiggy_services.py,sha256=l-YuysxKkLt19DqYYyJGg8eNeyICiBB1qAQUi2qcNuI,24920
|
102
126
|
defi_services/services/lending/lending_info/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
103
|
-
defi_services/services/lending/lending_info/aave_v2_services.py,sha256=
|
127
|
+
defi_services/services/lending/lending_info/aave_v2_services.py,sha256=FpWbU6XbPmBZYiuYK0PKo7020_3lD1hdUWiN11_uMT8,22500
|
104
128
|
defi_services/services/lending/lending_info/arbitrum/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
105
129
|
defi_services/services/lending/lending_info/arbitrum/aave_v3_arbitrum.py,sha256=8lpLYjXE2bKijTeWjRQH4XUFhG3s7df3J3r5oZEZcjA,3556
|
106
130
|
defi_services/services/lending/lending_info/arbitrum/radiant_arbitrum.py,sha256=1iXoZml8c1iVdshqzZ7YRVcS5lc2RK6A2AnPfO4s49U,2662
|
@@ -121,11 +145,15 @@ defi_services/services/lending/lending_info/ethereum/flux_eth.py,sha256=Iw-hvmFc
|
|
121
145
|
defi_services/services/lending/lending_info/ethereum/granary_v1_eth.py,sha256=iHxSgni9ogXP-4OYtslcEe0XsUYS-_sfa5VfuwMWKFY,2057
|
122
146
|
defi_services/services/lending/lending_info/ethereum/iron_bank_eth.py,sha256=Fx8YZ0j0ylvTVMlJNV_smOoefHuh7qXy0tE1XpBguoI,4680
|
123
147
|
defi_services/services/lending/lending_info/ethereum/liqee_eth.py,sha256=jlotnIFzlxYUQyjkZS4Svp9a-acvZNyg3foQxm9Vrl0,3537
|
148
|
+
defi_services/services/lending/lending_info/ethereum/morpho_aave_v2_eth.py,sha256=OaA1PS2zFuJij9ZdQg0Qfs3uCgKEWYqG9-Bcjhmat9U,2598
|
149
|
+
defi_services/services/lending/lending_info/ethereum/morpho_aave_v3_eth.py,sha256=6H_jutoidmZ7tKlVI6FfAtVVNbPwVXjCg6Rig4b4y4M,2473
|
150
|
+
defi_services/services/lending/lending_info/ethereum/morpho_compound_eth.py,sha256=0TA_hXGpT9RyhaQOdmctsMWG9yECUe-xwJHorDUGVec,1882
|
124
151
|
defi_services/services/lending/lending_info/ethereum/onyx_eth.py,sha256=N2pu-jrDX17R40hvvXWvcSj98w-S2tIAjjW7IcGYJMw,3451
|
125
152
|
defi_services/services/lending/lending_info/ethereum/spark_eth.py,sha256=WDbeBW2i3IytwI92L25hxCXsFaMik32vuHPHg_-SPc8,5681
|
126
153
|
defi_services/services/lending/lending_info/ethereum/strike_eth.py,sha256=tdtisQnjheDC3EO4zHIDOYHHtwABDGGSK-x70gpo2s0,2849
|
127
154
|
defi_services/services/lending/lending_info/ethereum/trava_eth.py,sha256=ycPAsnq6aaeYMZyD3YsQ43N9u14-tbRym1_zmNmMn64,1653
|
128
155
|
defi_services/services/lending/lending_info/ethereum/uwu_eth.py,sha256=l_LMKCUjy3JlSXS7pMr34FNpqedFQheO-QhUWxUA1OE,4837
|
156
|
+
defi_services/services/lending/lending_info/ethereum/wepiggy_eth.py,sha256=CQ0d4zTrux1ZMKm1yhjKzE7kDBf4HqZsqapkV7FT92M,1701
|
129
157
|
defi_services/services/lending/lending_info/fantom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
130
158
|
defi_services/services/lending/lending_info/fantom/aave_v3_ftm.py,sha256=Oukfb-f-p3Y_MLoyVqj-f6yl_1QxAyjHdyz02BkxyEU,3556
|
131
159
|
defi_services/services/lending/lending_info/fantom/geist_ftm.py,sha256=zpwT5Qcw3ha8nlX8T474YTpSdQDdjDgGWO1CXdVycoI,3347
|
@@ -137,12 +165,12 @@ defi_services/services/lending/lending_info/polygon/aave_v2_polygon.py,sha256=BI
|
|
137
165
|
defi_services/services/lending/lending_info/polygon/aave_v3_polygon.py,sha256=2qaU-H8o7-tZRDRSVua72GOwJTUBDpYdVW5DekKMIvs,6907
|
138
166
|
defi_services/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
139
167
|
defi_services/utils/graph_operations.py,sha256=2-onMqflUqOrbVsy7JGFyeTMOcwTgPoZ3uGWruWMA_k,6271
|
140
|
-
defi_services/utils/init_services.py,sha256=
|
168
|
+
defi_services/utils/init_services.py,sha256=by5TgYBY3Dyl9Fqbf-FCeCYe5FmU28SJNxNWDjElvHY,387
|
141
169
|
defi_services/utils/logger_utils.py,sha256=KxDlmaK9aoMOI1gdroRYjMm383myvFiWqW0iKV0SabY,777
|
142
170
|
defi_services/utils/market_service.py,sha256=imPtPHBkpEx5JnhqeIWYqbCjsIEm8IKBYHNEy6rKjdU,723
|
143
171
|
defi_services/utils/memory_storage.py,sha256=BOT8laB0iVSCGE-oDlpWJQLbSC6X2blKX4zuQbs4inc,851
|
144
|
-
defi_state_querier-0.0.
|
145
|
-
defi_state_querier-0.0.
|
146
|
-
defi_state_querier-0.0.
|
147
|
-
defi_state_querier-0.0.
|
148
|
-
defi_state_querier-0.0.
|
172
|
+
defi_state_querier-0.0.9.dist-info/LICENSE,sha256=6jmfxa8nUIwfKnzZUxAHJSJ_IS7h7mpbJq26cWjoo-o,1063
|
173
|
+
defi_state_querier-0.0.9.dist-info/METADATA,sha256=wNOU-h_u69kGHclZevhbOcgyyXpKhP6N71xq8BN3d6M,3879
|
174
|
+
defi_state_querier-0.0.9.dist-info/WHEEL,sha256=yQN5g4mg4AybRjkgi-9yy4iQEFibGQmlz78Pik5Or-A,92
|
175
|
+
defi_state_querier-0.0.9.dist-info/top_level.txt,sha256=C-OTxHK6MknKK-nAbEzCPDUl1M6pktRhgJrmsozdf6g,14
|
176
|
+
defi_state_querier-0.0.9.dist-info/RECORD,,
|
@@ -1,97 +0,0 @@
|
|
1
|
-
from defi_services.constants.chain_constant import Chain
|
2
|
-
from defi_services.services.lending.aave_v2_services import AaveV2StateService
|
3
|
-
from defi_services.services.lending.granary_v1_services import GranaryV1StateService
|
4
|
-
from defi_services.services.lending.uwu_services import UwuStateService
|
5
|
-
from defi_services.services.lending.aave_v3_services import AaveV3StateService
|
6
|
-
from defi_services.services.lending.compound_service import CompoundStateService
|
7
|
-
from defi_services.services.lending.cream_services import CreamStateService
|
8
|
-
from defi_services.services.lending.geist_services import GeistStateService
|
9
|
-
from defi_services.services.lending.radiant_v2_services import RadiantStateService
|
10
|
-
from defi_services.services.lending.trava_services import TravaStateService
|
11
|
-
from defi_services.services.lending.valas_services import ValasStateService
|
12
|
-
from defi_services.services.lending.flux_services import FluxStateService
|
13
|
-
from defi_services.services.lending.iron_bank_service import IronBankStateService
|
14
|
-
from defi_services.services.lending.venus_services import VenusStateService
|
15
|
-
from defi_services.services.lending.liqee_service import LiqeeStateService
|
16
|
-
from defi_services.services.lending.strike_service import StrikeStateService
|
17
|
-
from defi_services.services.lending.onyx_service import OnyxStateService
|
18
|
-
|
19
|
-
|
20
|
-
class Lending:
|
21
|
-
# service
|
22
|
-
aave_v2 = "aave-v2"
|
23
|
-
aave_v3 = "aave-v3"
|
24
|
-
radiant_v2 = "radiant-v2"
|
25
|
-
compound = "compound"
|
26
|
-
flux = "flux-finance"
|
27
|
-
iron_bank = "iron-bank"
|
28
|
-
trava = "trava-finance"
|
29
|
-
valas = "valas-finance"
|
30
|
-
geist = "geist-finance"
|
31
|
-
cream = "cream-lending"
|
32
|
-
venus = "venus"
|
33
|
-
liqee = "liqee"
|
34
|
-
strike = "strike"
|
35
|
-
uwu = "uwu-lend"
|
36
|
-
onyx = "onyx-protocol"
|
37
|
-
granary = "granary-finance"
|
38
|
-
all = [strike, aave_v2, aave_v3, radiant_v2, compound, flux, onyx, granary,
|
39
|
-
iron_bank, trava, valas, geist, cream, venus, liqee, strike, uwu]
|
40
|
-
# all = [aave_v2, trava]
|
41
|
-
# chain
|
42
|
-
ethereum = {
|
43
|
-
aave_v2: AaveV2StateService,
|
44
|
-
compound: CompoundStateService,
|
45
|
-
trava: TravaStateService,
|
46
|
-
flux: FluxStateService,
|
47
|
-
iron_bank: IronBankStateService,
|
48
|
-
uwu: UwuStateService,
|
49
|
-
aave_v3: AaveV3StateService,
|
50
|
-
liqee: LiqeeStateService,
|
51
|
-
strike: StrikeStateService,
|
52
|
-
onyx: OnyxStateService,
|
53
|
-
granary: GranaryV1StateService
|
54
|
-
}
|
55
|
-
fantom = {
|
56
|
-
trava: TravaStateService,
|
57
|
-
geist: GeistStateService,
|
58
|
-
aave_v3: AaveV3StateService,
|
59
|
-
}
|
60
|
-
|
61
|
-
bsc = {
|
62
|
-
trava: TravaStateService,
|
63
|
-
valas: ValasStateService,
|
64
|
-
cream: CreamStateService,
|
65
|
-
venus: VenusStateService,
|
66
|
-
radiant_v2: RadiantStateService
|
67
|
-
}
|
68
|
-
|
69
|
-
avalanche = {
|
70
|
-
aave_v3: AaveV3StateService,
|
71
|
-
aave_v2: AaveV2StateService
|
72
|
-
}
|
73
|
-
|
74
|
-
polygon = {
|
75
|
-
aave_v2: AaveV2StateService,
|
76
|
-
aave_v3: AaveV3StateService
|
77
|
-
}
|
78
|
-
|
79
|
-
optimism = {
|
80
|
-
aave_v3: AaveV3StateService
|
81
|
-
}
|
82
|
-
|
83
|
-
arbitrum = {
|
84
|
-
radiant_v2: RadiantStateService,
|
85
|
-
aave_v3: AaveV3StateService
|
86
|
-
}
|
87
|
-
# mapping
|
88
|
-
mapping = {
|
89
|
-
Chain.ethereum: ethereum,
|
90
|
-
Chain.fantom: fantom,
|
91
|
-
Chain.bsc: bsc,
|
92
|
-
Chain.avalanche: avalanche,
|
93
|
-
Chain.polygon: polygon,
|
94
|
-
Chain.arbitrum: arbitrum,
|
95
|
-
Chain.optimism: optimism
|
96
|
-
}
|
97
|
-
|
File without changes
|
File without changes
|
File without changes
|