From 1346056ee19b3745700e639dc7e3fef65741ed54 Mon Sep 17 00:00:00 2001 From: samisbakedham Date: Fri, 3 Jun 2022 00:36:49 -0700 Subject: [PATCH] Add Support for Candle Network --- src/database/data/networks.ts | 32 ++++++++++++++++++++++++++++++++ src/database/data/nodes.ts | 14 ++++++++++++++ src/types/networkId.ts | 1 + 3 files changed, 47 insertions(+) diff --git a/src/database/data/networks.ts b/src/database/data/networks.ts index b8f42e73e34..c5b73e72958 100644 --- a/src/database/data/networks.ts +++ b/src/database/data/networks.ts @@ -10,6 +10,7 @@ import { DEFAULT_EGEM, DEFAULT_ETC, DEFAULT_ETH, + DEFAULT_CNDL, DEFAULT_ETHO, DEFAULT_ETI, DEFAULT_EVRICE, @@ -292,6 +293,37 @@ export const NETWORKS_CONFIG: NetworkConfig = { initial: 1 } }, + CNDL: { + id: 'CNDL', + name: 'CNDL', + unit: 'CNDL' as TTicker, + chainId: 534, + isCustom: false, + color: '#6d2eae', + blockExplorer: makeExplorer({ + name: 'BlockScout', + origin: 'https://candleexplorer.com/', + addressPath: 'address', + blockPath: 'blocks' + }), + tokens: [], + contracts: [], + dPaths: { + [WalletId.TREZOR]: DEFAULT_CNDL, + [WalletId.LEDGER_NANO_S]: DEFAULT_CNDL, + [WalletId.TREZOR_NEW]: DEFAULT_CNDL, + [WalletId.LEDGER_NANO_S_NEW]: DEFAULT_CNDL, + [WalletId.GRIDPLUS]: DEFAULT_CNDL, + default: DEFAULT_CNDL + }, + gasPriceSettings: { + min: 0.02, + max: 10, + initial: 1 + }, + shouldEstimateGasPrice: false, + supportsEIP1559: true + }, TOMO: { id: 'TOMO', name: 'TomoChain', diff --git a/src/database/data/nodes.ts b/src/database/data/nodes.ts index 212bc17539d..2bc3e8a17c6 100644 --- a/src/database/data/nodes.ts +++ b/src/database/data/nodes.ts @@ -358,6 +358,20 @@ export const NODES_CONFIG: { [key in NetworkId]: StaticNodeConfig[] } = { url: 'https://rpc-mainnet.matic.network' } ], + CNDL: [ + { + name: NetworkUtils.makeNodeName('CNDL', 'maticvigil'), + type: NodeType.RPC, + service: 'CNDLSTANDARD', + url: 'https://rpc.cndlchain.com' + }, + { + name: NetworkUtils.makeNodeName('CNDL', 'matic'), + type: NodeType.RPC, + service: 'CNDLREDUNDANCY', + url: 'https://candle-rpc.com' + } + ], xDAI: [ { name: NetworkUtils.makeNodeName('xDAI', 'xdaichain.com'), diff --git a/src/types/networkId.ts b/src/types/networkId.ts index ad49418729b..a3cf839934f 100644 --- a/src/types/networkId.ts +++ b/src/types/networkId.ts @@ -1,5 +1,6 @@ export type NetworkId = | 'Ethereum' + | 'CNDL' | 'Ropsten' | 'Kovan' | 'Rinkeby'