defi-state-querier 0.5.19__py3-none-any.whl → 0.5.20__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/constants/chain_constant.py +6 -1
- defi_services/constants/network_constants.py +20 -361
- defi_services/constants/token_constant.py +3 -1
- defi_services/jobs/processors/cosmos_state_processor.py +3 -2
- defi_services/jobs/processors/ton_state_processor.py +4 -3
- defi_services/services/lending/aave_v2_services.py +3 -3
- defi_services/services/lending/granary_services.py +3 -3
- defi_services/services/lending/morpho_aave_v2_services.py +3 -3
- defi_services/services/lending/morpho_aave_v3_services.py +2 -2
- defi_services/services/lending/trava_services.py +2 -2
- defi_services/services/lending/uwu_services.py +3 -3
- defi_services/services/lending/valas_services.py +2 -2
- defi_services/services/multicall/multicall_v2.py +0 -317
- {defi_state_querier-0.5.19.dist-info → defi_state_querier-0.5.20.dist-info}/METADATA +1 -1
- {defi_state_querier-0.5.19.dist-info → defi_state_querier-0.5.20.dist-info}/RECORD +26 -26
- /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/__init__.py +0 -0
- /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/aave_v2_event_abi.py +0 -0
- /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/aave_v2_incentives_abi.py +0 -0
- /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/lending_pool_abi.py +0 -0
- /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/oracle_abi.py +0 -0
- /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/staked_incentives_abi.py +0 -0
- /defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/uwu_incentives_abi.py +0 -0
- {defi_state_querier-0.5.19.dist-info → defi_state_querier-0.5.20.dist-info}/LICENSE +0 -0
- {defi_state_querier-0.5.19.dist-info → defi_state_querier-0.5.20.dist-info}/WHEEL +0 -0
- {defi_state_querier-0.5.19.dist-info → defi_state_querier-0.5.20.dist-info}/top_level.txt +0 -0
defi_services/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.5.
|
1
|
+
__version__ = "0.5.20"
|
@@ -30,7 +30,12 @@ class Chain:
|
|
30
30
|
moonriver = '0x505'
|
31
31
|
blast = '0xee'
|
32
32
|
oasis_sapphire = '0x5afe'
|
33
|
-
|
33
|
+
zetachain = '0x1b58'
|
34
|
+
zksync = '0x144'
|
35
|
+
oraichain = 'orai'
|
36
|
+
bitcoin = 'bitcoin'
|
37
|
+
cosmos = 'cosmos'
|
38
|
+
ton = 'ton'
|
34
39
|
|
35
40
|
native_decimals = {
|
36
41
|
tron: 6,
|
@@ -1,8 +1,5 @@
|
|
1
|
-
import os
|
2
1
|
|
3
|
-
import
|
4
|
-
|
5
|
-
dotenv.load_dotenv()
|
2
|
+
from defi_services.constants.chain_constant import Chain
|
6
3
|
|
7
4
|
POLYGON_AAVE_ADDRESS = '0x8dff5e27ea6b7ac08ebfdf9eb090f32ee9a30fcf'
|
8
5
|
ETHEREUM_AAVE_ADDRESS = '0x7d2768de32b0b80b7a3454c06bdac94a69ddc7a9'
|
@@ -21,353 +18,18 @@ FTM_GEIST_ADDRESS = '0x9fad24f572045c7869117160a571b2e50b10d068'
|
|
21
18
|
ETH_COMPOUND_ADDRESS = '0x3d9819210a31b4961b30ef54be2aed79b9c9cd3b'
|
22
19
|
ETH_CREAM_ADDRESS = ''
|
23
20
|
|
24
|
-
|
25
|
-
class Chains:
|
26
|
-
bsc = '0x38'
|
27
|
-
ethereum = '0x1'
|
28
|
-
fantom = '0xfa'
|
29
|
-
polygon = '0x89'
|
30
|
-
arbitrum = '0xa4b1'
|
31
|
-
optimism = '0xa'
|
32
|
-
avalanche = '0xa86a'
|
33
|
-
tron = '0x2b6653dc'
|
34
|
-
cronos = '0x19'
|
35
|
-
solana = 'solana'
|
36
|
-
polkadot = 'polkadot'
|
37
|
-
bitcoin = 'bitcoin'
|
38
|
-
cosmos = 'cosmos'
|
39
|
-
base = '0x2105'
|
40
|
-
kava = '0x8ae'
|
41
|
-
gnosis = '0x64'
|
42
|
-
klaytn = '0x2019'
|
43
|
-
mantle = '0x1388'
|
44
|
-
celo = '0xa4ec'
|
45
|
-
moonbeam = '0x504'
|
46
|
-
manta = '0xa9'
|
47
|
-
pulse = '0x171'
|
48
|
-
rootstock = '0x1e'
|
49
|
-
astar = '0x250'
|
50
|
-
metis = '0x440'
|
51
|
-
canto = '0x1e14'
|
52
|
-
heco = '0x80'
|
53
|
-
linea = '0xe708'
|
54
|
-
okc = '0x42'
|
55
|
-
aurora = '0x4e454152'
|
56
|
-
moonriver = '0x505'
|
57
|
-
oasis_sapphire = '0x5afe'
|
58
|
-
oasis_sapphire_testnet = '0x5aff'
|
59
|
-
blast = '0xee'
|
60
|
-
oraichain = 'orai'
|
61
|
-
ton = 'ton'
|
62
|
-
|
63
|
-
none_wrapped_token = [arbitrum, fantom, optimism]
|
64
|
-
all = [
|
65
|
-
bsc, ethereum, fantom, polygon, arbitrum, optimism,
|
66
|
-
avalanche, tron, cronos, solana, polkadot, bitcoin, cosmos,
|
67
|
-
oraichain, ton
|
68
|
-
]
|
69
|
-
|
70
|
-
mapping = {
|
71
|
-
'bsc': bsc,
|
72
|
-
'ethereum': ethereum,
|
73
|
-
'fantom': fantom,
|
74
|
-
'polygon': polygon,
|
75
|
-
'arbitrum': arbitrum,
|
76
|
-
'optimism': optimism,
|
77
|
-
'avalanche': avalanche,
|
78
|
-
'tron': tron,
|
79
|
-
'cronos': cronos,
|
80
|
-
'solana': solana,
|
81
|
-
'polkadot': polkadot,
|
82
|
-
'oasis_sapphire': oasis_sapphire,
|
83
|
-
'oasis_sapphire_testnet': oasis_sapphire_testnet,
|
84
|
-
'ton': ton
|
85
|
-
}
|
86
|
-
|
87
|
-
names = {
|
88
|
-
bsc: 'bsc',
|
89
|
-
ethereum: "ethereum",
|
90
|
-
fantom: 'fantom',
|
91
|
-
polygon: 'polygon',
|
92
|
-
arbitrum: 'arbitrum',
|
93
|
-
optimism: 'optimism',
|
94
|
-
avalanche: 'avalanche',
|
95
|
-
tron: 'tron',
|
96
|
-
cronos: 'cronos',
|
97
|
-
solana: 'solana',
|
98
|
-
polkadot: 'polkadot',
|
99
|
-
oasis_sapphire: 'oasis_sapphire',
|
100
|
-
oasis_sapphire_testnet: 'oasis_sapphire_testnet',
|
101
|
-
ton: 'ton'
|
102
|
-
}
|
103
|
-
|
104
|
-
abi_mapping = {
|
105
|
-
bsc: 'bep20_abi',
|
106
|
-
ethereum: 'erc20_abi',
|
107
|
-
fantom: 'erc20_abi',
|
108
|
-
polygon: 'erc20_abi',
|
109
|
-
arbitrum: 'erc20_abi',
|
110
|
-
optimism: 'erc20_abi',
|
111
|
-
avalanche: 'erc20_abi',
|
112
|
-
tron: 'trc20_abi',
|
113
|
-
cronos: 'crc20_abi'
|
114
|
-
}
|
115
|
-
|
116
|
-
block_time = {
|
117
|
-
bsc: 3,
|
118
|
-
ethereum: 12,
|
119
|
-
fantom: 1,
|
120
|
-
polygon: 2,
|
121
|
-
arbitrum: 0.3,
|
122
|
-
avalanche: 2,
|
123
|
-
ton: 3
|
124
|
-
}
|
125
|
-
wrapped_native_token = {
|
126
|
-
bsc: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
|
127
|
-
ethereum: "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
|
128
|
-
polygon: "0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",
|
129
|
-
fantom: "0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",
|
130
|
-
arbitrum: "0x82af49447d8a07e3bd95bd0d56f35241523fbab1",
|
131
|
-
optimism: "0x4200000000000000000000000000000000000006",
|
132
|
-
avalanche: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7",
|
133
|
-
tron: "0x891cdb91d149f23b1a45d9c5ca78a88d0cb44c18",
|
134
|
-
cronos: "0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",
|
135
|
-
}
|
136
|
-
|
137
|
-
evm = {
|
138
|
-
ethereum: True, bsc: True, polygon: True, fantom: True,
|
139
|
-
arbitrum: True, optimism: True, avalanche: True, tron: True, cronos: True,
|
140
|
-
base: True, kava: True, gnosis: True, klaytn: True, mantle: True, celo: True, moonbeam: True, manta: True,
|
141
|
-
pulse: True, rootstock: True, astar: True, metis: True, canto: True, heco: True, linea: True, okc: True,
|
142
|
-
aurora: True, moonriver: True, oasis_sapphire: True, blast: True
|
143
|
-
}
|
144
|
-
|
145
|
-
def get_abi_name(self, chain_id):
|
146
|
-
"""Map chain_id with the corresponding abi key
|
147
|
-
e.g.: '0x38' -> 'bep20_abi' or '0x1' -> 'erc20_abi'
|
148
|
-
"""
|
149
|
-
return self.abi_mapping.get(chain_id, '')
|
150
|
-
|
151
|
-
|
152
|
-
class ChainsAnkr:
|
153
|
-
"""Chain name for Ankr API"""
|
154
|
-
bsc = '0x38'
|
155
|
-
eth = '0x1'
|
156
|
-
fantom = '0xfa'
|
157
|
-
polygon = '0x89'
|
158
|
-
|
159
|
-
reversed_mapping = {
|
160
|
-
bsc: 'bsc',
|
161
|
-
eth: 'eth',
|
162
|
-
fantom: 'fantom',
|
163
|
-
polygon: 'polygon',
|
164
|
-
}
|
165
|
-
|
166
|
-
def get_chain_name(self, chain_id):
|
167
|
-
return self.reversed_mapping.get(chain_id)
|
168
|
-
|
169
|
-
|
170
|
-
class Scans:
|
171
|
-
mapping = {
|
172
|
-
'bscscan': Chains.bsc,
|
173
|
-
'etherscan': Chains.ethereum,
|
174
|
-
'ftmscan': Chains.fantom,
|
175
|
-
'polygonscan': Chains.polygon,
|
176
|
-
'arbiscan': Chains.arbitrum,
|
177
|
-
'optimistic': Chains.optimism,
|
178
|
-
'snowtrace': Chains.avalanche,
|
179
|
-
'cronoscan': Chains.cronos
|
180
|
-
}
|
181
|
-
|
182
|
-
api_keys = {
|
183
|
-
Chains.bsc: 'GKRVTEQHSGWX335P21994DKNSTJVDYYXJ1',
|
184
|
-
Chains.ethereum: 'YQVXQAJAYNS7AC48ZXS1NT45RKYRPY7P7E',
|
185
|
-
Chains.fantom: 'Y85XY5DDDN4Z7C7Z4ZX8N62M5WET7D8NYC',
|
186
|
-
Chains.polygon: 'EYADI5Q4VK4VF99KFEJURMVE9CNE54YEYW',
|
187
|
-
Chains.arbitrum: 'BU5VN8872FE119RDX898MS5EZHE11FPZSC',
|
188
|
-
Chains.optimism: '1JW9PDV2HZZI3WRFQRVGWUDD2T1RV8GWX3',
|
189
|
-
Chains.avalanche: 'JWNM6Y5UA1499PWVA2T55MEH3TZDGAKJWJ',
|
190
|
-
Chains.cronos: 'F5J6423D42PM21CDP61SUD6H7DE4FXH2DE'
|
191
|
-
}
|
192
|
-
|
193
|
-
api_bases = {
|
194
|
-
Chains.bsc: 'https://api.bscscan.com/api',
|
195
|
-
Chains.ethereum: 'https://api.etherscan.io/api',
|
196
|
-
Chains.fantom: 'https://api.ftmscan.com/api',
|
197
|
-
Chains.polygon: 'https://api.polygonscan.com/api',
|
198
|
-
Chains.arbitrum: 'https://api.arbiscan.io/api',
|
199
|
-
Chains.optimism: 'https://api-optimistic.etherscan.io/api',
|
200
|
-
Chains.avalanche: 'https://api.snowtrace.io/api',
|
201
|
-
Chains.cronos: 'https://cronoscan.com/api',
|
202
|
-
Chains.ton: 'https://toncenter.com/api/'
|
203
|
-
}
|
204
|
-
|
205
|
-
scan_base_urls = {
|
206
|
-
Chains.ethereum: 'https://etherscan.io/',
|
207
|
-
Chains.bsc: 'https://bscscan.com/',
|
208
|
-
Chains.fantom: 'https://ftmscan.com/',
|
209
|
-
Chains.polygon: 'https://polygonscan.com/',
|
210
|
-
Chains.arbitrum: 'https://arbiscan.io/',
|
211
|
-
Chains.optimism: 'https://optimistic.etherscan.io/',
|
212
|
-
Chains.avalanche: 'https://snowtrace.io/',
|
213
|
-
Chains.cronos: 'https://cronoscan.com/',
|
214
|
-
Chains.ton: 'https://toncenter.com/api/'
|
215
|
-
}
|
216
|
-
|
217
|
-
all_base_urls = {
|
218
|
-
Chains.bsc: [
|
219
|
-
'https://bscscan.com/token',
|
220
|
-
'https://bscscan-com.translate.goog/token'
|
221
|
-
],
|
222
|
-
Chains.polygon: [
|
223
|
-
'https://polygonscan.com/token',
|
224
|
-
'https://polygonscan-com.translate.goog/token'
|
225
|
-
],
|
226
|
-
Chains.ethereum: [
|
227
|
-
'https://etherscan.io/token',
|
228
|
-
'https://etherscan-io.translate.goog/token',
|
229
|
-
],
|
230
|
-
Chains.fantom: [
|
231
|
-
'https://ftmscan.com/token',
|
232
|
-
'https://ftmscan-com.translate.goog/token'
|
233
|
-
],
|
234
|
-
Chains.arbitrum: [
|
235
|
-
# 'https://arbiscan-io.translate.goog/token',
|
236
|
-
'https://arbiscan.io/token'
|
237
|
-
],
|
238
|
-
Chains.optimism: [
|
239
|
-
# 'https://optimistic-etherscan-io.translate.goog/token',
|
240
|
-
'https://optimistic.etherscan.io/token'
|
241
|
-
],
|
242
|
-
# Chains.avalanche: [
|
243
|
-
# 'https://snowtrace.io/token'
|
244
|
-
# ],
|
245
|
-
Chains.cronos: ['https://cronoscan.com/token']
|
246
|
-
}
|
247
|
-
|
248
|
-
gg_translate_suffix = '?_x_tr_sl=vi&_x_tr_tl=en&_x_tr_hl=en&_x_tr_pto=wapp'
|
249
|
-
|
250
|
-
|
251
|
-
class Networks:
|
252
|
-
bsc = 'bsc'
|
253
|
-
ethereum = 'ethereum'
|
254
|
-
fantom = 'fantom'
|
255
|
-
polygon = 'polygon'
|
256
|
-
arbitrum = 'arbitrum'
|
257
|
-
optimism = 'optimism'
|
258
|
-
avalanche = 'avalanche'
|
259
|
-
tron = 'tron'
|
260
|
-
cronos = 'cronos'
|
261
|
-
solana = 'solana'
|
262
|
-
polkadot = 'polkadot'
|
263
|
-
oasis_sapphire = 'oasis_sapphire'
|
264
|
-
oasis_sapphire_testnet = 'oasis_sapphire_testnet'
|
265
|
-
cosmos = 'cosmos'
|
266
|
-
oraichain = 'oraichain'
|
267
|
-
ton = 'ton'
|
268
|
-
|
269
|
-
providers = {
|
270
|
-
bsc: os.getenv('BSC_PROVIDER_URI', 'https://bsc-dataseed1.binance.org/'),
|
271
|
-
ethereum: os.getenv('ETHEREUM_PROVIDER_URI', 'https://rpc.ankr.com/eth'),
|
272
|
-
fantom: os.getenv('FANTOM_PROVIDER_URI', 'https://rpc.ftm.tools/'),
|
273
|
-
polygon: os.getenv('POLYGON_PROVIDER_URI', 'https://polygon-rpc.com'),
|
274
|
-
arbitrum: os.getenv('ARBITRUM_PROVIDER_URI', 'https://endpoints.omniatech.io/v1/arbitrum/one/public'),
|
275
|
-
optimism: os.getenv('OPTIMISM_PROVIDER_URI', 'https://rpc.ankr.com/optimism'),
|
276
|
-
avalanche: os.getenv('AVALANCHE_PROVIDER_URI', 'https://rpc.ankr.com/avalanche'),
|
277
|
-
tron: os.getenv('TRON_PROVIDER_URI', 'https://rpc.ankr.com/tron_jsonrpc'),
|
278
|
-
cronos: os.getenv('CRONOS_PROVIDER_URI', 'https://evm.cronos.org/'),
|
279
|
-
solana: os.getenv('SOLANA_PROVIDER_URI', 'https://crimson-multi-putty.solana-mainnet.quiknode.pro/997174ce6ab5cc9d42cb037e931d18ae1a98346a/'),
|
280
|
-
polkadot: os.getenv('POLKADOT_PROVIDER_URI', 'https://late-yolo-diagram.dot-mainnet.quiknode.pro/51a1aaf2372854dfd211fca3ab375e5451222be4/'),
|
281
|
-
oasis_sapphire: os.getenv('OASIS_SAPPHIRE_PROVIDER_URI'),
|
282
|
-
oasis_sapphire_testnet: os.getenv('OASIS_SAPPHIRE_PROVIDER_URI'),
|
283
|
-
ton: os.getenv('TON_PROVIDER_URI')
|
284
|
-
}
|
285
|
-
|
286
|
-
archive_node = {
|
287
|
-
bsc: os.getenv('BSC_PROVIDER_ARCHIVE_URI', 'https://rpc.ankr.com/bsc'),
|
288
|
-
ethereum: os.getenv('ETHEREUM_PROVIDER_ARCHIVE_URI', 'https://rpc.ankr.com/eth'),
|
289
|
-
fantom: os.getenv('FANTOM_PROVIDER_ARCHIVE_URI', 'https://rpc.ankr.com/fantom'),
|
290
|
-
polygon: os.getenv('POLYGON_PROVIDER_ARCHIVE_URI', 'https://rpc.ankr.com/polygon'),
|
291
|
-
arbitrum: os.getenv('ARBITRUM_PROVIDER_ARCHIVE_URI', 'https://rpc.ankr.com/arbitrum'),
|
292
|
-
optimism: os.getenv('OPTIMISM_PROVIDER_ARCHIVE_URI', 'https://rpc.ankr.com/optimism'),
|
293
|
-
avalanche: os.getenv('AVALANCHE_PROVIDER_ARCHIVE_URI', 'https://rpc.ankr.com/avalanche'),
|
294
|
-
tron: os.getenv('TRON_PROVIDER_ARCHIVE_URI', 'https://rpc.ankr.com/tron_jsonrpc'),
|
295
|
-
cronos: os.getenv('CRONOS_PROVIDER_ARCHIVE_URI'),
|
296
|
-
solana: os.getenv('SOLANA_PROVIDER_ARCHIVE_URI'),
|
297
|
-
polkadot: os.getenv('POLKADOT_PROVIDER_ARCHIVE_URI'),
|
298
|
-
oasis_sapphire: os.getenv('OASIS_SAPPHIRE_PROVIDER_ARCHIVE_URI'),
|
299
|
-
oasis_sapphire_testnet: os.getenv('OASIS_SAPPHIRE_PROVIDER_ARCHIVE_URI'),
|
300
|
-
ton: os.getenv('TON_PROVIDER_ARCHIVE_URI', 'https://toncenter.com/api/')
|
301
|
-
}
|
302
|
-
|
303
|
-
|
304
|
-
class DefiLlama:
|
305
|
-
chains = {
|
306
|
-
'Binance': Chains.bsc,
|
307
|
-
'Ethereum': Chains.ethereum,
|
308
|
-
'Fantom': Chains.fantom,
|
309
|
-
'Polygon': Chains.polygon,
|
310
|
-
'Arbitrum': Chains.arbitrum,
|
311
|
-
'Optimism': Chains.optimism,
|
312
|
-
'Avalanche': Chains.avalanche,
|
313
|
-
'Tron': Chains.tron,
|
314
|
-
'Cronos': Chains.cronos,
|
315
|
-
'Solana': Chains.solana,
|
316
|
-
'Polkadot': Chains.polkadot,
|
317
|
-
'Base': Chains.base,
|
318
|
-
'Kava': Chains.kava,
|
319
|
-
'xDai': Chains.gnosis,
|
320
|
-
'Klaytn': Chains.klaytn,
|
321
|
-
'Mantle': Chains.mantle,
|
322
|
-
'Celo': Chains.celo,
|
323
|
-
'Moonbeam': Chains.moonbeam,
|
324
|
-
'Manta': Chains.manta,
|
325
|
-
'Pulse': Chains.pulse,
|
326
|
-
'RSK': Chains.rootstock,
|
327
|
-
'Astar': Chains.astar,
|
328
|
-
'Metis': Chains.metis,
|
329
|
-
'Canto': Chains.canto,
|
330
|
-
'Heco': Chains.heco,
|
331
|
-
'Linea': Chains.linea,
|
332
|
-
'OKExChain': Chains.okc,
|
333
|
-
'Aurora': Chains.aurora,
|
334
|
-
'Moonriver': Chains.moonriver,
|
335
|
-
'Oasis Sapphire': Chains.oasis_sapphire,
|
336
|
-
'Blast': Chains.blast,
|
337
|
-
'Oraichain': Chains.oraichain,
|
338
|
-
'Ton': Chains.ton
|
339
|
-
}
|
340
|
-
|
341
|
-
|
342
|
-
class Opensea:
|
343
|
-
chains = {
|
344
|
-
Chains.bsc: 'BSC',
|
345
|
-
Chains.ethereum: 'ETHEREUM',
|
346
|
-
Chains.polygon: 'MATIC',
|
347
|
-
Chains.fantom: 'FANTOM',
|
348
|
-
Chains.arbitrum: 'ARBITRUM',
|
349
|
-
Chains.optimism: 'OPTIMISM',
|
350
|
-
Chains.avalanche: 'AVALANCHE',
|
351
|
-
Chains.tron: 'TRON',
|
352
|
-
Chains.solana: 'SOLANA',
|
353
|
-
Chains.base: 'BASE',
|
354
|
-
Chains.klaytn: 'KLAYTN',
|
355
|
-
Chains.ton: 'TON'
|
356
|
-
}
|
357
|
-
|
358
|
-
|
359
21
|
NATIVE_TOKEN = '0x0000000000000000000000000000000000000000'
|
360
22
|
|
361
23
|
NATIVE_TOKENS = {
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
24
|
+
Chain.bsc: '0x0000000000000000000000000000000000000000',
|
25
|
+
Chain.ethereum: '0x0000000000000000000000000000000000000000',
|
26
|
+
Chain.fantom: '0x0000000000000000000000000000000000000000',
|
27
|
+
Chain.polygon: '0x0000000000000000000000000000000000000000',
|
28
|
+
Chain.arbitrum: '0x0000000000000000000000000000000000000000',
|
29
|
+
Chain.optimism: '0x0000000000000000000000000000000000000000',
|
30
|
+
Chain.avalanche: '0x0000000000000000000000000000000000000000',
|
31
|
+
Chain.tron: '0x0000000000000000000000000000000000000000',
|
32
|
+
Chain.ton: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c'
|
371
33
|
}
|
372
34
|
|
373
35
|
|
@@ -377,16 +39,16 @@ class MulticallContract:
|
|
377
39
|
"""
|
378
40
|
|
379
41
|
on_chains_v3 = {
|
380
|
-
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
42
|
+
Chain.ethereum: '0xca11bde05977b3631167028862be2a173976ca11',
|
43
|
+
Chain.bsc: '0xca11bde05977b3631167028862be2a173976ca11',
|
44
|
+
Chain.polygon: '0xca11bde05977b3631167028862be2a173976ca11',
|
45
|
+
Chain.avalanche: '0xca11bde05977b3631167028862be2a173976ca11',
|
46
|
+
Chain.fantom: '0xca11bde05977b3631167028862be2a173976ca11',
|
47
|
+
Chain.arbitrum: '0xca11bde05977b3631167028862be2a173976ca11',
|
48
|
+
Chain.optimism: '0xca11bde05977b3631167028862be2a173976ca11',
|
49
|
+
Chain.tron: '0x32a4f47a74a6810bd0bf861cabab99656a75de9e',
|
50
|
+
Chain.oasis_sapphire: '0xca11bde05977b3631167028862be2a173976ca11',
|
51
|
+
Chain.zksync: '0xf9cda624fbc7e059355ce98a31693d299facd963'
|
390
52
|
}
|
391
53
|
|
392
54
|
default_address = '0xca11bde05977b3631167028862be2a173976ca11'
|
@@ -394,6 +56,3 @@ class MulticallContract:
|
|
394
56
|
@classmethod
|
395
57
|
def get_multicall_contract(cls, chain_id):
|
396
58
|
return cls.on_chains_v3.get(chain_id, cls.default_address)
|
397
|
-
|
398
|
-
|
399
|
-
EMPTY_TOKEN_IMG = 'https://firebasestorage.googleapis.com/v0/b/token-c515a.appspot.com/o/tokens_v2%2Fempty-token.png?alt=media&token=2f9dfcc1-88a0-472c-a51f-4babc0c583f0'
|
@@ -45,7 +45,9 @@ class Token:
|
|
45
45
|
Chain.aurora: '0xc9bdeed33cd01541e1eed10f90519d2c06fe3feb',
|
46
46
|
Chain.moonriver: '0x98878b06940ae243284ca214f92bb71a2b032b8a',
|
47
47
|
Chain.blast: '0x4300000000000000000000000000000000000004',
|
48
|
-
Chain.oasis_sapphire: '0x8bc2b030b299964eefb5e1e0b36991352e56d2d3'
|
48
|
+
Chain.oasis_sapphire: '0x8bc2b030b299964eefb5e1e0b36991352e56d2d3',
|
49
|
+
Chain.zetachain: '0x5f0b1a82749cb4e2278ec87f8bf6b618dc71a8bf',
|
50
|
+
Chain.zksync: '0xf00dad97284d0c6f06dc4db3c32454d4292c6813'
|
49
51
|
}
|
50
52
|
|
51
53
|
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import logging
|
2
2
|
|
3
|
+
from defi_services.constants.chain_constant import Chain
|
3
4
|
from defi_services.constants.cosmos_decimals_constant import Denoms, MulticallContract
|
4
|
-
from defi_services.constants.network_constants import Chains
|
5
5
|
from defi_services.services.cosmos_token_services import CosmosTokenServices
|
6
6
|
|
7
7
|
logger = logging.getLogger("CosmosStateProcessor")
|
8
8
|
|
9
|
+
|
9
10
|
class CosmosStateProcessor:
|
10
|
-
def __init__(self, lcd: str, rest_uri: str = None, chain_id: str =
|
11
|
+
def __init__(self, lcd: str, rest_uri: str = None, chain_id: str = Chain.oraichain):
|
11
12
|
self.chain_id = chain_id
|
12
13
|
self.lcd = lcd
|
13
14
|
self.rest_uri = rest_uri
|
@@ -1,18 +1,19 @@
|
|
1
1
|
import logging
|
2
2
|
|
3
|
+
from defi_services.constants.chain_constant import Chain
|
3
4
|
from defi_services.constants.ton_decimals_constant import TonTokens
|
4
|
-
from defi_services.constants.network_constants import
|
5
|
+
from defi_services.constants.network_constants import NATIVE_TOKENS
|
5
6
|
from defi_services.jobs.queriers.ton_state_querier import TonStateQuerier
|
6
7
|
|
7
8
|
logger = logging.getLogger("CosmosStateProcessor")
|
8
9
|
|
10
|
+
|
9
11
|
class TonStateProcessor:
|
10
|
-
def __init__(self, provider_uri: str, chain_id: str =
|
12
|
+
def __init__(self, provider_uri: str, chain_id: str = Chain.ton):
|
11
13
|
self.chain_id = chain_id
|
12
14
|
self.provider_uri = provider_uri
|
13
15
|
self.state_querier = TonStateQuerier(self.provider_uri)
|
14
16
|
|
15
|
-
|
16
17
|
def get_token_balance(self, address, tokens):
|
17
18
|
result = {}
|
18
19
|
if NATIVE_TOKENS[self.chain_id] in tokens:
|
@@ -3,9 +3,9 @@ import time
|
|
3
3
|
|
4
4
|
from web3 import Web3
|
5
5
|
|
6
|
-
from defi_services.abis.lending.
|
7
|
-
from defi_services.abis.lending.
|
8
|
-
from defi_services.abis.lending.
|
6
|
+
from defi_services.abis.lending.aave_v2_and_forks.aave_v2_incentives_abi import AAVE_V2_INCENTIVES_ABI
|
7
|
+
from defi_services.abis.lending.aave_v2_and_forks.lending_pool_abi import LENDING_POOL_ABI
|
8
|
+
from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
|
9
9
|
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
10
10
|
from defi_services.constants.chain_constant import Chain
|
11
11
|
from defi_services.constants.db_constant import DBConst
|
@@ -3,9 +3,9 @@ import time
|
|
3
3
|
|
4
4
|
from web3 import Web3
|
5
5
|
|
6
|
-
from defi_services.abis.lending.
|
7
|
-
from defi_services.abis.lending.
|
8
|
-
from defi_services.abis.lending.
|
6
|
+
from defi_services.abis.lending.aave_v2_and_forks.aave_v2_incentives_abi import AAVE_V2_INCENTIVES_ABI
|
7
|
+
from defi_services.abis.lending.aave_v2_and_forks.lending_pool_abi import LENDING_POOL_ABI
|
8
|
+
from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
|
9
9
|
from defi_services.abis.lending.granary.granary_rewarder_abi import GRANARY_REWARDER_ABI
|
10
10
|
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
11
11
|
from defi_services.constants.chain_constant import Chain
|
@@ -3,9 +3,9 @@ import time
|
|
3
3
|
|
4
4
|
from web3 import Web3
|
5
5
|
|
6
|
-
from defi_services.abis.lending.
|
7
|
-
from defi_services.abis.lending.
|
8
|
-
from defi_services.abis.lending.
|
6
|
+
from defi_services.abis.lending.aave_v2_and_forks.aave_v2_incentives_abi import AAVE_V2_INCENTIVES_ABI
|
7
|
+
from defi_services.abis.lending.aave_v2_and_forks.lending_pool_abi import LENDING_POOL_ABI
|
8
|
+
from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
|
9
9
|
from defi_services.abis.lending.morpho.morpho_aave_v2_comptroller_abi import MORPHO_AAVE_V2_COMPTROLLER
|
10
10
|
from defi_services.abis.lending.morpho.morpho_aave_v2_lens_abi import MORPHO_AAVE_V2_LENS_ABI
|
11
11
|
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
@@ -3,8 +3,8 @@ import time
|
|
3
3
|
|
4
4
|
from web3 import Web3
|
5
5
|
|
6
|
-
from defi_services.abis.lending.
|
7
|
-
from defi_services.abis.lending.
|
6
|
+
from defi_services.abis.lending.aave_v2_and_forks.aave_v2_incentives_abi import AAVE_V2_INCENTIVES_ABI
|
7
|
+
from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
|
8
8
|
from defi_services.abis.lending.aave.aave_v3.aave_v3_lending_pool_abi import AAVE_V3_LENDING_POOL_ABI
|
9
9
|
from defi_services.abis.lending.morpho.morpho_aave_v3_comptroller_abi import MORPHO_AAVE_V3_COMPTROLLER_ABI
|
10
10
|
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
@@ -3,8 +3,8 @@ import time
|
|
3
3
|
|
4
4
|
from web3 import Web3
|
5
5
|
|
6
|
-
from defi_services.abis.lending.
|
7
|
-
from defi_services.abis.lending.
|
6
|
+
from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
|
7
|
+
from defi_services.abis.lending.aave_v2_and_forks.staked_incentives_abi import STAKED_INCENTIVES_ABI
|
8
8
|
from defi_services.abis.lending.trava.trava_lending_pool_abi import TRAVA_LENDING_POOL_ABI
|
9
9
|
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
10
10
|
from defi_services.constants.chain_constant import Chain
|
@@ -3,9 +3,9 @@ import time
|
|
3
3
|
|
4
4
|
from web3 import Web3
|
5
5
|
|
6
|
-
from defi_services.abis.lending.
|
7
|
-
from defi_services.abis.lending.
|
8
|
-
from defi_services.abis.lending.
|
6
|
+
from defi_services.abis.lending.aave_v2_and_forks.lending_pool_abi import LENDING_POOL_ABI
|
7
|
+
from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
|
8
|
+
from defi_services.abis.lending.aave_v2_and_forks.uwu_incentives_abi import UWU_INCENTIVES_ABI
|
9
9
|
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
10
10
|
from defi_services.constants.chain_constant import Chain
|
11
11
|
from defi_services.constants.entities.lending_constant import Lending
|
@@ -3,8 +3,8 @@ import time
|
|
3
3
|
|
4
4
|
from web3 import Web3
|
5
5
|
|
6
|
-
from defi_services.abis.lending.
|
7
|
-
from defi_services.abis.lending.
|
6
|
+
from defi_services.abis.lending.aave_v2_and_forks.lending_pool_abi import LENDING_POOL_ABI
|
7
|
+
from defi_services.abis.lending.aave_v2_and_forks.oracle_abi import ORACLE_ABI
|
8
8
|
from defi_services.abis.lending.valas.chef_incentives_controller import CHEF_INCENTIVES_CONTROLLER
|
9
9
|
from defi_services.abis.lending.valas.valas_multi_fee_distribution import VALAS_MULTI_FEE_DISTRIBUTION
|
10
10
|
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
@@ -1,17 +1,10 @@
|
|
1
|
-
import csv
|
2
|
-
import json
|
3
|
-
import time
|
4
1
|
from collections import defaultdict
|
5
2
|
from typing import Tuple, List, Union, Any, Optional, Dict
|
6
3
|
|
7
4
|
from query_state_lib.base.utils.decoder import decode_eth_call_data
|
8
|
-
from query_state_lib.client.client_querier import ClientQuerier
|
9
5
|
from web3 import Web3, contract
|
10
6
|
|
11
|
-
from defi_services.abis.dex.pancakeswap.pancakeswap_lp_token_abi import LP_TOKEN_ABI
|
12
7
|
from defi_services.abis.multicall_v3_abi import MULTICALL_V3_ABI
|
13
|
-
from defi_services.abis.token.erc20_abi import ERC20_ABI
|
14
|
-
from defi_services.constants.network_constants import MulticallContract, Chains, Networks
|
15
8
|
from defi_services.services.multicall.batch_queries_service import add_rpc_call, decode_data_response, \
|
16
9
|
decode_data_response_ignore_error
|
17
10
|
from defi_services.utils.dict_utils import all_equal
|
@@ -184,313 +177,3 @@ def decode_multical_response(w3_multicall: W3Multicall, data_responses, list_cal
|
|
184
177
|
batch_idx += 1
|
185
178
|
|
186
179
|
return results
|
187
|
-
|
188
|
-
|
189
|
-
def _test_multicall(_w3: Web3, multicall_contract, wallets, tokens):
|
190
|
-
start_time = time.time()
|
191
|
-
encode_time = 0
|
192
|
-
|
193
|
-
rpc_call_id = {}
|
194
|
-
|
195
|
-
n_calls = 0
|
196
|
-
data = {}
|
197
|
-
for wallet in wallets:
|
198
|
-
start_encode_time = time.time()
|
199
|
-
data[wallet] = {}
|
200
|
-
|
201
|
-
w3_multicall = W3Multicall(_w3, address=MulticallContract.get_multicall_contract(Chains.arbitrum))
|
202
|
-
for token in tokens:
|
203
|
-
# if token['address'] == '0x0000000000000000000000000000000000000000':
|
204
|
-
# continue
|
205
|
-
|
206
|
-
w3_multicall.add(W3Multicall.Call(
|
207
|
-
Web3.to_checksum_address(token['address']), # contract address
|
208
|
-
ERC20_ABI, # method signature to call
|
209
|
-
'balanceOf',
|
210
|
-
wallet
|
211
|
-
))
|
212
|
-
|
213
|
-
decimals_call = W3Multicall.Call(
|
214
|
-
Web3.to_checksum_address(token['address']), # contract address
|
215
|
-
ERC20_ABI, # method signature to call
|
216
|
-
'decimals'
|
217
|
-
)
|
218
|
-
if decimals_call not in rpc_call_id:
|
219
|
-
w3_multicall.add(decimals_call)
|
220
|
-
rpc_call_id[decimals_call] = None
|
221
|
-
|
222
|
-
encode_time += time.time() - start_encode_time
|
223
|
-
n_calls += len(w3_multicall.calls)
|
224
|
-
|
225
|
-
# For single call
|
226
|
-
inputs = w3_multicall.get_params()
|
227
|
-
response = multicall_contract.functions.tryAggregate(*inputs).call()
|
228
|
-
results = w3_multicall.decode(response)
|
229
|
-
|
230
|
-
for token in tokens:
|
231
|
-
# if token['address'] == '0x0000000000000000000000000000000000000000':
|
232
|
-
# continue
|
233
|
-
|
234
|
-
decimals_call_id = f'decimals_{token["address"]}_latest'.lower()
|
235
|
-
balance_call_id = f'balanceOf_{token["address"]}_{wallet}_latest'.lower()
|
236
|
-
|
237
|
-
decimals = results.get(decimals_call_id)
|
238
|
-
if decimals is None:
|
239
|
-
decimals = rpc_call_id.get(decimals_call_id) or 18
|
240
|
-
else:
|
241
|
-
rpc_call_id[decimals_call_id] = decimals
|
242
|
-
|
243
|
-
balance = results.get(balance_call_id)
|
244
|
-
if balance is None:
|
245
|
-
balance = rpc_call_id.get(balance_call_id) or 0
|
246
|
-
else:
|
247
|
-
rpc_call_id[balance_call_id] = balance
|
248
|
-
balance /= 10 ** decimals
|
249
|
-
|
250
|
-
data[wallet][token['address']] = {
|
251
|
-
'name': token['name'],
|
252
|
-
'symbol': token['symbol'],
|
253
|
-
'balance': balance,
|
254
|
-
'decimals': decimals
|
255
|
-
}
|
256
|
-
|
257
|
-
with open('results_multicall.json', 'w') as f:
|
258
|
-
json.dump(data, f, indent=2)
|
259
|
-
duration = time.time() - start_time
|
260
|
-
|
261
|
-
print(f'There are {n_calls} calls')
|
262
|
-
print(f'Encode took {round(encode_time, 3)}s')
|
263
|
-
print(f'Done after {round(duration, 3)}s')
|
264
|
-
|
265
|
-
return duration, encode_time, n_calls
|
266
|
-
|
267
|
-
|
268
|
-
def _test_state_querier(client_querier: ClientQuerier, wallets, tokens):
|
269
|
-
start_time = time.time()
|
270
|
-
|
271
|
-
list_call_id = []
|
272
|
-
list_rpc_call = []
|
273
|
-
|
274
|
-
for wallet in wallets:
|
275
|
-
for token in tokens:
|
276
|
-
if token['address'] == '0x0000000000000000000000000000000000000000':
|
277
|
-
continue
|
278
|
-
|
279
|
-
add_rpc_call(
|
280
|
-
abi=ERC20_ABI, contract_address=Web3.to_checksum_address(token['address']),
|
281
|
-
fn_name="balanceOf", fn_paras=wallet, block_number='latest',
|
282
|
-
list_call_id=list_call_id, list_rpc_call=list_rpc_call
|
283
|
-
)
|
284
|
-
add_rpc_call(
|
285
|
-
abi=ERC20_ABI, contract_address=Web3.to_checksum_address(token['address']),
|
286
|
-
fn_name="decimals", block_number='latest',
|
287
|
-
list_call_id=list_call_id, list_rpc_call=list_rpc_call
|
288
|
-
)
|
289
|
-
|
290
|
-
encode_time = time.time() - start_time
|
291
|
-
print(f'There are {len(list_rpc_call)} calls')
|
292
|
-
print(f'Encode took {round(encode_time, 3)}s')
|
293
|
-
|
294
|
-
responses = client_querier.sent_batch_to_provider(list_rpc_call, batch_size=2000)
|
295
|
-
decoded_data = decode_data_response_ignore_error(data_responses=responses, list_call_id=list_call_id)
|
296
|
-
|
297
|
-
data = {}
|
298
|
-
for wallet in wallets:
|
299
|
-
data[wallet] = {}
|
300
|
-
for token in tokens:
|
301
|
-
if token['address'] == '0x0000000000000000000000000000000000000000':
|
302
|
-
continue
|
303
|
-
|
304
|
-
decimals = decoded_data.get(f'decimals_{token["address"]}_latest'.lower())
|
305
|
-
balance = decoded_data.get(f'balanceOf_{token["address"]}_{wallet}_latest'.lower()) / 10 ** decimals
|
306
|
-
|
307
|
-
data[wallet][token['address']] = {
|
308
|
-
'name': token['name'],
|
309
|
-
'symbol': token['symbol'],
|
310
|
-
'balance': balance,
|
311
|
-
'decimals': decimals
|
312
|
-
}
|
313
|
-
|
314
|
-
with open('results_querier.json', 'w') as f:
|
315
|
-
json.dump(data, f, indent=2)
|
316
|
-
duration = time.time() - start_time
|
317
|
-
print(f'Done after {round(duration, 3)}s')
|
318
|
-
|
319
|
-
return duration, encode_time, len(list_rpc_call)
|
320
|
-
|
321
|
-
|
322
|
-
def _test_multicall_with_multiprocessing(_w3: Web3, client_querier: ClientQuerier, wallets, tokens):
|
323
|
-
start_time = time.time()
|
324
|
-
|
325
|
-
w3_multicall = W3Multicall(_w3, address=MulticallContract.get_multicall_contract(Chains.arbitrum))
|
326
|
-
for wallet in wallets:
|
327
|
-
for token in tokens:
|
328
|
-
# if token['address'] == '0x0000000000000000000000000000000000000000':
|
329
|
-
# continue
|
330
|
-
|
331
|
-
w3_multicall.add(W3Multicall.Call(
|
332
|
-
Web3.to_checksum_address(token['address']), # contract address
|
333
|
-
ERC20_ABI, # method signature to call
|
334
|
-
'balanceOf',
|
335
|
-
wallet
|
336
|
-
))
|
337
|
-
|
338
|
-
w3_multicall.add(W3Multicall.Call(
|
339
|
-
Web3.to_checksum_address(token['address']), # contract address
|
340
|
-
ERC20_ABI, # method signature to call
|
341
|
-
'decimals'
|
342
|
-
))
|
343
|
-
|
344
|
-
w3_multicall.add(W3Multicall.Call(
|
345
|
-
Web3.to_checksum_address(token['address']), # contract address
|
346
|
-
LP_TOKEN_ABI, # method signature to call
|
347
|
-
'token0'
|
348
|
-
))
|
349
|
-
|
350
|
-
list_call_id, list_rpc_call = [], []
|
351
|
-
add_rpc_multicall(w3_multicall, list_rpc_call=list_rpc_call, list_call_id=list_call_id)
|
352
|
-
|
353
|
-
encode_time = time.time() - start_time
|
354
|
-
|
355
|
-
responses = client_querier.sent_batch_to_provider(list_rpc_call, batch_size=1)
|
356
|
-
decoded_data = decode_multical_response(
|
357
|
-
w3_multicall=w3_multicall, data_responses=responses,
|
358
|
-
list_call_id=list_call_id, ignore_error=True
|
359
|
-
)
|
360
|
-
|
361
|
-
data = {}
|
362
|
-
for wallet in wallets:
|
363
|
-
data[wallet] = {}
|
364
|
-
for token in tokens:
|
365
|
-
# if token['address'] == '0x0000000000000000000000000000000000000000':
|
366
|
-
# continue
|
367
|
-
|
368
|
-
decimals_call_id = f'decimals_{token["address"]}_latest'.lower()
|
369
|
-
balance_call_id = f'balanceOf_{token["address"]}_{wallet}_latest'.lower()
|
370
|
-
|
371
|
-
decimals = decoded_data.get(decimals_call_id) or 18
|
372
|
-
balance = decoded_data.get(balance_call_id, 0) / 10 ** decimals
|
373
|
-
|
374
|
-
data[wallet][token['address']] = {
|
375
|
-
'name': token['name'],
|
376
|
-
'symbol': token['symbol'],
|
377
|
-
'balance': balance,
|
378
|
-
'decimals': decimals
|
379
|
-
}
|
380
|
-
|
381
|
-
with open('results_multicall_with_multiprocessing.json', 'w') as f:
|
382
|
-
json.dump(data, f, indent=2)
|
383
|
-
duration = time.time() - start_time
|
384
|
-
|
385
|
-
print(f'There are {len(w3_multicall.calls)} calls')
|
386
|
-
print(f'Encode took {round(encode_time, 3)}s')
|
387
|
-
print(f'Done after {round(duration, 3)}s')
|
388
|
-
|
389
|
-
return duration, encode_time, len(w3_multicall.calls)
|
390
|
-
|
391
|
-
|
392
|
-
def query_multi_contracts(n_times=20, wallets_batch_size=5, wallets_distribute_similar=True):
|
393
|
-
with open('../../../.data/wallets.json') as f:
|
394
|
-
wallets = json.load(f)
|
395
|
-
wallets = ['0x6FfA563915CB3186b9Dd206D0E08bdeDcd2EA2ED']
|
396
|
-
|
397
|
-
with open('../../../.data/tokens.json') as f:
|
398
|
-
tokens_ = json.load(f)
|
399
|
-
tokens_ = [
|
400
|
-
{
|
401
|
-
"address": "0xE2035f04040A135c4dA2f96AcA742143c57c79F9",
|
402
|
-
"name": "UXUY",
|
403
|
-
"symbol": "uxuy"
|
404
|
-
},
|
405
|
-
{
|
406
|
-
"address": "0xfd086bc7cd5c481dcc9c85ebe478a1c0b69fcbb9",
|
407
|
-
"name": "Tether",
|
408
|
-
"symbol": "usdt"
|
409
|
-
},
|
410
|
-
{
|
411
|
-
"address": "0x0000000000000000000000000000000000000000",
|
412
|
-
"name": "ETH",
|
413
|
-
"symbol": "ETH"
|
414
|
-
}
|
415
|
-
]
|
416
|
-
|
417
|
-
print(f'There are maximum {len(wallets)} wallets')
|
418
|
-
print(f'There are {len(tokens_)} tokens')
|
419
|
-
|
420
|
-
if wallets_distribute_similar:
|
421
|
-
wallets_batch = [wallets[:300], wallets[:300], wallets[:300]]
|
422
|
-
else:
|
423
|
-
wallets_batch = [wallets[:300], wallets[300:600], wallets[600:900]]
|
424
|
-
|
425
|
-
# Methodology 1: Query State Lib
|
426
|
-
start_time = time.time()
|
427
|
-
client_querier = ClientQuerier(provider_url=Networks.providers['arbitrum'])
|
428
|
-
starting_time_1 = time.time() - start_time
|
429
|
-
logger.info(f'Starting state querier: {round(starting_time_1, 3)}s')
|
430
|
-
|
431
|
-
_multiple(
|
432
|
-
n_times=n_times, starting_time=starting_time_1, filename='query_state_lib',
|
433
|
-
wallets=wallets_batch[0], wallets_batch_size=wallets_batch_size, tokens=tokens_, func=_test_state_querier,
|
434
|
-
client_querier=client_querier
|
435
|
-
)
|
436
|
-
|
437
|
-
# Methodology 2: Multicall
|
438
|
-
start_time = time.time()
|
439
|
-
_w3 = Web3(Web3.HTTPProvider(Networks.providers['arbitrum']))
|
440
|
-
starting_time_2_1 = time.time() - start_time
|
441
|
-
multicall_address = MulticallContract.get_multicall_contract(Chains.arbitrum)
|
442
|
-
multicall_contract = _w3.eth.contract(Web3.to_checksum_address(multicall_address), abi=MULTICALL_V3_ABI)
|
443
|
-
starting_time_2 = time.time() - start_time
|
444
|
-
logger.info(f'Starting multicall: {round(starting_time_2, 3)}s')
|
445
|
-
|
446
|
-
_multiple(
|
447
|
-
n_times=n_times, starting_time=starting_time_2, filename='multicall',
|
448
|
-
wallets=wallets_batch[1], wallets_batch_size=wallets_batch_size, tokens=tokens_, func=_test_multicall,
|
449
|
-
_w3=_w3, multicall_contract=multicall_contract
|
450
|
-
)
|
451
|
-
|
452
|
-
# Methodology 3: Combine Multicall with multiprocessing
|
453
|
-
starting_time_3 = starting_time_1 + starting_time_2_1
|
454
|
-
logger.info(f'Starting combined: {round(starting_time_3, 3)}s')
|
455
|
-
|
456
|
-
_multiple(
|
457
|
-
n_times=n_times, starting_time=starting_time_3, filename='combined',
|
458
|
-
wallets=wallets_batch[2], wallets_batch_size=wallets_batch_size, tokens=tokens_,
|
459
|
-
func=_test_multicall_with_multiprocessing, _w3=_w3, client_querier=client_querier
|
460
|
-
)
|
461
|
-
|
462
|
-
|
463
|
-
def _multiple(n_times, starting_time, filename, wallets, wallets_batch_size, tokens, func, *args, **kwargs):
|
464
|
-
data = [['Total Time', 'Encode Time']]
|
465
|
-
overview = {
|
466
|
-
'avg_total_time': 0, 'avg_encode_time': 0,
|
467
|
-
'times': 0, 'errors': 0,
|
468
|
-
'queries': 0, 'start_time': starting_time
|
469
|
-
}
|
470
|
-
for i in range(n_times):
|
471
|
-
idx = i * wallets_batch_size
|
472
|
-
sub_wallets = wallets[idx:idx + wallets_batch_size]
|
473
|
-
try:
|
474
|
-
total_time, encode_time, n_calls = func(wallets=sub_wallets, tokens=tokens, *args, **kwargs)
|
475
|
-
|
476
|
-
overview['queries'] = n_calls
|
477
|
-
data.append([total_time, encode_time])
|
478
|
-
overview['times'] += 1
|
479
|
-
except Exception as ex:
|
480
|
-
logger.exception(ex)
|
481
|
-
overview['errors'] += 1
|
482
|
-
finally:
|
483
|
-
time.sleep(13)
|
484
|
-
|
485
|
-
with open(f'results_{filename}.csv', 'w') as f:
|
486
|
-
writer = csv.writer(f)
|
487
|
-
writer.writerows(data)
|
488
|
-
|
489
|
-
overview['avg_total_time'] = sum([t[0] for t in data[1:]]) / overview['times']
|
490
|
-
overview['avg_encode_time'] = sum([t[1] for t in data[1:]]) / overview['times']
|
491
|
-
with open(f'overview_results_{filename}.json', 'w') as f:
|
492
|
-
json.dump(overview, f, indent=2)
|
493
|
-
|
494
|
-
|
495
|
-
if __name__ == '__main__':
|
496
|
-
query_multi_contracts(n_times=1, wallets_batch_size=1, wallets_distribute_similar=True)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
defi_services/__init__.py,sha256=
|
1
|
+
defi_services/__init__.py,sha256=lyuL7YYSa5adRq6V1WM7LqatnFIdxyUhDg6nA3gpgiw,23
|
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
|
@@ -73,13 +73,13 @@ defi_services/abis/lending/aave/gho/gho_discount_rate_strategy.py,sha256=8d9By2_
|
|
73
73
|
defi_services/abis/lending/aave/gho/gho_flash_minter.py,sha256=DVPpdW5D2PjsdUqz9A8z8FQf_DylvC6R1HJ3pwaEVto,6081
|
74
74
|
defi_services/abis/lending/aave/gho/gho_token.py,sha256=fUxGuKYNGmp4HlJ5n2jGabHCSzWYm49XLtkIRcHymxI,15229
|
75
75
|
defi_services/abis/lending/aave/gho/gho_variable_debt_token.py,sha256=NdJMoH-8wvQ8aOiwCjLgrpwsDDOv8R9fDMCC61id9IA,20924
|
76
|
-
defi_services/abis/lending/
|
77
|
-
defi_services/abis/lending/
|
78
|
-
defi_services/abis/lending/
|
79
|
-
defi_services/abis/lending/
|
80
|
-
defi_services/abis/lending/
|
81
|
-
defi_services/abis/lending/
|
82
|
-
defi_services/abis/lending/
|
76
|
+
defi_services/abis/lending/aave_v2_and_forks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
77
|
+
defi_services/abis/lending/aave_v2_and_forks/aave_v2_event_abi.py,sha256=rhR2cKMxALtoIDSpvP4Vr2dlSluN0axnU0DGQ181msE,5393
|
78
|
+
defi_services/abis/lending/aave_v2_and_forks/aave_v2_incentives_abi.py,sha256=fBKvb7hbv4JtFjwRrb28uT23PmViqMs6I1LqTaa12ms,10408
|
79
|
+
defi_services/abis/lending/aave_v2_and_forks/lending_pool_abi.py,sha256=-0n6RynouIW1HY8qFMbmk3nEFnv3w4kntd89gth6Log,29034
|
80
|
+
defi_services/abis/lending/aave_v2_and_forks/oracle_abi.py,sha256=a-41IwY7F5lAqAFyMHBDGi4PFZ4p6neVJcUvPvMYwzI,4399
|
81
|
+
defi_services/abis/lending/aave_v2_and_forks/staked_incentives_abi.py,sha256=kMgU2nWbEZEZ0Sj58Tc0lq4_HxrS2e6ISnEXNuhSaeA,13482
|
82
|
+
defi_services/abis/lending/aave_v2_and_forks/uwu_incentives_abi.py,sha256=eXB9wPJLDrB98nM2R8tCQni5cY1Wkk9dQfXboMhMoRs,10433
|
83
83
|
defi_services/abis/lending/aave_v3_forks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
84
84
|
defi_services/abis/lending/aave_v3_forks/aave_v3_incentives_abi.py,sha256=_iMYKmw1MJe73CugzxsqMFdSvYaCHEmREs6wssr33kQ,18201
|
85
85
|
defi_services/abis/lending/aave_v3_forks/aave_v3_lending_pool_abi.py,sha256=chBEC1BaB7cLmIc1qPPNsgfmmG72Rb2543sVgPfRcyI,38831
|
@@ -295,14 +295,14 @@ defi_services/abis/vault/lido/lido_withdrawl_queue.py,sha256=qKdsXQLKlNU3a_Nk68q
|
|
295
295
|
defi_services/abis/vault/lido/lido_wsteth.py,sha256=DJhMToJS43vV2r5WP2kZSiagt7R8MtKFT8u1xJBjZKU,8780
|
296
296
|
defi_services/abis/vault/lido/lidor_accounting_oracle_hash_consensus.py,sha256=TWCLaccDgvWJZZKLAeoznYgGi3g3M_hFqoo3KE_L7K8,21039
|
297
297
|
defi_services/constants/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
298
|
-
defi_services/constants/chain_constant.py,sha256
|
298
|
+
defi_services/constants/chain_constant.py,sha256=weJmKNr8JF3EE3HOzFGh4oUIlzv_8GN4zDtsWQWvqU8,1198
|
299
299
|
defi_services/constants/cosmos_decimals_constant.py,sha256=SjFkFbkvxVAk0jtok_1EaBh69ZE8S1fFAbVn6bdJO4s,13635
|
300
300
|
defi_services/constants/db_constant.py,sha256=gDMFFjhPOgQHuS9sPOTFbsfSdIfdWQEE4tGlxHQhNsE,2566
|
301
301
|
defi_services/constants/mongo_constant.py,sha256=qsDIq2Gg5MkBGaEOh4Fd9y6fOOidF4gGPnQwtaPon3E,398
|
302
|
-
defi_services/constants/network_constants.py,sha256=
|
302
|
+
defi_services/constants/network_constants.py,sha256=SFmnxOEPiexBooAUd5JkVSwP_GmF7IGrp86Z1yPsjCE,2430
|
303
303
|
defi_services/constants/query_constant.py,sha256=6HSK5IToUQpKLqmTeCgKf0npwmog7GWFUmQpz_mbkgY,1088
|
304
304
|
defi_services/constants/time_constant.py,sha256=bC-0pYnfIFFR_0iVvkxhfyHfOclWNw9O3DbdO_nh258,181
|
305
|
-
defi_services/constants/token_constant.py,sha256=
|
305
|
+
defi_services/constants/token_constant.py,sha256=sFlmEA9uiwyBePU5U61blXn3R7nCGKjQtlvq94ElwYo,5104
|
306
306
|
defi_services/constants/ton_decimals_constant.py,sha256=zMbbiIi2a9ZQSHEt8tLY0FnQtMi1qybkXMeFkKeEw3g,50657
|
307
307
|
defi_services/constants/entities/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
308
308
|
defi_services/constants/entities/dex_constant.py,sha256=oCt8RS-0KjFW5zR5IU1Ys49nYCCAraY8pTivOpXoyvs,343
|
@@ -316,13 +316,13 @@ defi_services/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
316
316
|
defi_services/jobs/tcv.py,sha256=Ngp6VWcH2n2ZCMTPu0TySxXQn_O6C2FDbvzVltEmH5Y,5707
|
317
317
|
defi_services/jobs/processors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
318
318
|
defi_services/jobs/processors/call_state_processor.py,sha256=WseX0OaMA5D_ANYofrz7W2BooSMdHlGRay4NuiABmM4,436
|
319
|
-
defi_services/jobs/processors/cosmos_state_processor.py,sha256=
|
319
|
+
defi_services/jobs/processors/cosmos_state_processor.py,sha256=ROXlF7KGHL0dUykbGpRi35qJwgjtPuPO60FQVB34N7c,1894
|
320
320
|
defi_services/jobs/processors/multi_call_state_processor.py,sha256=AksswGMSyStbnvkQcBVb0Y2tdpkUgc1CWoeSiMpGy8U,462
|
321
321
|
defi_services/jobs/processors/multi_state_processor.py,sha256=Od7Y8zPz7xj0L-_0YuK4wg_94fX8Q1PquuKUUYteIJU,5731
|
322
322
|
defi_services/jobs/processors/solana_state_processor.py,sha256=szsBYrkEV8kBzuA_iaSVescnwKJ2MHoTbut5kORbWTs,4065
|
323
323
|
defi_services/jobs/processors/state_processor.py,sha256=Ze_5isU_l_APB262E-VV_4KZwEG6W0XE6PikJZIcAoM,7291
|
324
324
|
defi_services/jobs/processors/substrate_state_processor.py,sha256=KkiY1NkaxnizNJBTfn4twB-zuQo3fT3akOlbie8VF5g,3940
|
325
|
-
defi_services/jobs/processors/ton_state_processor.py,sha256=
|
325
|
+
defi_services/jobs/processors/ton_state_processor.py,sha256=iKgY04iH0MHCwrJOqdApJseVHyXF2G4EhH-7SpO2KFw,2281
|
326
326
|
defi_services/jobs/queriers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
327
327
|
defi_services/jobs/queriers/call_state_querier.py,sha256=1aTPFwX28dY6SDQ7wHDAdwSGxYHMR7sZzaIJl8bJqZw,4880
|
328
328
|
defi_services/jobs/queriers/solana_state_querier.py,sha256=TQELYo6GUoF8s-LfetqYbclNaH8bakQqC7y2ifACIb8,3239
|
@@ -358,7 +358,7 @@ defi_services/services/dex/dex_info/uniswap_info.py,sha256=ffVWA6c-GRlmzBLzJXuKv
|
|
358
358
|
defi_services/services/eth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
359
359
|
defi_services/services/eth/eth_services.py,sha256=b6nEcgGHVFdRjqT2RZqvjfRuh56yjWgwLj74YNhiHGM,3719
|
360
360
|
defi_services/services/lending/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
361
|
-
defi_services/services/lending/aave_v2_services.py,sha256=
|
361
|
+
defi_services/services/lending/aave_v2_services.py,sha256=I3Z0FH8OLCiMmODzpu63F1x9vHnQMMOU9obhyUdOMKI,22300
|
362
362
|
defi_services/services/lending/aave_v3_services.py,sha256=9jogWv0zyZrSS7XLGFSgvNIvOCpBYXYbl32TBV5cH_U,16709
|
363
363
|
defi_services/services/lending/apeswap_services.py,sha256=UrLhXVzGvim_xfs54hSJ1qeTH6ber4xh01j5PWFl4C8,4737
|
364
364
|
defi_services/services/lending/compound_service.py,sha256=8r7pAs8KaaakDuHg4BUICW4zLD-ihm_DQETYwnAFc98,21917
|
@@ -366,21 +366,21 @@ defi_services/services/lending/compound_v3_services.py,sha256=wsUavP2LAJCxmr8A0M
|
|
366
366
|
defi_services/services/lending/cream_services.py,sha256=vtah0kMHAxztenWbJp4CxEcBMF0XUBglGRk6p9d-oiU,1644
|
367
367
|
defi_services/services/lending/flux_services.py,sha256=C9WJ2MIBK4xTaXIHF3yBVu52xGCNzO4Ed5DWyxWTTeE,12617
|
368
368
|
defi_services/services/lending/geist_services.py,sha256=UI5D-MbMqplrt7D4krSFdpaREKOT81k8boD_XhGGpUQ,1035
|
369
|
-
defi_services/services/lending/granary_services.py,sha256=
|
369
|
+
defi_services/services/lending/granary_services.py,sha256=oRjvwRo32lU7H4i8CLomXy5zACqP7CHLJtdrPO25vHQ,16460
|
370
370
|
defi_services/services/lending/iron_bank_service.py,sha256=GuXoXEbR4gkkNYfAyFkDtVeI3-knq3kFnLBeWVuUvv8,15585
|
371
371
|
defi_services/services/lending/justlend_service.py,sha256=az1OxDAqDKjT7jZ2CiNS4sfKXjhS04kD6FWB4ZT16mQ,8874
|
372
372
|
defi_services/services/lending/liqee_service.py,sha256=dBMlQpREqSzZY2_JCpJDxnWl9A8fWxa56KhsDNd--as,17140
|
373
|
-
defi_services/services/lending/morpho_aave_v2_services.py,sha256=
|
374
|
-
defi_services/services/lending/morpho_aave_v3_services.py,sha256=
|
373
|
+
defi_services/services/lending/morpho_aave_v2_services.py,sha256=C8mfClb_KVbSr08YReVjhPzP4FTurGsitE9a4isEMn8,8471
|
374
|
+
defi_services/services/lending/morpho_aave_v3_services.py,sha256=5p-_1rpFnjaY55gRJWxdQ1qHuKDrQDMY-6PdRDpfJIo,8268
|
375
375
|
defi_services/services/lending/morpho_compound_services.py,sha256=38AXwi-7yxSrRghS3OCRZrOy9cfJnC3k-yNf1Ep27Ds,14912
|
376
376
|
defi_services/services/lending/onyx_service.py,sha256=CqQcenVidyKYIxNlaTliaYmSI8zV7_zxK_wCQE5s-r4,15401
|
377
377
|
defi_services/services/lending/radiant_v2_services.py,sha256=FrdD518nJT_dO-XYNezYzm2yDEWBbpQlRJe5VZ09ORw,3147
|
378
378
|
defi_services/services/lending/silo_services.py,sha256=yLw90u_IXEqE3NbfhVAhG1y8qQqo26xSbYXXlh4lL3g,16726
|
379
379
|
defi_services/services/lending/spark_services.py,sha256=68_egY0yOT7YIOVbd8rbHJBJEsL0sOr0zSsTSdw0BUY,1042
|
380
380
|
defi_services/services/lending/strike_service.py,sha256=ZQ9B6Xngo64njwqABOO3CH-ESFmUmQWbisCgVXYKjak,13797
|
381
|
-
defi_services/services/lending/trava_services.py,sha256=
|
382
|
-
defi_services/services/lending/uwu_services.py,sha256=
|
383
|
-
defi_services/services/lending/valas_services.py,sha256=
|
381
|
+
defi_services/services/lending/trava_services.py,sha256=XakGhWzEcrEbKxPsAzZz-X8JVtMBkU2hem-AGWTHCvk,19101
|
382
|
+
defi_services/services/lending/uwu_services.py,sha256=umv1YKsFBrOybPgX69ybzzEVOkAsmIAT8YL3UWlaxEk,13842
|
383
|
+
defi_services/services/lending/valas_services.py,sha256=KlguY7dg58jK2LbJn79c6Tsu_gYmIlSLfC3U81YfI5E,22445
|
384
384
|
defi_services/services/lending/venus_services.py,sha256=LhSG2H16kZn8AqIS7DAOy0kxP8N2O_ZUAEl9Eho4Ujo,16523
|
385
385
|
defi_services/services/lending/wepiggy_services.py,sha256=x10QkYpn47wgNvmDeMGgmzJxv7WPte6hqR3MCBRgMbM,15684
|
386
386
|
defi_services/services/lending/lending_info/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -447,7 +447,7 @@ defi_services/services/lending/lending_info/tron/__init__.py,sha256=47DEQpj8HBSa
|
|
447
447
|
defi_services/services/lending/lending_info/tron/justlend_tron.py,sha256=2F4M8zFEE6-gqDKi82M-Xd6kcb2HP8-qmpNzDYorpXE,3741
|
448
448
|
defi_services/services/multicall/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
449
449
|
defi_services/services/multicall/batch_queries_service.py,sha256=HzgKOdkP6kpjR7gySD78aZfX2Bkln3JM3OQ8ehjGWx0,3457
|
450
|
-
defi_services/services/multicall/multicall_v2.py,sha256=
|
450
|
+
defi_services/services/multicall/multicall_v2.py,sha256=fKxq7Zv9gdaXaeS0kN_1ivgh-XJ_pQdVd9HuNl3ZZKo,6797
|
451
451
|
defi_services/services/multicall/state_query_service.py,sha256=1Ob5NX0tXmVUrSB1_mOvFBkOUA8KZJPwH2DMiHwlGhI,23709
|
452
452
|
defi_services/services/vault/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
453
453
|
defi_services/services/vault/tcv_vault_services.py,sha256=RPqp0jHviH0PY4AC5Eswowza_VL7YSovqADQT3WBzLk,3827
|
@@ -475,8 +475,8 @@ defi_services/utils/memory_storage.py,sha256=BOT8laB0iVSCGE-oDlpWJQLbSC6X2blKX4z
|
|
475
475
|
defi_services/utils/sqrt_price_math.py,sha256=9lgUeWFT4wjl3Vq3b7-jZ2bGvvZx7dDBSfVnM3lsZ8o,5575
|
476
476
|
defi_services/utils/thread_proxy.py,sha256=5Z8biAyEReUkh3vfJSvEv7GwMe3CsE5M8CbghkQtePw,2951
|
477
477
|
defi_services/utils/ton_decode_address.py,sha256=EWKwmC7KtbXpdKgiNK-5j-5lX7fCr17I4EWYs9b43eU,443
|
478
|
-
defi_state_querier-0.5.
|
479
|
-
defi_state_querier-0.5.
|
480
|
-
defi_state_querier-0.5.
|
481
|
-
defi_state_querier-0.5.
|
482
|
-
defi_state_querier-0.5.
|
478
|
+
defi_state_querier-0.5.20.dist-info/LICENSE,sha256=6jmfxa8nUIwfKnzZUxAHJSJ_IS7h7mpbJq26cWjoo-o,1063
|
479
|
+
defi_state_querier-0.5.20.dist-info/METADATA,sha256=Gfty41LlOw2obmoLXWvGfQ2BPE4kLC_HhiWmOccSJEc,4413
|
480
|
+
defi_state_querier-0.5.20.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
481
|
+
defi_state_querier-0.5.20.dist-info/top_level.txt,sha256=C-OTxHK6MknKK-nAbEzCPDUl1M6pktRhgJrmsozdf6g,14
|
482
|
+
defi_state_querier-0.5.20.dist-info/RECORD,,
|
File without changes
|
File without changes
|
/defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/aave_v2_incentives_abi.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
/defi_services/abis/lending/{aave_v2_and_forlks → aave_v2_and_forks}/staked_incentives_abi.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|