diff --git a/apps/explorer/.env.mainnet-mirror b/apps/explorer/.env.mainnet-mirror index 1299cb5cf..2736dc286 100644 --- a/apps/explorer/.env.mainnet-mirror +++ b/apps/explorer/.env.mainnet-mirror @@ -4,7 +4,7 @@ NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.rocks/websocket NX_SENTRY_DSN=https://4b8c8a8ba07742648aa4dfe1b8d17e40@o286262.ingest.sentry.io/5882996 NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/mainnet-mirror/vegawallet-mainnet-mirror.toml NX_VEGA_URL=https://api.mainnet-mirror.vega.rocks/graphql -NX_VEGA_ENV=MAINNET-MIRROR +NX_VEGA_ENV=MAINNET_MIRROR NX_BLOCK_EXPLORER=https://be.mainnet-mirror.vega.rocks/rest NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_VEGA_GOVERNANCE_URL=https://governance.mainnet-mirror.vega.rocks diff --git a/apps/governance/.env.mainnet-mirror b/apps/governance/.env.mainnet-mirror index 711cfe742..ea22e38a6 100644 --- a/apps/governance/.env.mainnet-mirror +++ b/apps/governance/.env.mainnet-mirror @@ -1,8 +1,8 @@ # App configuration variables -NX_VEGA_ENV=MAINNET-MIRROR +NX_VEGA_ENV=MAINNET_MIRROR NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/mainnet-mirror/vegawallet-mainnet-mirror.toml NX_VEGA_URL=https://api.mainnet-mirror.vega.rocks/graphql -NX_VEGA_NETWORKS='{"DEVNET":"https://dev.governance.vega.xyz","TESTNET":"https://governance.fairground.wtf","MAINNET":"https://governance.vega.xyz","MAINNET-MIRROR":"https://governance.mainnet-mirror.vega.rocks","STAGNET1":"https://trading.stagnet1.vega.rocks"}' +NX_VEGA_NETWORKS='{"DEVNET":"https://dev.governance.vega.xyz","TESTNET":"https://governance.fairground.wtf","MAINNET":"https://governance.vega.xyz","MAINNET_MIRROR":"https://governance.mainnet-mirror.vega.rocks","STAGNET1":"https://trading.stagnet1.vega.rocks"}' NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions diff --git a/apps/governance/src/config/env.ts b/apps/governance/src/config/env.ts index 932163e0d..c716f1063 100644 --- a/apps/governance/src/config/env.ts +++ b/apps/governance/src/config/env.ts @@ -25,6 +25,10 @@ export const ContractAddresses: { claimAddress: customClaimAddress ?? '0x0', lockedAddress: customLockedAddress ?? '0x0', }, + MAINNET_MIRROR: { + claimAddress: '0x8Cef746ab7C83B61F6461cC92882bD61AB65a994', // TODO not deployed to this env, but random address so app doesn't error + lockedAddress: '0x0', // TODO not deployed to this env + }, DEVNET: { claimAddress: '0x8Cef746ab7C83B61F6461cC92882bD61AB65a994', // TODO not deployed to this env, but random address so app doesn't error lockedAddress: '0x0', // TODO not deployed to this env diff --git a/apps/trading/.env.mainnet-mirror b/apps/trading/.env.mainnet-mirror index cb92b542d..2198709da 100644 --- a/apps/trading/.env.mainnet-mirror +++ b/apps/trading/.env.mainnet-mirror @@ -3,9 +3,9 @@ NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions NX_SENTRY_DSN=https://2ffce43721964aafa78277c50654ece4@o286262.ingest.sentry.io/6300613 NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/mainnet-mirror/vegawallet-mainnet-mirror.toml -NX_VEGA_ENV=MAINNET-MIRROR +NX_VEGA_ENV=MAINNET_MIRROR NX_VEGA_EXPLORER_URL=https://explorer.mainnet-mirror.vega.rocks -NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\",\"MAINNET-MIRROR\":\"https://trading.mainnet-mirror.vega.rocks\"} +NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\",\"MAINNET_MIRROR\":\"https://trading.mainnet-mirror.vega.rocks\"} NX_VEGA_TOKEN_URL=https://governance.mainnet-mirror.vega.rocks NX_VEGA_WALLET_URL=http://localhost:1789 NX_VEGA_DOCS_URL=https://docs.vega.xyz/mainnet diff --git a/libs/environment/src/components/network-switcher/network-switcher.spec.tsx b/libs/environment/src/components/network-switcher/network-switcher.spec.tsx index c7014e7db..136b2614b 100644 --- a/libs/environment/src/components/network-switcher/network-switcher.spec.tsx +++ b/libs/environment/src/components/network-switcher/network-switcher.spec.tsx @@ -163,6 +163,7 @@ describe('Network switcher', () => { [Networks.MAINNET]: 'https://main.net', [Networks.TESTNET]: 'https://test.net', [Networks.VALIDATOR_TESTNET]: 'https://validator-test.net', + [Networks.MAINNET_MIRROR]: 'https://mainnet-mirror.net', [Networks.DEVNET]: 'https://dev.net', [Networks.STAGNET1]: 'https://stag1.net', }; @@ -209,6 +210,7 @@ describe('Network switcher', () => { [Networks.CUSTOM]: undefined, [Networks.MAINNET]: 'https://main.net', [Networks.VALIDATOR_TESTNET]: 'https://validator-test.net', + [Networks.MAINNET_MIRROR]: 'https://mainnet-mirror.net', [Networks.TESTNET]: 'https://test.net', [Networks.DEVNET]: 'https://dev.net', [Networks.STAGNET1]: 'https://stag1.net', @@ -240,6 +242,7 @@ describe('Network switcher', () => { [Networks.CUSTOM]: undefined, [Networks.MAINNET]: undefined, [Networks.VALIDATOR_TESTNET]: 'https://validator-test.net', + [Networks.MAINNET_MIRROR]: 'https://mainnet-mirror.net', [Networks.TESTNET]: 'https://test.net', [Networks.DEVNET]: 'https://dev.net', [Networks.STAGNET1]: 'https://stag1.net', diff --git a/libs/environment/src/components/network-switcher/network-switcher.tsx b/libs/environment/src/components/network-switcher/network-switcher.tsx index ee30cf01a..44eee6b28 100644 --- a/libs/environment/src/components/network-switcher/network-switcher.tsx +++ b/libs/environment/src/components/network-switcher/network-switcher.tsx @@ -16,6 +16,7 @@ import classNames from 'classnames'; export const envNameMapping: Record = { [Networks.VALIDATOR_TESTNET]: t('VALIDATOR_TESTNET'), + [Networks.MAINNET_MIRROR]: t('Mainnet-mirror'), [Networks.CUSTOM]: t('Custom'), [Networks.DEVNET]: t('Devnet'), [Networks.STAGNET1]: t('Stagnet'), @@ -31,6 +32,7 @@ export const envTriggerMapping: Record = { export const envDescriptionMapping: Record = { [Networks.CUSTOM]: '', [Networks.VALIDATOR_TESTNET]: t('The validator deployed testnet'), + [Networks.MAINNET_MIRROR]: t('The mainnet-mirror network'), [Networks.DEVNET]: t('The latest Vega code auto-deployed'), [Networks.STAGNET1]: t('A release candidate for the staging environment'), [Networks.TESTNET]: t( diff --git a/libs/environment/src/hooks/use-links.ts b/libs/environment/src/hooks/use-links.ts index 6642a66d1..9995e24f2 100644 --- a/libs/environment/src/hooks/use-links.ts +++ b/libs/environment/src/hooks/use-links.ts @@ -20,6 +20,7 @@ type DAppLinks = { const EmptyLinks: DAppLinks = { [Networks.VALIDATOR_TESTNET]: '', + [Networks.MAINNET_MIRROR]: '', [Networks.DEVNET]: '', [Networks.STAGNET1]: '', [Networks.TESTNET]: '', @@ -31,6 +32,7 @@ const ExplorerLinks = { [Networks.TESTNET]: 'https://explorer.fairground.wtf', [Networks.VALIDATOR_TESTNET]: 'https://explorer.validators-testnet.vega.rocks', + [Networks.MAINNET_MIRROR]: 'https://explorer.mainnet-mirror.vega.rocks/', [Networks.MAINNET]: 'https://explorer.vega.xyz', }; @@ -39,6 +41,7 @@ const ConsoleLinks = { [Networks.STAGNET1]: 'https://trading.stagnet1.vega.rocks', [Networks.TESTNET]: 'https://console.fairground.wtf', [Networks.MAINNET]: 'https://console.vega.xyz', + [Networks.MAINNET_MIRROR]: 'https://console.mainnet-mirror.vega.rocks/', }; const TokenLinks = { @@ -47,6 +50,7 @@ const TokenLinks = { [Networks.TESTNET]: 'https://governance.fairground.wtf', [Networks.VALIDATOR_TESTNET]: 'https://governance.validators-testnet.vega.rocks', + [Networks.MAINNET_MIRROR]: 'https://governance.mainnet-mirror.vega.rocks/', [Networks.MAINNET]: 'https://governance.vega.xyz', }; diff --git a/libs/environment/src/types.ts b/libs/environment/src/types.ts index ebc069c1b..91f0e78ca 100644 --- a/libs/environment/src/types.ts +++ b/libs/environment/src/types.ts @@ -4,6 +4,7 @@ import type { envSchema } from './utils/validate-environment'; export enum Networks { VALIDATOR_TESTNET = 'VALIDATOR_TESTNET', + MAINNET_MIRROR = 'MAINNET_MIRROR', CUSTOM = 'CUSTOM', TESTNET = 'TESTNET', STAGNET1 = 'STAGNET1', diff --git a/libs/environment/src/utils/validate-environment.ts b/libs/environment/src/utils/validate-environment.ts index 8a6412af8..280b4d563 100644 --- a/libs/environment/src/utils/validate-environment.ts +++ b/libs/environment/src/utils/validate-environment.ts @@ -2,6 +2,7 @@ import z from 'zod'; export enum Networks { VALIDATOR_TESTNET = 'VALIDATOR_TESTNET', + MAINNET_MIRROR = 'MAINNET_MIRROR', CUSTOM = 'CUSTOM', TESTNET = 'TESTNET', STAGNET1 = 'STAGNET1',