From d4900223282d802d396b73aa1dbeb5134d85207d Mon Sep 17 00:00:00 2001 From: Dmytro Date: Thu, 27 Jul 2023 17:35:15 +0100 Subject: [PATCH 1/2] Add regression network --- skale-network | 2 +- src/components/TokenList/helper.ts | 3 ++- src/components/WalletConnector/MetamaskConnector.ts | 1 + src/core/constants.ts | 6 ++++-- src/core/core.ts | 4 ++++ src/core/helper.ts | 4 +++- src/metadata/addresses/regression.json | 10 ++++++++++ src/metadata/faucet.json | 3 ++- src/metadata/proxy.json | 1 + 9 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 src/metadata/addresses/regression.json diff --git a/skale-network b/skale-network index 84e54b4..5b00cae 160000 --- a/skale-network +++ b/skale-network @@ -1 +1 @@ -Subproject commit 84e54b423f920c42efaca79274e16789fc8cf0a7 +Subproject commit 5b00cae6736322f302c3a75331b19ee02b0a3596 diff --git a/src/components/TokenList/helper.ts b/src/components/TokenList/helper.ts index 8904bfa..96db6ef 100644 --- a/src/components/TokenList/helper.ts +++ b/src/components/TokenList/helper.ts @@ -47,7 +47,8 @@ const icons = importAll(require.context('../../icons', false, /\.(png|jpe?g|svg) const CHAIN_ICONS = { 'mainnet': importAll(require.context('../../meta/mainnet/icons', false, /\.(png|jpe?g|svg)$/)), 'staging3': importAll(require.context('../../meta/staging/icons', false, /\.(png|jpe?g|svg)$/)), - 'legacy': importAll(require.context('../../meta/legacy/icons', false, /\.(png|jpe?g|svg)$/)) + 'legacy': importAll(require.context('../../meta/legacy/icons', false, /\.(png|jpe?g|svg)$/)), + 'regression': importAll(require.context('../../meta/regression/icons', false, /\.(png|jpe?g|svg)$/)) } diff --git a/src/components/WalletConnector/MetamaskConnector.ts b/src/components/WalletConnector/MetamaskConnector.ts index 67eba54..50287da 100644 --- a/src/components/WalletConnector/MetamaskConnector.ts +++ b/src/components/WalletConnector/MetamaskConnector.ts @@ -4,6 +4,7 @@ export const CHAIN_IDS = { 'staging': '0x4', 'staging3': '0x5', 'legacy': '0x5', + 'regression': '0x5', 'qatestnet': '0x4', 'mainnet': '0x1' } diff --git a/src/core/constants.ts b/src/core/constants.ts index 89d3d89..bc438e1 100644 --- a/src/core/constants.ts +++ b/src/core/constants.ts @@ -48,13 +48,15 @@ export const HTTPS_PREFIX = 'https://'; export const MAINNET_EXPLORER_URLS: { [skaleNetwork: string]: string } = { mainnet: 'https://etherscan.io', staging3: 'https://goerli.etherscan.io/', - legacy: 'https://goerli.etherscan.io/' + legacy: 'https://goerli.etherscan.io/', + regression: 'https://goerli.etherscan.io/' }; export const BASE_EXPLORER_URLS = { mainnet: "explorer.mainnet.skalenodes.com", staging3: "explorer.staging-v3.skalenodes.com", - legacy: "explorer.staging-v3.skalenodes.com" + legacy: "explorer.staging-v3.skalenodes.com", + regression: "regression-explorer.skalenodes.com" }; // ETA constants diff --git a/src/core/core.ts b/src/core/core.ts index a8e72b7..d924986 100644 --- a/src/core/core.ts +++ b/src/core/core.ts @@ -27,6 +27,7 @@ import mainnetAddresses from '../metadata/addresses/mainnet.json'; import stagingAddresses from '../metadata/addresses/staging.json'; import staging3Addresses from '../metadata/addresses/staging3.json'; import legacyAddresses from '../metadata/addresses/legacy.json'; +import regressionAddresses from '../metadata/addresses/regression.json'; import { getChainName } from './helper'; import { MAINNET_CHAIN_NAME } from './constants'; @@ -149,6 +150,9 @@ function getMainnetAbi(network: string) { if (network === 'legacy') { return { ...mainnetAbi, ...legacyAddresses } } + if (network === 'regression') { + return { ...mainnetAbi, ...regressionAddresses } + } return { ...mainnetAbi, ...mainnetAddresses } } diff --git a/src/core/helper.ts b/src/core/helper.ts index 602ea6f..8855b52 100644 --- a/src/core/helper.ts +++ b/src/core/helper.ts @@ -29,12 +29,14 @@ import { TransferRequestStatus } from './dataclasses'; import mainnetMeta from '../meta/mainnet/chains.json'; import stagingMeta from '../meta/staging/chains.json'; import legacyMeta from '../meta/legacy/chains.json'; +import regressionMeta from '../meta/regression/chains.json'; export const CHAINS_META = { 'mainnet': mainnetMeta, 'staging3': stagingMeta, - 'legacy': legacyMeta + 'legacy': legacyMeta, + 'regression': regressionMeta } diff --git a/src/metadata/addresses/regression.json b/src/metadata/addresses/regression.json new file mode 100644 index 0000000..ac5d5fd --- /dev/null +++ b/src/metadata/addresses/regression.json @@ -0,0 +1,10 @@ +{ + "message_proxy_mainnet_address": "0xd2CF0381DB8966a2f9a0F414a3eF87caa9Bcf038", + "linker_address": "0x605f3aC69916bd744346DFD03aaE79556Cf83Dc2", + "community_pool_address": "0x504A1116a860950D6db8246e4763fc3c76Da5096", + "deposit_box_eth_address": "0x4EBD0E4da411540e1EdDFe6D978457D1f0B1d181", + "deposit_box_erc20_address": "0xe98528D168151aB0dEF9dD419C5e9a65a0FAE138", + "deposit_box_erc721_address": "0x1354EC4138E9f39B02f1e1026D2eddB2edcD5ec6", + "deposit_box_erc1155_address": "0x1B46E1Aac3dfDf578880fb0332522D0Dea52F392", + "deposit_box_erc721_with_metadata_address": "0x915ab36c3D680498e5A9F520e90C8312afB1CfAe" +} \ No newline at end of file diff --git a/src/metadata/faucet.json b/src/metadata/faucet.json index 8248998..dbb5d94 100644 --- a/src/metadata/faucet.json +++ b/src/metadata/faucet.json @@ -36,5 +36,6 @@ } }, "staging": null, - "legacy": null + "legacy": null, + "regression": null } \ No newline at end of file diff --git a/src/metadata/proxy.json b/src/metadata/proxy.json index 3f749d1..ff242df 100644 --- a/src/metadata/proxy.json +++ b/src/metadata/proxy.json @@ -3,5 +3,6 @@ "staging": "https://staging-v2.skalenodes.com", "staging3": "https://staging-v3.skalenodes.com", "legacy": "https://legacy-proxy.skalenodes.com/", + "regression": "https://regression-proxy.skalenodes.com/", "qatestnet": "https://new-testnet-proxy.skalenodes.com" } \ No newline at end of file From 896315cf86a04190ac963fe577c333ca6c78ba96 Mon Sep 17 00:00:00 2001 From: Dmytro Date: Thu, 27 Jul 2023 18:18:53 +0100 Subject: [PATCH 2/2] Fix linter --- src/components/TokenList/helper.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/TokenList/helper.ts b/src/components/TokenList/helper.ts index 96db6ef..4e70b5b 100644 --- a/src/components/TokenList/helper.ts +++ b/src/components/TokenList/helper.ts @@ -48,7 +48,8 @@ const CHAIN_ICONS = { 'mainnet': importAll(require.context('../../meta/mainnet/icons', false, /\.(png|jpe?g|svg)$/)), 'staging3': importAll(require.context('../../meta/staging/icons', false, /\.(png|jpe?g|svg)$/)), 'legacy': importAll(require.context('../../meta/legacy/icons', false, /\.(png|jpe?g|svg)$/)), - 'regression': importAll(require.context('../../meta/regression/icons', false, /\.(png|jpe?g|svg)$/)) + 'regression': importAll( + require.context('../../meta/regression/icons', false, /\.(png|jpe?g|svg)$/)) }