defi-state-querier 0.5.28__py3-none-any.whl → 0.5.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.
Files changed (103) hide show
  1. defi_services/__init__.py +1 -1
  2. defi_services/abis/lending/ionic/__init__.py +0 -0
  3. defi_services/abis/lending/ionic/ionic_ctoken_abi.py +1108 -0
  4. defi_services/abis/lending/kinza/__init__.py +0 -0
  5. defi_services/abis/lending/kinza/kinza_incentive.py +928 -0
  6. defi_services/abis/lending/kinza/kinza_lending_pool.py +1791 -0
  7. defi_services/abis/lending/moonwell/__init__.py +0 -0
  8. defi_services/abis/lending/moonwell/moonwell_comptroller_abi.py +1500 -0
  9. defi_services/abis/lending/moonwell/moonwell_ctoken_abi.py +1431 -0
  10. defi_services/abis/lending/radiant_v2/radiant_reward_converter.py +817 -0
  11. defi_services/abis/lending/seamless/__init__.py +0 -0
  12. defi_services/abis/lending/seamless/seamless_incentive.py +1049 -0
  13. defi_services/abis/lending/seamless/seamless_lending_pool.py +1738 -0
  14. defi_services/abis/lending/seamless/seamless_oracle.py +233 -0
  15. defi_services/abis/token/trc20_abi.py +304 -0
  16. defi_services/abis/vault/tcv_abi.py +1523 -0
  17. defi_services/constants/chain_constant.py +8 -1
  18. defi_services/constants/entities/dex_info_constant.py +2 -2
  19. defi_services/constants/entities/dex_services.py +13 -1
  20. defi_services/constants/entities/lending_constant.py +14 -5
  21. defi_services/constants/entities/lending_services.py +41 -4
  22. defi_services/constants/entities/vault_constant.py +2 -2
  23. defi_services/constants/entities/vault_services.py +7 -1
  24. defi_services/constants/network_constants.py +20 -361
  25. defi_services/constants/token_constant.py +3 -1
  26. defi_services/jobs/processors/cosmos_state_processor.py +3 -2
  27. defi_services/jobs/processors/ton_state_processor.py +5 -4
  28. defi_services/jobs/queriers/call_state_querier.py +2 -0
  29. defi_services/jobs/queriers/state_querier.py +3 -0
  30. defi_services/jobs/tcv.py +144 -0
  31. defi_services/services/dex/dex_info/uniswap_info.py +29 -1
  32. defi_services/services/dex/uniswap_v3_service.py +6 -2
  33. defi_services/services/lending/aave_v2_services.py +44 -29
  34. defi_services/services/lending/aave_v3_services.py +41 -20
  35. defi_services/services/lending/avalon_services.py +34 -0
  36. defi_services/services/lending/compound_v3_services.py +9 -5
  37. defi_services/services/lending/granary_services.py +6 -4
  38. defi_services/services/lending/ionic_service.py +167 -0
  39. defi_services/services/lending/justlend_service.py +4 -3
  40. defi_services/services/lending/kinza_services.py +315 -0
  41. defi_services/services/lending/lending_info/arbitrum/aave_v3_arbitrum.py +1 -1
  42. defi_services/services/lending/lending_info/arbitrum/compound_v3_arbitrum.py +96 -6
  43. defi_services/services/lending/lending_info/arbitrum/venus_arbitrum.py +10 -0
  44. defi_services/services/lending/lending_info/base/__init__.py +0 -0
  45. defi_services/services/lending/lending_info/base/aave_v3_base.py +61 -0
  46. defi_services/services/lending/lending_info/base/compound_v3_base.py +116 -0
  47. defi_services/services/lending/lending_info/base/granary_base.py +62 -0
  48. defi_services/services/lending/lending_info/base/ionic_base.py +173 -0
  49. defi_services/services/lending/lending_info/base/moonwell_base.py +89 -0
  50. defi_services/services/lending/lending_info/base/radiant_v2_base.py +57 -0
  51. defi_services/services/lending/lending_info/base/seamless_base.py +145 -0
  52. defi_services/services/lending/lending_info/base/sonne_base.py +53 -0
  53. defi_services/services/lending/lending_info/base/xlend_base.py +91 -0
  54. defi_services/services/lending/lending_info/base/zerolend_base.py +109 -0
  55. defi_services/services/lending/lending_info/bsc/aave_v3_bsc.py +68 -0
  56. defi_services/services/lending/lending_info/bsc/apeswap_bsc.py +1 -1
  57. defi_services/services/lending/lending_info/bsc/avalon_bsc.py +75 -0
  58. defi_services/services/lending/lending_info/bsc/kinza_bsc.py +182 -0
  59. defi_services/services/lending/lending_info/ethereum/aave_v3_eth.py +1 -140
  60. defi_services/services/lending/lending_info/ethereum/compound_v3_eth.py +180 -5
  61. defi_services/services/lending/lending_info/ethereum/kinza_eth.py +119 -0
  62. defi_services/services/lending/lending_info/ethereum/old_aave_v3_eth.py +150 -0
  63. defi_services/services/lending/lending_info/ethereum/radiant_eth.py +69 -0
  64. defi_services/services/lending/lending_info/ethereum/venus_eth.py +10 -0
  65. defi_services/services/lending/lending_info/ethereum/zerolend_eth.py +96 -0
  66. defi_services/services/lending/lending_info/optimism/compound_v3_optimism.py +116 -0
  67. defi_services/services/lending/lending_info/optimism/moonwell_optimism.py +9 -0
  68. defi_services/services/lending/lending_info/optimism/xlend_optimism.py +112 -0
  69. defi_services/services/lending/lending_info/polygon/compound_v3_polygon.py +35 -5
  70. defi_services/services/lending/lending_info/zksync/__init__.py +0 -0
  71. defi_services/services/lending/lending_info/zksync/aave_v3_zksync.py +47 -0
  72. defi_services/services/lending/lending_info/zksync/venus_zksync.py +10 -0
  73. defi_services/services/lending/lending_info/zksync/zerolend_zksync.py +138 -0
  74. defi_services/services/lending/liqee_service.py +2 -2
  75. defi_services/services/lending/moonwell_service.py +120 -0
  76. defi_services/services/lending/morpho_aave_v2_services.py +3 -3
  77. defi_services/services/lending/morpho_aave_v3_services.py +2 -2
  78. defi_services/services/lending/onyx_service.py +2 -1
  79. defi_services/services/lending/radiant_v2_services.py +52 -10
  80. defi_services/services/lending/seamless_services.py +313 -0
  81. defi_services/services/lending/sonne_service.py +64 -0
  82. defi_services/services/lending/trava_services.py +2 -2
  83. defi_services/services/lending/uwu_services.py +3 -3
  84. defi_services/services/lending/valas_services.py +2 -2
  85. defi_services/services/lending/venus_services.py +9 -3
  86. defi_services/services/lending/xlend_services.py +325 -0
  87. defi_services/services/lending/zerolend_services.py +36 -0
  88. defi_services/services/multicall/multicall_v2.py +0 -317
  89. defi_services/services/vault/tcv_vault_services.py +108 -0
  90. defi_services/services/vault/vault_info/arbitrum/__init__.py +0 -0
  91. defi_services/services/vault/vault_info/arbitrum/tcv_arb.py +58 -0
  92. {defi_state_querier-0.5.28.dist-info → defi_state_querier-0.5.30.dist-info}/METADATA +1 -1
  93. {defi_state_querier-0.5.28.dist-info → defi_state_querier-0.5.30.dist-info}/RECORD +103 -49
  94. /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/__init__.py +0 -0
  95. /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/aave_v2_event_abi.py +0 -0
  96. /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/aave_v2_incentives_abi.py +0 -0
  97. /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/lending_pool_abi.py +0 -0
  98. /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/oracle_abi.py +0 -0
  99. /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/staked_incentives_abi.py +0 -0
  100. /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/uwu_incentives_abi.py +0 -0
  101. {defi_state_querier-0.5.28.dist-info → defi_state_querier-0.5.30.dist-info}/WHEEL +0 -0
  102. {defi_state_querier-0.5.28.dist-info → defi_state_querier-0.5.30.dist-info}/licenses/LICENSE +0 -0
  103. {defi_state_querier-0.5.28.dist-info → defi_state_querier-0.5.30.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,233 @@
1
+ import json
2
+
3
+ SEAMLESS_ORACLE_ABI = json.loads('''
4
+ [
5
+ {
6
+ "inputs": [
7
+ {
8
+ "internalType": "contract IPoolAddressesProvider",
9
+ "name": "provider",
10
+ "type": "address"
11
+ },
12
+ {
13
+ "internalType": "address[]",
14
+ "name": "assets",
15
+ "type": "address[]"
16
+ },
17
+ {
18
+ "internalType": "address[]",
19
+ "name": "sources",
20
+ "type": "address[]"
21
+ },
22
+ {
23
+ "internalType": "address",
24
+ "name": "fallbackOracle",
25
+ "type": "address"
26
+ },
27
+ {
28
+ "internalType": "address",
29
+ "name": "baseCurrency",
30
+ "type": "address"
31
+ },
32
+ {
33
+ "internalType": "uint256",
34
+ "name": "baseCurrencyUnit",
35
+ "type": "uint256"
36
+ }
37
+ ],
38
+ "stateMutability": "nonpayable",
39
+ "type": "constructor"
40
+ },
41
+ {
42
+ "anonymous": false,
43
+ "inputs": [
44
+ {
45
+ "indexed": true,
46
+ "internalType": "address",
47
+ "name": "asset",
48
+ "type": "address"
49
+ },
50
+ {
51
+ "indexed": true,
52
+ "internalType": "address",
53
+ "name": "source",
54
+ "type": "address"
55
+ }
56
+ ],
57
+ "name": "AssetSourceUpdated",
58
+ "type": "event"
59
+ },
60
+ {
61
+ "anonymous": false,
62
+ "inputs": [
63
+ {
64
+ "indexed": true,
65
+ "internalType": "address",
66
+ "name": "baseCurrency",
67
+ "type": "address"
68
+ },
69
+ {
70
+ "indexed": false,
71
+ "internalType": "uint256",
72
+ "name": "baseCurrencyUnit",
73
+ "type": "uint256"
74
+ }
75
+ ],
76
+ "name": "BaseCurrencySet",
77
+ "type": "event"
78
+ },
79
+ {
80
+ "anonymous": false,
81
+ "inputs": [
82
+ {
83
+ "indexed": true,
84
+ "internalType": "address",
85
+ "name": "fallbackOracle",
86
+ "type": "address"
87
+ }
88
+ ],
89
+ "name": "FallbackOracleUpdated",
90
+ "type": "event"
91
+ },
92
+ {
93
+ "inputs": [],
94
+ "name": "ADDRESSES_PROVIDER",
95
+ "outputs": [
96
+ {
97
+ "internalType": "contract IPoolAddressesProvider",
98
+ "name": "",
99
+ "type": "address"
100
+ }
101
+ ],
102
+ "stateMutability": "view",
103
+ "type": "function"
104
+ },
105
+ {
106
+ "inputs": [],
107
+ "name": "BASE_CURRENCY",
108
+ "outputs": [
109
+ {
110
+ "internalType": "address",
111
+ "name": "",
112
+ "type": "address"
113
+ }
114
+ ],
115
+ "stateMutability": "view",
116
+ "type": "function"
117
+ },
118
+ {
119
+ "inputs": [],
120
+ "name": "BASE_CURRENCY_UNIT",
121
+ "outputs": [
122
+ {
123
+ "internalType": "uint256",
124
+ "name": "",
125
+ "type": "uint256"
126
+ }
127
+ ],
128
+ "stateMutability": "view",
129
+ "type": "function"
130
+ },
131
+ {
132
+ "inputs": [
133
+ {
134
+ "internalType": "address",
135
+ "name": "asset",
136
+ "type": "address"
137
+ }
138
+ ],
139
+ "name": "getAssetPrice",
140
+ "outputs": [
141
+ {
142
+ "internalType": "uint256",
143
+ "name": "",
144
+ "type": "uint256"
145
+ }
146
+ ],
147
+ "stateMutability": "view",
148
+ "type": "function"
149
+ },
150
+ {
151
+ "inputs": [
152
+ {
153
+ "internalType": "address[]",
154
+ "name": "assets",
155
+ "type": "address[]"
156
+ }
157
+ ],
158
+ "name": "getAssetsPrices",
159
+ "outputs": [
160
+ {
161
+ "internalType": "uint256[]",
162
+ "name": "",
163
+ "type": "uint256[]"
164
+ }
165
+ ],
166
+ "stateMutability": "view",
167
+ "type": "function"
168
+ },
169
+ {
170
+ "inputs": [],
171
+ "name": "getFallbackOracle",
172
+ "outputs": [
173
+ {
174
+ "internalType": "address",
175
+ "name": "",
176
+ "type": "address"
177
+ }
178
+ ],
179
+ "stateMutability": "view",
180
+ "type": "function"
181
+ },
182
+ {
183
+ "inputs": [
184
+ {
185
+ "internalType": "address",
186
+ "name": "asset",
187
+ "type": "address"
188
+ }
189
+ ],
190
+ "name": "getSourceOfAsset",
191
+ "outputs": [
192
+ {
193
+ "internalType": "address",
194
+ "name": "",
195
+ "type": "address"
196
+ }
197
+ ],
198
+ "stateMutability": "view",
199
+ "type": "function"
200
+ },
201
+ {
202
+ "inputs": [
203
+ {
204
+ "internalType": "address[]",
205
+ "name": "assets",
206
+ "type": "address[]"
207
+ },
208
+ {
209
+ "internalType": "address[]",
210
+ "name": "sources",
211
+ "type": "address[]"
212
+ }
213
+ ],
214
+ "name": "setAssetSources",
215
+ "outputs": [],
216
+ "stateMutability": "nonpayable",
217
+ "type": "function"
218
+ },
219
+ {
220
+ "inputs": [
221
+ {
222
+ "internalType": "address",
223
+ "name": "fallbackOracle",
224
+ "type": "address"
225
+ }
226
+ ],
227
+ "name": "setFallbackOracle",
228
+ "outputs": [],
229
+ "stateMutability": "nonpayable",
230
+ "type": "function"
231
+ }
232
+ ]
233
+ ''')
@@ -0,0 +1,304 @@
1
+ import json
2
+
3
+ TRC20_ABI = json.loads('''
4
+ [
5
+ {
6
+ "constant": false,
7
+ "inputs": [
8
+ {
9
+ "name": "spender",
10
+ "type": "address"
11
+ },
12
+ {
13
+ "name": "value",
14
+ "type": "uint256"
15
+ }
16
+ ],
17
+ "name": "approve",
18
+ "outputs": [
19
+ {
20
+ "name": "",
21
+ "type": "bool"
22
+ }
23
+ ],
24
+ "payable": false,
25
+ "stateMutability": "nonpayable",
26
+ "type": "function",
27
+ "signature": "0x095ea7b3"
28
+ },
29
+ {
30
+ "constant": true,
31
+ "inputs": [],
32
+ "name": "totalSupply",
33
+ "outputs": [
34
+ {
35
+ "name": "",
36
+ "type": "uint256"
37
+ }
38
+ ],
39
+ "payable": false,
40
+ "stateMutability": "view",
41
+ "type": "function",
42
+ "signature": "0x18160ddd"
43
+ },
44
+ {
45
+ "constant": false,
46
+ "inputs": [
47
+ {
48
+ "name": "from",
49
+ "type": "address"
50
+ },
51
+ {
52
+ "name": "to",
53
+ "type": "address"
54
+ },
55
+ {
56
+ "name": "value",
57
+ "type": "uint256"
58
+ }
59
+ ],
60
+ "name": "transferFrom",
61
+ "outputs": [
62
+ {
63
+ "name": "",
64
+ "type": "bool"
65
+ }
66
+ ],
67
+ "payable": false,
68
+ "stateMutability": "nonpayable",
69
+ "type": "function",
70
+ "signature": "0x23b872dd"
71
+ },
72
+ {
73
+ "constant": false,
74
+ "inputs": [
75
+ {
76
+ "name": "spender",
77
+ "type": "address"
78
+ },
79
+ {
80
+ "name": "addedValue",
81
+ "type": "uint256"
82
+ }
83
+ ],
84
+ "name": "increaseAllowance",
85
+ "outputs": [
86
+ {
87
+ "name": "",
88
+ "type": "bool"
89
+ }
90
+ ],
91
+ "payable": false,
92
+ "stateMutability": "nonpayable",
93
+ "type": "function",
94
+ "signature": "0x39509351"
95
+ },
96
+ {
97
+ "constant": true,
98
+ "inputs": [
99
+ {
100
+ "name": "owner",
101
+ "type": "address"
102
+ }
103
+ ],
104
+ "name": "balanceOf",
105
+ "outputs": [
106
+ {
107
+ "name": "",
108
+ "type": "uint256"
109
+ }
110
+ ],
111
+ "payable": false,
112
+ "stateMutability": "view",
113
+ "type": "function",
114
+ "signature": "0x70a08231"
115
+ },
116
+ {
117
+ "constant": false,
118
+ "inputs": [
119
+ {
120
+ "name": "spender",
121
+ "type": "address"
122
+ },
123
+ {
124
+ "name": "subtractedValue",
125
+ "type": "uint256"
126
+ }
127
+ ],
128
+ "name": "decreaseAllowance",
129
+ "outputs": [
130
+ {
131
+ "name": "",
132
+ "type": "bool"
133
+ }
134
+ ],
135
+ "payable": false,
136
+ "stateMutability": "nonpayable",
137
+ "type": "function",
138
+ "signature": "0xa457c2d7"
139
+ },
140
+ {
141
+ "constant": false,
142
+ "inputs": [
143
+ {
144
+ "name": "to",
145
+ "type": "address"
146
+ },
147
+ {
148
+ "name": "value",
149
+ "type": "uint256"
150
+ }
151
+ ],
152
+ "name": "transfer",
153
+ "outputs": [
154
+ {
155
+ "name": "",
156
+ "type": "bool"
157
+ }
158
+ ],
159
+ "payable": false,
160
+ "stateMutability": "nonpayable",
161
+ "type": "function",
162
+ "signature": "0xa9059cbb"
163
+ },
164
+ {
165
+ "constant": true,
166
+ "inputs": [
167
+ {
168
+ "name": "owner",
169
+ "type": "address"
170
+ },
171
+ {
172
+ "name": "spender",
173
+ "type": "address"
174
+ }
175
+ ],
176
+ "name": "allowance",
177
+ "outputs": [
178
+ {
179
+ "name": "",
180
+ "type": "uint256"
181
+ }
182
+ ],
183
+ "payable": false,
184
+ "stateMutability": "view",
185
+ "type": "function",
186
+ "signature": "0xdd62ed3e"
187
+ },
188
+ {
189
+ "inputs": [
190
+ {
191
+ "name": "name",
192
+ "type": "string"
193
+ },
194
+ {
195
+ "name": "symbol",
196
+ "type": "string"
197
+ },
198
+ {
199
+ "name": "decimals",
200
+ "type": "uint8"
201
+ },
202
+ {
203
+ "name": "cap",
204
+ "type": "uint256"
205
+ }
206
+ ],
207
+ "payable": false,
208
+ "stateMutability": "nonpayable",
209
+ "type": "constructor",
210
+ "signature": "constructor"
211
+ },
212
+ {
213
+ "anonymous": false,
214
+ "inputs": [
215
+ {
216
+ "indexed": true,
217
+ "name": "from",
218
+ "type": "address"
219
+ },
220
+ {
221
+ "indexed": true,
222
+ "name": "to",
223
+ "type": "address"
224
+ },
225
+ {
226
+ "indexed": false,
227
+ "name": "value",
228
+ "type": "uint256"
229
+ }
230
+ ],
231
+ "name": "Transfer",
232
+ "type": "event",
233
+ "signature": "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef"
234
+ },
235
+ {
236
+ "anonymous": false,
237
+ "inputs": [
238
+ {
239
+ "indexed": true,
240
+ "name": "owner",
241
+ "type": "address"
242
+ },
243
+ {
244
+ "indexed": true,
245
+ "name": "spender",
246
+ "type": "address"
247
+ },
248
+ {
249
+ "indexed": false,
250
+ "name": "value",
251
+ "type": "uint256"
252
+ }
253
+ ],
254
+ "name": "Approval",
255
+ "type": "event",
256
+ "signature": "0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
257
+ },
258
+ {
259
+ "constant": true,
260
+ "inputs": [],
261
+ "name": "name",
262
+ "outputs": [
263
+ {
264
+ "name": "",
265
+ "type": "string"
266
+ }
267
+ ],
268
+ "payable": false,
269
+ "stateMutability": "view",
270
+ "type": "function",
271
+ "signature": "0x06fdde03"
272
+ },
273
+ {
274
+ "constant": true,
275
+ "inputs": [],
276
+ "name": "symbol",
277
+ "outputs": [
278
+ {
279
+ "name": "",
280
+ "type": "string"
281
+ }
282
+ ],
283
+ "payable": false,
284
+ "stateMutability": "view",
285
+ "type": "function",
286
+ "signature": "0x95d89b41"
287
+ },
288
+ {
289
+ "constant": true,
290
+ "inputs": [],
291
+ "name": "decimals",
292
+ "outputs": [
293
+ {
294
+ "name": "",
295
+ "type": "uint8"
296
+ }
297
+ ],
298
+ "payable": false,
299
+ "stateMutability": "view",
300
+ "type": "function",
301
+ "signature": "0x313ce567"
302
+ }
303
+ ]
304
+ ''')