From 4fad1a561220195c314d91607bfd54ff9e99909d Mon Sep 17 00:00:00 2001 From: Furqan Ahmed Date: Mon, 19 Feb 2024 18:32:52 +0500 Subject: [PATCH 1/2] added crab and darwinia networks --- cypress/e2e/chains.cy.ts | 2 ++ lib/utils/chains.ts | 7 +++++++ locales/en/networks.json | 2 ++ public/assets/images/vendor/chains/crab.svg | 8 ++++++++ public/assets/images/vendor/chains/darwinia.svg | 10 ++++++++++ 5 files changed, 29 insertions(+) create mode 100644 public/assets/images/vendor/chains/crab.svg create mode 100644 public/assets/images/vendor/chains/darwinia.svg diff --git a/cypress/e2e/chains.cy.ts b/cypress/e2e/chains.cy.ts index ca10d8dd5..c17eef0db 100644 --- a/cypress/e2e/chains.cy.ts +++ b/cypress/e2e/chains.cy.ts @@ -38,7 +38,9 @@ const TEST_ADDRESSES = { [ChainId.CeloMainnet]: '0xDa9760828175a7684371321b17e11e823Aa5F4C0', [ChainId.CoinExSmartChainMainnet]: '0x3eC67Dd5060F8657720915B890A36E66B48D36d1', [ChainId.CoreBlockchainMainnet]: '0xF29E73EA0d4EF0366D95cF966dA1Dd58C88d916F', + [ChainId.CrabNetwork]: '0x7d0caefbe8a6f66aea68389f8cbff9052acd8fd7', [ChainId.CronosMainnet]: '0xB8cAD90CBCb2157d68FD72c43766756cB9bA9B52', + [ChainId.DarwiniaNetwork]: '0xe45fd7bef2736dad2d5620052ca37a9603376aea', [ChainId.DogechainMainnet]: '0x544b7Bfd815905fF87a0d25b1Fb109931851fdCc', [ChainId.ElastosSmartChain]: '0xA52B02C68cB65083788c46F2c08c6935f0aB19C1', [ChainId.ENULSMainnet]: '0x71396287EeDa50fdE667E8c53771682fd74De1Ac', diff --git a/lib/utils/chains.ts b/lib/utils/chains.ts index 2de4265de..4f67e5a04 100644 --- a/lib/utils/chains.ts +++ b/lib/utils/chains.ts @@ -20,9 +20,11 @@ export const PROVIDER_SUPPORTED_CHAINS = [ ChainId.ArbitrumGoerli, ChainId.ArbitrumOne, ChainId.ArbitrumSepolia, + ChainId.CrabNetwork, ChainId.CoinExSmartChainMainnet, ChainId.CoinExSmartChainTestnet, ChainId.CoreBlockchainMainnet, + ChainId.DarwiniaNetwork, ChainId.EthereumMainnet, ChainId.ExosamaNetwork, ChainId.FrameTestnet, @@ -206,6 +208,7 @@ export const CHAIN_SELECT_MAINNETS = [ ChainId.RolluxMainnet, ChainId.SyscoinMainnet, ChainId.Kroma, + ChainId.CrabNetwork, ChainId.ZetaChainMainnet, ChainId.EthereumClassic, ChainId.NahmiiMainnet, @@ -223,6 +226,7 @@ export const CHAIN_SELECT_MAINNETS = [ ChainId.MaxxChainMainnet, ChainId.OctaSpace, ChainId.GoldXChainMainnet, + ChainId.DarwiniaNetwork, ]; export const CHAIN_SELECT_TESTNETS = [ @@ -563,8 +567,10 @@ export const getChainLogo = (chainId: number): string => { [ChainId.CoinExSmartChainMainnet]: '/assets/images/vendor/chains/coinex.svg', [ChainId.CoinExSmartChainTestnet]: '/assets/images/vendor/chains/coinex.svg', [ChainId.CoreBlockchainMainnet]: '/assets/images/vendor/chains/core.png', + [ChainId.CrabNetwork]: '/assets/images/vendor/chains/crab.svg', [ChainId.CronosMainnet]: '/assets/images/vendor/chains/cronos.svg', [ChainId.CronosTestnet]: '/assets/images/vendor/chains/cronos.svg', + [ChainId.DarwiniaNetwork]: '/assets/images/vendor/chains/darwinia.svg', [ChainId.DogechainMainnet]: '/assets/images/vendor/chains/dogechain.jpg', [ChainId.ElastosSmartChain]: '/assets/images/vendor/chains/elastos.jpg', [ChainId.ENULSMainnet]: '/assets/images/vendor/chains/enuls.svg', @@ -740,6 +746,7 @@ export const getDefaultDonationAmount = (nativeToken: string): string => { PWR: '1000', RBTC: '0.001', REDLC: '100', + RING: '2462', ROSE: '100', SAMA: '500', SDN: '50', diff --git a/locales/en/networks.json b/locales/en/networks.json index 398bfa1ba..442b08091 100644 --- a/locales/en/networks.json +++ b/locales/en/networks.json @@ -21,7 +21,9 @@ "celo": "Celo is a Layer 1 blockchain that is focused on developing their data-efficient technology for mobile use and emerging markets such as Latin America. While Celo was created as an EVM-compatible Layer 1 blockchain, the Celo governance has recently voted to move their chain to an Ethereum Layer 2 chain, based on Optimism's OP Stack.", "coinex-smart-chain": "CoinEx Smart Chain (CSC) is a Layer 1 blockchain that was created by the CoinEx exchange. It was created to offer lower transaction fees and faster transaction times than Ethereum. It achieves this by using a more centralized consensus mechanism that integrates features of Proof of Stake and Proof of Authority.", "core": "CORE is a Layer 1 blockchain that uses a new consensus mechanism called Satoshi Plus that leverages the Bitcoin hashrate and combines features of Proof of Work and Delegated Proof of Stake. While it provides its own blockchain network, the CORE DAO is also focused on spreading the use of the Satoshi Plus technology to other blockchains.", + "crab": "Crab is a canary network with real economic value for Darwinia, similar in positioning to Polkadot's Kusama Network. It serves as a programmable cross-chain platform for DApps. Being substrate-based and EVM-compatible, it is connected to Kusama.", "cronos": "Cronos is the EVM-compatible sidechain for the Crypto.org blockchain. Cronos uses a Proof of Authority consensus mechanism, which makes the chain fast and cheap to use, but compromises on decentralization. It also uses the Inter Blockchain Communications (IBC) protocol to enable interoperability between Cronos and other blockchains.", + "darwinia": " Darwinia is the community-run technology and service powering the cross-chain capabilities of decentralized applications.", "dogechain": "Dogechain is a project focused on bringing smart contracts into the Dogecoin ecosystem. Although it isn't officially endorsed, Dogechain is a sidechain of Dogecoin with a bridge to transfer DOGE to and from the Dogecoin mainnet. This allows people in the Dogecoin ecosystem to bridge over and use EVM based smart contracts with their DOGE.", "elastos": "Elastos is a Layer 1 blockchain that aims to merge blockchain smart contracts with other parts of the modern web. To do so, Elastos created a blockchain and a sidechain network, as well as other related components like peer-to-peer networking and decentralized identity. Elastos' vision is to integrate these solutions to merge it into something they call the Elastos SmartWeb.", "enuls": "ENULS is a Layer 1 EVM compatible chain built on top of the NULS blockchain infrastructure. It has a focus on cross-chain interoperability through its sibling-network Nerve Network, which is also part of the NULS ecosystem.", diff --git a/public/assets/images/vendor/chains/crab.svg b/public/assets/images/vendor/chains/crab.svg new file mode 100644 index 000000000..3ee727f64 --- /dev/null +++ b/public/assets/images/vendor/chains/crab.svg @@ -0,0 +1,8 @@ + + + Crab-Background + + + + + \ No newline at end of file diff --git a/public/assets/images/vendor/chains/darwinia.svg b/public/assets/images/vendor/chains/darwinia.svg new file mode 100644 index 000000000..1ecbcc7f8 --- /dev/null +++ b/public/assets/images/vendor/chains/darwinia.svg @@ -0,0 +1,10 @@ + + + Darwinia-Background + + + + + + + \ No newline at end of file From b9d44ec5a4dbca47defadd585cfbf0801605bd5d Mon Sep 17 00:00:00 2001 From: Furqan Ahmed Date: Wed, 21 Feb 2024 17:14:14 +0500 Subject: [PATCH 2/2] add: undefined pricing for crab and darwinia --- lib/utils/chains.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/utils/chains.ts b/lib/utils/chains.ts index 4f67e5a04..6db6a703b 100644 --- a/lib/utils/chains.ts +++ b/lib/utils/chains.ts @@ -1304,6 +1304,8 @@ const PRICE_STRATEGIES: Record = { }), ], }), + [ChainId.CrabNetwork]: undefined, + [ChainId.DarwiniaNetwork]: undefined, [ChainId.DogechainMainnet]: undefined, // All stablecoins on Dogechain are depegged [ChainId.ElastosSmartChain]: new AggregatePriceStrategy({ aggregationType: AggregationType.ANY,