Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion blockapi/v2/blockchain_mapping.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

DEBANK_BLOCKCHAINS_MAP = {
'a8': Blockchain.ANCIENT8,
'abs': Blockchain.ABSTRACT,
'ace': Blockchain.ENDURANCE,
'ailayer': Blockchain.AI_LAYER,
'alot': Blockchain.DEX_ALOT,
Expand All @@ -15,6 +16,7 @@
'avax': Blockchain.AVALANCHE,
'aze': Blockchain.ASTAR_ZKEVM,
'bb': Blockchain.BOUNCE_BIT,
'bera': Blockchain.BERACHAIN,
'bfc': Blockchain.BIFROST,
'boba': Blockchain.BOBA,
'brise': Blockchain.BITGERT,
Expand Down Expand Up @@ -84,6 +86,7 @@
'tlos': Blockchain.TELOS,
'tomb': Blockchain.TOMBCHAIN,
'ulx': Blockchain.ULTRON,
'uni': Blockchain.UNICHAIN,
'wan': Blockchain.WANCHAIN,
'wemix': Blockchain.WEMIX_NETWORK,
'world': Blockchain.WORLD_CHAIN,
Expand Down Expand Up @@ -179,6 +182,7 @@
'106': Blockchain.VELAS,
'122': Blockchain.FUSE,
'128': Blockchain.HUOBI_TOKEN,
'130': Blockchain.UNICHAIN,
'137': Blockchain.POLYGON,
'250': Blockchain.FANTOM,
'256': None, # testnet
Expand All @@ -192,9 +196,11 @@
'1088': Blockchain.METIS_ANDROMEDA,
'1284': Blockchain.MOONBEAM,
'1285': Blockchain.MOONRIVER,
'1514': Blockchain.STORY,
'2000': Blockchain.DOGECHAIN,
'2001': Blockchain.MILKOMEDA_C1,
'2222': Blockchain.KAVA,
'2741': Blockchain.ABSTRACT,
'4689': Blockchain.IOTEX,
'8217': Blockchain.KLAYTN_CYPRESS,
'9001': Blockchain.EVMOS,
Expand All @@ -209,6 +215,7 @@
'53935': Blockchain.DFK_CHAIN,
'71402': Blockchain.GODWOKEN,
# "73772":None, #TODO: not found
'80094': Blockchain.BERACHAIN,
'210425': Blockchain.PLAT_ON,
'256256': Blockchain.CMP,
# "12340001": None, #TODO: not found
Expand Down Expand Up @@ -265,7 +272,7 @@ def get_blockchain_from_coingecko_chain(chain: Optional[str]) -> Optional[Blockc


def get_blockchain_from_chain_id(
chain: Optional[Union[str, int]]
chain: Optional[Union[str, int]],
) -> Optional[Blockchain]:
return _get_chain_mapping(chain, 'Chain ID', CHAIN_ID_BLOCKCHAINS_MAP)

Expand Down
4 changes: 4 additions & 0 deletions blockapi/v2/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@


class Blockchain(str, Enum):
ABSTRACT = 'abstract'
ACALA = 'acala'
AELF = 'aelf'
AI_LAYER = 'ai-layer'
Expand Down Expand Up @@ -43,6 +44,7 @@ class Blockchain(str, Enum):
BAHAMUT = 'bahamut'
BASE = 'base'
BEAM = 'beam'
BERACHAIN = 'berachain'
BEVM = 'bevm'
BIFROST = 'bifrost'
BINANCECOIN = 'binancecoin'
Expand Down Expand Up @@ -304,6 +306,7 @@ class Blockchain(str, Enum):
STARKNET = 'starknet'
STELLAR = 'stellar'
STEP_NETWORK = 'step-network'
STORY = 'story'
STRATIS = 'stratis'
SUI = 'sui'
SUPER_LUMIO = 'super-lumio'
Expand All @@ -330,6 +333,7 @@ class Blockchain(str, Enum):
TRUSTLESS_COMPUTER = 'trustless-computer'
UBIQ = 'ubiq'
ULTRON = 'ultron'
UNICHAIN = 'unichain'
VALOBIT = 'valobit'
VALORBIT = 'valorbit'
VECHAIN = 'vechain'
Expand Down