Skip to content

Commit

Permalink
Merge pull request #182 from skalenetwork/add-regression
Browse files Browse the repository at this point in the history
Add regression network
  • Loading branch information
dmytrotkk authored Jul 27, 2023
2 parents 37cf30f + 896315c commit e83075e
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 6 deletions.
4 changes: 3 additions & 1 deletion src/components/TokenList/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ 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)$/))
}


Expand Down
1 change: 1 addition & 0 deletions src/components/WalletConnector/MetamaskConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ export const CHAIN_IDS = {
'staging': '0x4',
'staging3': '0x5',
'legacy': '0x5',
'regression': '0x5',
'qatestnet': '0x4',
'mainnet': '0x1'
}
Expand Down
6 changes: 4 additions & 2 deletions src/core/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions src/core/core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -149,6 +150,9 @@ function getMainnetAbi(network: string) {
if (network === 'legacy') {
return { ...mainnetAbi, ...legacyAddresses }
}
if (network === 'regression') {
return { ...mainnetAbi, ...regressionAddresses }
}
return { ...mainnetAbi, ...mainnetAddresses }
}

Expand Down
4 changes: 3 additions & 1 deletion src/core/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}


Expand Down
10 changes: 10 additions & 0 deletions src/metadata/addresses/regression.json
Original file line number Diff line number Diff line change
@@ -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"
}
3 changes: 2 additions & 1 deletion src/metadata/faucet.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,6 @@
}
},
"staging": null,
"legacy": null
"legacy": null,
"regression": null
}
1 change: 1 addition & 0 deletions src/metadata/proxy.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}

0 comments on commit e83075e

Please sign in to comment.