defi-state-querier 0.5.9__py3-none-any.whl → 0.5.10__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/network_constants.py +24 -12
- defi_services/constants/ton_decimals_constant.py +1039 -0
- defi_services/jobs/processors/cosmos_state_processor.py +3 -0
- defi_services/jobs/processors/ton_state_processor.py +54 -0
- defi_services/jobs/queriers/ton_state_querier.py +34 -0
- defi_services/utils/ton_decode_address.py +11 -0
- {defi_state_querier-0.5.9.dist-info → defi_state_querier-0.5.10.dist-info}/METADATA +1 -1
- {defi_state_querier-0.5.9.dist-info → defi_state_querier-0.5.10.dist-info}/RECORD +12 -8
- {defi_state_querier-0.5.9.dist-info → defi_state_querier-0.5.10.dist-info}/WHEEL +1 -1
- {defi_state_querier-0.5.9.dist-info → defi_state_querier-0.5.10.dist-info}/LICENSE +0 -0
- {defi_state_querier-0.5.9.dist-info → defi_state_querier-0.5.10.dist-info}/top_level.txt +0 -0
defi_services/__init__.py
CHANGED
@@ -1 +1 @@
|
|
1
|
-
__version__ = "0.5.
|
1
|
+
__version__ = "0.5.10"
|
@@ -58,12 +58,13 @@ class Chains:
|
|
58
58
|
oasis_sapphire_testnet = '0x5aff'
|
59
59
|
blast = '0xee'
|
60
60
|
oraichain = 'orai'
|
61
|
+
ton = 'ton'
|
61
62
|
|
62
63
|
none_wrapped_token = [arbitrum, fantom, optimism]
|
63
64
|
all = [
|
64
65
|
bsc, ethereum, fantom, polygon, arbitrum, optimism,
|
65
66
|
avalanche, tron, cronos, solana, polkadot, bitcoin, cosmos,
|
66
|
-
oraichain
|
67
|
+
oraichain, ton
|
67
68
|
]
|
68
69
|
|
69
70
|
mapping = {
|
@@ -79,7 +80,8 @@ class Chains:
|
|
79
80
|
'solana': solana,
|
80
81
|
'polkadot': polkadot,
|
81
82
|
'oasis_sapphire': oasis_sapphire,
|
82
|
-
'oasis_sapphire_testnet': oasis_sapphire_testnet
|
83
|
+
'oasis_sapphire_testnet': oasis_sapphire_testnet,
|
84
|
+
'ton': ton
|
83
85
|
}
|
84
86
|
|
85
87
|
names = {
|
@@ -95,7 +97,8 @@ class Chains:
|
|
95
97
|
solana: 'solana',
|
96
98
|
polkadot: 'polkadot',
|
97
99
|
oasis_sapphire: 'oasis_sapphire',
|
98
|
-
oasis_sapphire_testnet: 'oasis_sapphire_testnet'
|
100
|
+
oasis_sapphire_testnet: 'oasis_sapphire_testnet',
|
101
|
+
ton: 'ton'
|
99
102
|
}
|
100
103
|
|
101
104
|
abi_mapping = {
|
@@ -116,7 +119,8 @@ class Chains:
|
|
116
119
|
fantom: 1,
|
117
120
|
polygon: 2,
|
118
121
|
arbitrum: 0.3,
|
119
|
-
avalanche: 2
|
122
|
+
avalanche: 2,
|
123
|
+
ton: 3
|
120
124
|
}
|
121
125
|
wrapped_native_token = {
|
122
126
|
bsc: "0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c",
|
@@ -127,7 +131,7 @@ class Chains:
|
|
127
131
|
optimism: "0x4200000000000000000000000000000000000006",
|
128
132
|
avalanche: "0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7",
|
129
133
|
tron: "0x891cdb91d149f23b1a45d9c5ca78a88d0cb44c18",
|
130
|
-
cronos: "0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23"
|
134
|
+
cronos: "0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",
|
131
135
|
}
|
132
136
|
|
133
137
|
evm = {
|
@@ -194,7 +198,8 @@ class Scans:
|
|
194
198
|
Chains.arbitrum: 'https://api.arbiscan.io/api',
|
195
199
|
Chains.optimism: 'https://api-optimistic.etherscan.io/api',
|
196
200
|
Chains.avalanche: 'https://api.snowtrace.io/api',
|
197
|
-
Chains.cronos: 'https://cronoscan.com/api'
|
201
|
+
Chains.cronos: 'https://cronoscan.com/api',
|
202
|
+
Chains.ton: 'https://toncenter.com/api/'
|
198
203
|
}
|
199
204
|
|
200
205
|
scan_base_urls = {
|
@@ -205,7 +210,8 @@ class Scans:
|
|
205
210
|
Chains.arbitrum: 'https://arbiscan.io/',
|
206
211
|
Chains.optimism: 'https://optimistic.etherscan.io/',
|
207
212
|
Chains.avalanche: 'https://snowtrace.io/',
|
208
|
-
Chains.cronos: 'https://cronoscan.com/'
|
213
|
+
Chains.cronos: 'https://cronoscan.com/',
|
214
|
+
Chains.ton: 'https://toncenter.com/api/'
|
209
215
|
}
|
210
216
|
|
211
217
|
all_base_urls = {
|
@@ -258,6 +264,7 @@ class Networks:
|
|
258
264
|
oasis_sapphire_testnet = 'oasis_sapphire_testnet'
|
259
265
|
cosmos = 'cosmos'
|
260
266
|
oraichain = 'oraichain'
|
267
|
+
ton = 'ton'
|
261
268
|
|
262
269
|
providers = {
|
263
270
|
bsc: os.getenv('BSC_PROVIDER_URI', 'https://bsc-dataseed1.binance.org/'),
|
@@ -272,7 +279,8 @@ class Networks:
|
|
272
279
|
solana: os.getenv('SOLANA_PROVIDER_URI', 'https://crimson-multi-putty.solana-mainnet.quiknode.pro/997174ce6ab5cc9d42cb037e931d18ae1a98346a/'),
|
273
280
|
polkadot: os.getenv('POLKADOT_PROVIDER_URI', 'https://late-yolo-diagram.dot-mainnet.quiknode.pro/51a1aaf2372854dfd211fca3ab375e5451222be4/'),
|
274
281
|
oasis_sapphire: os.getenv('OASIS_SAPPHIRE_PROVIDER_URI'),
|
275
|
-
oasis_sapphire_testnet: os.getenv('OASIS_SAPPHIRE_PROVIDER_URI')
|
282
|
+
oasis_sapphire_testnet: os.getenv('OASIS_SAPPHIRE_PROVIDER_URI'),
|
283
|
+
ton: os.getenv('TON_PROVIDER_URI')
|
276
284
|
}
|
277
285
|
|
278
286
|
archive_node = {
|
@@ -288,7 +296,8 @@ class Networks:
|
|
288
296
|
solana: os.getenv('SOLANA_PROVIDER_ARCHIVE_URI'),
|
289
297
|
polkadot: os.getenv('POLKADOT_PROVIDER_ARCHIVE_URI'),
|
290
298
|
oasis_sapphire: os.getenv('OASIS_SAPPHIRE_PROVIDER_ARCHIVE_URI'),
|
291
|
-
oasis_sapphire_testnet: 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/')
|
292
301
|
}
|
293
302
|
|
294
303
|
|
@@ -325,7 +334,8 @@ class DefiLlama:
|
|
325
334
|
'Moonriver': Chains.moonriver,
|
326
335
|
'Oasis Sapphire': Chains.oasis_sapphire,
|
327
336
|
'Blast': Chains.blast,
|
328
|
-
'Oraichain': Chains.oraichain
|
337
|
+
'Oraichain': Chains.oraichain,
|
338
|
+
'Ton': Chains.ton
|
329
339
|
}
|
330
340
|
|
331
341
|
|
@@ -341,7 +351,8 @@ class Opensea:
|
|
341
351
|
Chains.tron: 'TRON',
|
342
352
|
Chains.solana: 'SOLANA',
|
343
353
|
Chains.base: 'BASE',
|
344
|
-
Chains.klaytn: 'KLAYTN'
|
354
|
+
Chains.klaytn: 'KLAYTN',
|
355
|
+
Chains.ton: 'TON'
|
345
356
|
}
|
346
357
|
|
347
358
|
|
@@ -355,7 +366,8 @@ NATIVE_TOKENS = {
|
|
355
366
|
Chains.arbitrum: '0x0000000000000000000000000000000000000000',
|
356
367
|
Chains.optimism: '0x0000000000000000000000000000000000000000',
|
357
368
|
Chains.avalanche: '0x0000000000000000000000000000000000000000',
|
358
|
-
Chains.tron: '0x0000000000000000000000000000000000000000'
|
369
|
+
Chains.tron: '0x0000000000000000000000000000000000000000',
|
370
|
+
Chains.ton: 'EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAM9c'
|
359
371
|
}
|
360
372
|
|
361
373
|
|