-
Notifications
You must be signed in to change notification settings - Fork 345
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support: Add new EVMs to Support NFTs (#7926)
* [WIP]: Support new Evms nfts * support: Add new EVMs to Support NFTs * chore: Activate partially new EVMs
- Loading branch information
1 parent
9834c5e
commit 5c13c7b
Showing
17 changed files
with
137 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
"ledger-live-desktop": patch | ||
"live-mobile": patch | ||
"@ledgerhq/live-nft": patch | ||
"@ledgerhq/live-env": patch | ||
--- | ||
|
||
Add new EVMs to NFT support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...r-live-desktop/src/renderer/screens/settings/sections/Developer/SimpleHashTools/helper.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { SUPPORTED_BLOCKCHAINS_LIVE } from "@ledgerhq/live-nft/supported"; | ||
|
||
export const createOptions = () => { | ||
return SUPPORTED_BLOCKCHAINS_LIVE.map(blockchain => ({ | ||
label: blockchain.charAt(0).toUpperCase() + blockchain.slice(1), // Capitalize first letter | ||
value: blockchain, | ||
})); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
### NFT Support for EVM | ||
|
||
To add an EVM (currently), you need to modify: | ||
|
||
- NFT_CURRENCIES in live-env (CryptoCurrencyId) | ||
- Add it to the BlockchainEVM enum in ./src/supported.ts | ||
- Add the new entry to SUPPORTED_BLOCKCHAINS_LIVE | ||
- If the currencyId is different between LL and SimpleHash, add it to replacements with the corresponding value | ||
|
||
⚠️ When adding a new EVM, **be careful** with the NFT Gallery on LLM: | ||
|
||
Ensure that the filters still work properly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
/** | ||
* Supported blockchains EVM by Backend | ||
*/ | ||
export enum BlockchainEVM { | ||
Arbitrum = "arbitrum", | ||
Avalanche = "avalanche_c_chain", | ||
Base = "base", | ||
Blast = "blast", | ||
Bsc = "bsc", | ||
Canto = "canto", | ||
Celo = "celo", | ||
Cyber = "cyber", | ||
Degen = "degen", | ||
Ethereum = "ethereum", | ||
Fantom = "fantom", | ||
Gnosis = "gnosis", | ||
Godwoken = "godwoken", | ||
Linea = "linea", | ||
Loot = "loot", | ||
Manta = "manta", | ||
Mode = "mode", | ||
Moonbeam = "moonbeam", | ||
Opbnb = "opbnb", | ||
Optimism = "optimism", | ||
Palm = "palm", | ||
Polygon = "polygon", | ||
ProofOfPlay = "proofofplay", | ||
Rari = "rari", | ||
Scroll = "scroll", | ||
Sei = "sei_network", | ||
Xai = "xai", | ||
Zora = "zora", | ||
} | ||
|
||
export const blockchainEVMList: BlockchainEVM[] = Object.values(BlockchainEVM); | ||
|
||
export const SUPPORTED_BLOCKCHAINS_LIVE = [ | ||
BlockchainEVM.Arbitrum, | ||
BlockchainEVM.Avalanche, | ||
BlockchainEVM.Base, | ||
// BlockchainEVM.Blast, | ||
// BlockchainEVM.Bsc, | ||
// BlockchainEVM.Celo, | ||
BlockchainEVM.Ethereum, | ||
// BlockchainEVM.Fantom, | ||
// BlockchainEVM.Linea, | ||
// BlockchainEVM.Moonbeam, | ||
BlockchainEVM.Optimism, | ||
BlockchainEVM.Polygon, | ||
BlockchainEVM.Scroll, | ||
// BlockchainEVM.Sei, | ||
]; | ||
|
||
export type BlockchainsType = (typeof blockchainEVMList)[number]; | ||
|
||
export type SupportedBlockchainsType = (typeof SUPPORTED_BLOCKCHAINS_LIVE)[number]; | ||
|
||
// For SimpleHash Api | ||
export const replacements: { [key: string]: string } = { | ||
[BlockchainEVM.Avalanche]: "avalanche", | ||
[BlockchainEVM.Sei]: "sei", | ||
}; |