blockapi 2.10.5__tar.gz → 2.11.0__tar.gz
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.
- {blockapi-2.10.5 → blockapi-2.11.0}/PKG-INFO +1 -1
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/test_blockchain_mapping.py +0 -84
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/debank.py +5 -18
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/blockchain_mapping.py +0 -95
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi.egg-info/PKG-INFO +1 -1
- {blockapi-2.10.5 → blockapi-2.11.0}/setup.py +1 -1
- {blockapi-2.10.5 → blockapi-2.11.0}/LICENSE.md +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/README.md +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/services.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/test_blockapi.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/test_num.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/test_random_user_agent.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/conftest.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/covalenth/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/covalenth/test_ethereum.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/fake_sleep_provider.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/nft/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/nft/test_magic_eden.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/nft/test_opensea.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/nft/test_simple_hash.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/nft/test_unisat.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_bitaps_ltc.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_blockchain_info.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_blockchainos.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_blockchair_btc.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_blockchair_doge.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_blockchair_ltc.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_cosmos.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_ethplorer.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_haskoin.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_litecoinspace.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_multisources.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_optimistic_etherscan.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_solana.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_subscan_polkadot.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_sui.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_terra.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_trezor_btc.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/api/test_trezor_zec.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/test_base.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/test_blockchain_api.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/test_data.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/test_enumerate_classes.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/test_generic.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test/v2/test_models.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/test_data.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/utils/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/utils/address.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/utils/datetime.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/utils/num.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/utils/user_agent.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/bitaps.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/blockchain_info.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/blockchainos.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/blockchair.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/cosmos.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/arbitrum.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/astar.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/avalanche.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/axie.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/base.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/binance_smart_chain.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/ethereum.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/fantom.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/heco.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/iotex.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/klaytn.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/moonbeam.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/palm.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/polygon.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/covalenth/rsk.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/debank_maps.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/ethplorer.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/haskoin.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/litecoinspace.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/nft/__init__.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/nft/magic_eden.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/nft/opensea.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/nft/simple_hash.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/nft/unisat.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/optimistic_etherscan.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/solana.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/subscan.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/sui.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/terra.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/api/trezor.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/base.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/coin_mapping.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/coins.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi/v2/models.py +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi.egg-info/SOURCES.txt +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi.egg-info/dependency_links.txt +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi.egg-info/requires.txt +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/blockapi.egg-info/top_level.txt +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/pyproject.toml +0 -0
- {blockapi-2.10.5 → blockapi-2.11.0}/setup.cfg +0 -0
|
@@ -3,7 +3,6 @@ import pytest
|
|
|
3
3
|
from blockapi.v2.blockchain_mapping import (
|
|
4
4
|
get_blockchain_from_chain_id,
|
|
5
5
|
get_blockchain_from_coingecko_chain,
|
|
6
|
-
get_blockchain_from_debank_chain,
|
|
7
6
|
get_blockchain_from_rango_chain,
|
|
8
7
|
)
|
|
9
8
|
from blockapi.v2.models import Blockchain
|
|
@@ -150,86 +149,3 @@ def test_map_coingecko(chain: str, expected: Blockchain):
|
|
|
150
149
|
|
|
151
150
|
def test_map_by_id():
|
|
152
151
|
assert get_blockchain_from_chain_id(1) == Blockchain.ETHEREUM
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
@pytest.mark.parametrize(
|
|
156
|
-
'chain,expected',
|
|
157
|
-
[
|
|
158
|
-
('a8', Blockchain.ANCIENT8),
|
|
159
|
-
('ace', Blockchain.ENDURANCE),
|
|
160
|
-
('ailayer', Blockchain.AI_LAYER),
|
|
161
|
-
('alienx', Blockchain.ALIEN_X),
|
|
162
|
-
('alot', Blockchain.DEX_ALOT),
|
|
163
|
-
('ape', Blockchain.APE),
|
|
164
|
-
('apex', Blockchain.PROOF_OF_PLAY_APEX),
|
|
165
|
-
('aura', Blockchain.AURA),
|
|
166
|
-
('aze', Blockchain.ASTAR_ZKEVM),
|
|
167
|
-
('b2', Blockchain.B2),
|
|
168
|
-
('bb', Blockchain.BOUNCE_BIT),
|
|
169
|
-
('bevm', Blockchain.BEVM),
|
|
170
|
-
('bfc', Blockchain.BIFROST),
|
|
171
|
-
('bob', Blockchain.BOB),
|
|
172
|
-
('brise', Blockchain.BITGERT),
|
|
173
|
-
('btr', Blockchain.BIT_LAYER),
|
|
174
|
-
('cfx', Blockchain.CONFLUX),
|
|
175
|
-
('ckb', Blockchain.GODWOKEN),
|
|
176
|
-
('combo', Blockchain.COMBO),
|
|
177
|
-
('croze', Blockchain.CRONOS_ZKEVM),
|
|
178
|
-
('cyber', Blockchain.CYBER),
|
|
179
|
-
('dbk', Blockchain.DBK),
|
|
180
|
-
('degen', Blockchain.DEGEN),
|
|
181
|
-
('doge', Blockchain.DOGECHAIN),
|
|
182
|
-
('dym', Blockchain.DYMENSION),
|
|
183
|
-
('ela', Blockchain.ELASTOS),
|
|
184
|
-
('eon', Blockchain.HORIZEN_EON),
|
|
185
|
-
('era', Blockchain.ZKSYNC_ERA),
|
|
186
|
-
('ethlink', Blockchain.ETHERLINK),
|
|
187
|
-
('fon', Blockchain.FON_CHAIN),
|
|
188
|
-
('frax', Blockchain.FRAXTAL),
|
|
189
|
-
('fx', Blockchain.FUNCTION_X),
|
|
190
|
-
('iota', Blockchain.IOTA_EVM),
|
|
191
|
-
('itze', Blockchain.IMMUTABLE),
|
|
192
|
-
('karak', Blockchain.KARAK),
|
|
193
|
-
('kroma', Blockchain.KROMA),
|
|
194
|
-
('lumio', Blockchain.SUPER_LUMIO),
|
|
195
|
-
('lyra', Blockchain.DERIVE),
|
|
196
|
-
('mada', Blockchain.MILKOMEDA_C1),
|
|
197
|
-
('manta', Blockchain.MANTA_PACIFIC),
|
|
198
|
-
('map', Blockchain.MAP_PROTOCOL),
|
|
199
|
-
('merlin', Blockchain.MERLIN_CHAIN),
|
|
200
|
-
('mint', Blockchain.MINT),
|
|
201
|
-
('molten', Blockchain.MOLTEN),
|
|
202
|
-
('morph', Blockchain.MORPH),
|
|
203
|
-
('neon', Blockchain.NEON_EVM),
|
|
204
|
-
('nova', Blockchain.ARBITRUM_NOVA),
|
|
205
|
-
('orderly', Blockchain.ORDERLY),
|
|
206
|
-
('platon', Blockchain.PLAT_ON),
|
|
207
|
-
('pze', Blockchain.POLYGON_ZK_EVM),
|
|
208
|
-
('reya', Blockchain.REYA),
|
|
209
|
-
('rsk', Blockchain.RSK),
|
|
210
|
-
('savm', Blockchain.SATOSHI_VM_ALPHA),
|
|
211
|
-
('scrl', Blockchain.SCROLL),
|
|
212
|
-
('sei', Blockchain.SEI),
|
|
213
|
-
('shape', Blockchain.SHAPE),
|
|
214
|
-
('shib', Blockchain.SHIBARIUM),
|
|
215
|
-
('smr', Blockchain.SHIMMER_EVM),
|
|
216
|
-
('sonic', Blockchain.SONIC),
|
|
217
|
-
('step', Blockchain.STEP_NETWORK),
|
|
218
|
-
('strax', Blockchain.STRATIS),
|
|
219
|
-
('swell', Blockchain.SWELL),
|
|
220
|
-
('sx', Blockchain.SX_NETWORK),
|
|
221
|
-
('taiko', Blockchain.TAIKO),
|
|
222
|
-
('tomb', Blockchain.TOMBCHAIN),
|
|
223
|
-
('ulx', Blockchain.ULTRON),
|
|
224
|
-
('world', Blockchain.WORLD_CHAIN),
|
|
225
|
-
('wyzth', Blockchain.WYZTH),
|
|
226
|
-
('xlayer', Blockchain.X_LAYER),
|
|
227
|
-
('zero', Blockchain.ZERO),
|
|
228
|
-
('zeta', Blockchain.ZETA_CHAIN),
|
|
229
|
-
('zircuit', Blockchain.ZIRCUIT),
|
|
230
|
-
('zklink', Blockchain.ZKLINK_NOVA),
|
|
231
|
-
('gravity', Blockchain.GRAVITY),
|
|
232
|
-
],
|
|
233
|
-
)
|
|
234
|
-
def test_map_debank(chain: str, expected: Blockchain):
|
|
235
|
-
assert get_blockchain_from_debank_chain(chain) == expected
|
|
@@ -24,7 +24,6 @@ from blockapi.v2.base import (
|
|
|
24
24
|
IPortfolio,
|
|
25
25
|
ISleepProvider,
|
|
26
26
|
)
|
|
27
|
-
from blockapi.v2.blockchain_mapping import get_blockchain_from_debank_chain
|
|
28
27
|
from blockapi.v2.coin_mapping import symbol_to_coin_map
|
|
29
28
|
from blockapi.v2.models import (
|
|
30
29
|
AssetType,
|
|
@@ -161,7 +160,7 @@ class DebankModelChain(BaseModel):
|
|
|
161
160
|
|
|
162
161
|
|
|
163
162
|
class DebankChain(BaseModel):
|
|
164
|
-
chain:
|
|
163
|
+
chain: str
|
|
165
164
|
community_id: int
|
|
166
165
|
name: str
|
|
167
166
|
logo_url: str
|
|
@@ -180,11 +179,9 @@ class DebankProtocolParser:
|
|
|
180
179
|
|
|
181
180
|
@staticmethod
|
|
182
181
|
def parse_item(item: DebankModelProtocol) -> Optional[Protocol]:
|
|
183
|
-
blockchain = get_blockchain_from_debank_chain(item.chain) or item.chain
|
|
184
|
-
|
|
185
182
|
return Protocol.from_api(
|
|
186
183
|
protocol_id=item.id,
|
|
187
|
-
chain=
|
|
184
|
+
chain=item.chain,
|
|
188
185
|
name=item.name,
|
|
189
186
|
user_deposit=item.tvl,
|
|
190
187
|
site_url=item.site_url,
|
|
@@ -204,16 +201,9 @@ class DebankChainParser:
|
|
|
204
201
|
return list(sorted(chains, key=lambda x: x.name))
|
|
205
202
|
|
|
206
203
|
@staticmethod
|
|
207
|
-
def parse_item(item: DebankModelChain) ->
|
|
208
|
-
blockchain = get_blockchain_from_debank_chain(item.id)
|
|
209
|
-
if not blockchain:
|
|
210
|
-
logger.warning(
|
|
211
|
-
f'No blockchain found for debank chain {item.id} ({item.name}, {item.community_id}). Skipping.'
|
|
212
|
-
)
|
|
213
|
-
return None
|
|
214
|
-
|
|
204
|
+
def parse_item(item: DebankModelChain) -> DebankChain:
|
|
215
205
|
return DebankChain(
|
|
216
|
-
chain=
|
|
206
|
+
chain=item.id,
|
|
217
207
|
community_id=item.community_id,
|
|
218
208
|
name=item.name,
|
|
219
209
|
logo_url=item.logo_url,
|
|
@@ -354,9 +344,7 @@ class DebankBalanceParser:
|
|
|
354
344
|
|
|
355
345
|
def get_coin(self, balance_item: DebankModelBalanceItem) -> Coin:
|
|
356
346
|
contract = balance_item.id
|
|
357
|
-
blockchain =
|
|
358
|
-
get_blockchain_from_debank_chain(balance_item.chain) or balance_item.chain
|
|
359
|
-
)
|
|
347
|
+
blockchain = balance_item.chain
|
|
360
348
|
symbol = self.get_symbol(balance_item)
|
|
361
349
|
|
|
362
350
|
coingecko_id = get_coingecko_id(contract, symbol)
|
|
@@ -608,7 +596,6 @@ class DebankPortfolioParser:
|
|
|
608
596
|
|
|
609
597
|
|
|
610
598
|
class DebankAppParser:
|
|
611
|
-
|
|
612
599
|
def parse(self, response: list) -> list[DebankApp]:
|
|
613
600
|
if not response:
|
|
614
601
|
return []
|
|
@@ -5,97 +5,6 @@ from blockapi.v2.models import Blockchain
|
|
|
5
5
|
|
|
6
6
|
logger = logging.getLogger(__name__)
|
|
7
7
|
|
|
8
|
-
DEBANK_BLOCKCHAINS_MAP = {
|
|
9
|
-
'a8': Blockchain.ANCIENT8,
|
|
10
|
-
'abs': Blockchain.ABSTRACT,
|
|
11
|
-
'ace': Blockchain.ENDURANCE,
|
|
12
|
-
'ailayer': Blockchain.AI_LAYER,
|
|
13
|
-
'alot': Blockchain.DEX_ALOT,
|
|
14
|
-
'apex': Blockchain.PROOF_OF_PLAY_APEX,
|
|
15
|
-
'arb': Blockchain.ARBITRUM,
|
|
16
|
-
'avax': Blockchain.AVALANCHE,
|
|
17
|
-
'aze': Blockchain.ASTAR_ZKEVM,
|
|
18
|
-
'bb': Blockchain.BOUNCE_BIT,
|
|
19
|
-
'bera': Blockchain.BERACHAIN,
|
|
20
|
-
'bfc': Blockchain.BIFROST,
|
|
21
|
-
'boba': Blockchain.BOBA,
|
|
22
|
-
'brise': Blockchain.BITGERT,
|
|
23
|
-
'bsc': Blockchain.BINANCE_SMART_CHAIN,
|
|
24
|
-
'btr': Blockchain.BIT_LAYER,
|
|
25
|
-
'btt': Blockchain.BIT_TORRENT,
|
|
26
|
-
'cfx': Blockchain.CONFLUX,
|
|
27
|
-
'ckb': Blockchain.GODWOKEN,
|
|
28
|
-
'core': Blockchain.CORE_CHAIN,
|
|
29
|
-
'cro': Blockchain.CRONOS,
|
|
30
|
-
'croze': Blockchain.CRONOS_ZKEVM,
|
|
31
|
-
'dfk': Blockchain.DEFI_KINGDOMS,
|
|
32
|
-
'doge': Blockchain.DOGECHAIN,
|
|
33
|
-
'dym': Blockchain.DYMENSION,
|
|
34
|
-
'ela': Blockchain.ELASTOS,
|
|
35
|
-
'eon': Blockchain.HORIZEN_EON,
|
|
36
|
-
'era': Blockchain.ZKSYNC_ERA,
|
|
37
|
-
'etc': Blockchain.ETHEREUM_CLASSIC,
|
|
38
|
-
'eth': Blockchain.ETHEREUM,
|
|
39
|
-
'ethlink': Blockchain.ETHERLINK,
|
|
40
|
-
'evmos': Blockchain.COSMOS,
|
|
41
|
-
'hyper': Blockchain.HYPEREVM,
|
|
42
|
-
'flr': Blockchain.FLARE,
|
|
43
|
-
'fon': Blockchain.FON_CHAIN,
|
|
44
|
-
'frax': Blockchain.FRAXTAL,
|
|
45
|
-
'fsn': Blockchain.FUSION_NETWORK,
|
|
46
|
-
'ftm': Blockchain.FANTOM,
|
|
47
|
-
'fx': Blockchain.FUNCTION_X,
|
|
48
|
-
'hmy': Blockchain.HARMONY,
|
|
49
|
-
'iota': Blockchain.IOTA_EVM,
|
|
50
|
-
'iotx': Blockchain.IOTEX,
|
|
51
|
-
'itze': Blockchain.IMMUTABLE,
|
|
52
|
-
'kcc': Blockchain.KUCOIN,
|
|
53
|
-
'klay': Blockchain.KLAY_TOKEN,
|
|
54
|
-
'lumio': Blockchain.SUPER_LUMIO,
|
|
55
|
-
'lyra': Blockchain.DERIVE,
|
|
56
|
-
'lyx': Blockchain.LUKSO,
|
|
57
|
-
'mada': Blockchain.MILKOMEDA_C1,
|
|
58
|
-
'manta': Blockchain.MANTA_PACIFIC,
|
|
59
|
-
'map': Blockchain.MAP_PROTOCOL,
|
|
60
|
-
'matic': Blockchain.POLYGON,
|
|
61
|
-
'merlin': Blockchain.MERLIN_CHAIN,
|
|
62
|
-
'metis': Blockchain.METIS_ANDROMEDA,
|
|
63
|
-
'mnt': Blockchain.MANTLE,
|
|
64
|
-
'mobm': Blockchain.MOONBEAM,
|
|
65
|
-
'movr': Blockchain.MOONRIVER,
|
|
66
|
-
'mtr': Blockchain.METER,
|
|
67
|
-
'neon': Blockchain.NEON_EVM,
|
|
68
|
-
'nova': Blockchain.ARBITRUM_NOVA,
|
|
69
|
-
'oas': Blockchain.OASYS,
|
|
70
|
-
'op': Blockchain.OPTIMISM,
|
|
71
|
-
'opbnb': Blockchain.OPTIMISTIC_BNB,
|
|
72
|
-
'platon': Blockchain.PLAT_ON,
|
|
73
|
-
'pls': Blockchain.PULSE,
|
|
74
|
-
'pze': Blockchain.POLYGON_ZK_EVM,
|
|
75
|
-
'ron': Blockchain.RONIN,
|
|
76
|
-
'rose': Blockchain.OASIS_EMERALD,
|
|
77
|
-
'savm': Blockchain.SATOSHI_VM_ALPHA,
|
|
78
|
-
'sbch': Blockchain.SMART_BITCOIN_CASH,
|
|
79
|
-
'scrl': Blockchain.SCROLL,
|
|
80
|
-
'sdn': Blockchain.SHIDEN_NETWORK,
|
|
81
|
-
'sgb': Blockchain.SONGBIRD,
|
|
82
|
-
'shib': Blockchain.SHIBARIUM,
|
|
83
|
-
'smr': Blockchain.SHIMMER_EVM,
|
|
84
|
-
'step': Blockchain.STEP_NETWORK,
|
|
85
|
-
'strax': Blockchain.STRATIS,
|
|
86
|
-
'sx': Blockchain.SX_NETWORK,
|
|
87
|
-
'tlos': Blockchain.TELOS,
|
|
88
|
-
'tomb': Blockchain.TOMBCHAIN,
|
|
89
|
-
'ulx': Blockchain.ULTRON,
|
|
90
|
-
'uni': Blockchain.UNICHAIN,
|
|
91
|
-
'wan': Blockchain.WANCHAIN,
|
|
92
|
-
'wemix': Blockchain.WEMIX_NETWORK,
|
|
93
|
-
'world': Blockchain.WORLD_CHAIN,
|
|
94
|
-
'xlayer': Blockchain.X_LAYER,
|
|
95
|
-
'zeta': Blockchain.ZETA_CHAIN,
|
|
96
|
-
'zklink': Blockchain.ZKLINK_NOVA,
|
|
97
|
-
}
|
|
98
|
-
|
|
99
8
|
COINGECKO_BLOCKCHAINS_MAP = {
|
|
100
9
|
'areon-network': Blockchain.AREON,
|
|
101
10
|
'astar-zkevm': Blockchain.ASTAR_ZKEVM,
|
|
@@ -265,10 +174,6 @@ def _get_chain_mapping(
|
|
|
265
174
|
return None
|
|
266
175
|
|
|
267
176
|
|
|
268
|
-
def get_blockchain_from_debank_chain(chain: Optional[str]) -> Optional[Blockchain]:
|
|
269
|
-
return _get_chain_mapping(chain, 'DeBank', DEBANK_BLOCKCHAINS_MAP)
|
|
270
|
-
|
|
271
|
-
|
|
272
177
|
def get_blockchain_from_coingecko_chain(chain: Optional[str]) -> Optional[Blockchain]:
|
|
273
178
|
return _get_chain_mapping(chain, 'CoinGecko', COINGECKO_BLOCKCHAINS_MAP)
|
|
274
179
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|