fix(trading,governance): align validator testnet name, add chain config (#6133)

This commit is contained in:
Matthew Russell 2024-03-28 15:00:01 +00:00 committed by GitHub
parent 88251fae4d
commit d238662c9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
17 changed files with 36 additions and 21 deletions

View File

@ -1,5 +1,5 @@
# App configuration variables
NX_VEGA_ENV=VALIDATOR_TESTNET
NX_VEGA_ENV=VALIDATORS_TESTNET
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/testnet2/testnet2.toml
NX_VEGA_URL=https://api-validators-testnet.vega.rocks/graphql
NX_VEGA_REST=https://api-validators-testnet.vega.rocks/

View File

@ -1,5 +1,5 @@
# App configuration variables
NX_VEGA_ENV=VALIDATOR_TESTNET
NX_VEGA_ENV=VALIDATORS_TESTNET
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/testnet2/testnet2.toml
NX_VEGA_URL=https://api-validators-testnet.vega.rocks/graphql
NX_VEGA_REST=https://api-validators-testnet.vega.rocks/

View File

@ -41,7 +41,7 @@ export const ContractAddresses: {
claimAddress: '0x8Cef746ab7C83B61F6461cC92882bD61AB65a994', // TODO not deployed to this env, but random address so app doesn't error
lockedAddress: '0x0', // TODO not deployed to this env
},
VALIDATOR_TESTNET: {
VALIDATORS_TESTNET: {
claimAddress: '0x8Cef746ab7C83B61F6461cC92882bD61AB65a994', // TODO not deployed to this env, but random address so app doesn't error
lockedAddress: '0x0', // TODO not deployed to this env
// This is a fallback contract address for the validator testnet network which does not

View File

@ -6,6 +6,7 @@ import {
ViewPartyConnector,
createConfig,
fairground,
validatorsTestnet,
stagnet,
mainnet,
} from '@vegaprotocol/wallet';
@ -31,7 +32,7 @@ export const useVegaWalletConfig = () => {
const viewParty = new ViewPartyConnector();
const config = createConfig({
chains: [mainnet, fairground, stagnet],
chains: [mainnet, fairground, validatorsTestnet, stagnet],
defaultChainId: CHAIN_IDS[VEGA_ENV],
connectors: [injected, snap, jsonRpc, viewParty],
});

View File

@ -2,4 +2,4 @@
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/testnet2/testnet2.tom
NX_VEGA_URL=https://api-validators-testnet.vega.rocks/graphql
NX_VEGA_NETWORKS={'{"TESTNET":"https://multisig-signer.fairground.wtf","MAINNET":"https://multisig-signer.vega.xyz"}'
NX_VEGA_ENV=VALIDATOR_TESTNET
NX_VEGA_ENV=VALIDATORS_TESTNET

View File

@ -4,7 +4,7 @@ NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions
NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz
NX_SENTRY_DSN=https://2ffce43721964aafa78277c50654ece4@o286262.ingest.sentry.io/6300613
NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/testnet2/testnet2.toml
NX_VEGA_ENV=VALIDATOR_TESTNET
NX_VEGA_ENV=VALIDATORS_TESTNET
NX_VEGA_EXPLORER_URL=https://explorer.validators-testnet.vega.rocks
NX_VEGA_NETWORKS={\"MAINNET\":\"https://console.vega.xyz\",\"STAGNET1\":\"https://trading.stagnet1.vega.rocks\",\"TESTNET\":\"https://console.fairground.wtf\"}
NX_VEGA_TOKEN_URL=https://governance.validators-testnet.vega.rocks

View File

@ -5,6 +5,7 @@ import {
ViewPartyConnector,
createConfig,
fairground,
validatorsTestnet,
mainnet,
stagnet,
} from '@vegaprotocol/wallet';
@ -36,7 +37,7 @@ export const useVegaWalletConfig = () => {
const viewParty = new ViewPartyConnector();
const config = createConfig({
chains: [mainnet, fairground, stagnet],
chains: [mainnet, fairground, validatorsTestnet, stagnet],
defaultChainId: CHAIN_IDS[VEGA_ENV],
connectors: [injected, snap, jsonRpc, viewParty],
});

View File

@ -7,7 +7,7 @@ export const CHAIN_IDS: {
[Networks.STAGNET1]: 'vega-stagnet1-202307191148',
[Networks.TESTNET]: 'vega-fairground-202305051805',
[Networks.MAINNET_MIRROR]: '',
[Networks.VALIDATOR_TESTNET]: 'testnet-001',
[Networks.VALIDATORS_TESTNET]: 'vega-testnet-0002-v4',
[Networks.CUSTOM]: 'vega-stagnet1-202307191148',
[Networks.MAINNET]: 'vega-mainnet-0011',
};

View File

@ -160,7 +160,7 @@ describe('Network switcher', () => {
[Networks.CUSTOM]: undefined,
[Networks.MAINNET]: 'https://main.net',
[Networks.TESTNET]: 'https://test.net',
[Networks.VALIDATOR_TESTNET]: 'https://validator-test.net',
[Networks.VALIDATORS_TESTNET]: 'https://validator-test.net',
[Networks.MAINNET_MIRROR]: 'https://mainnet-mirror.net',
[Networks.DEVNET]: 'https://dev.net',
[Networks.STAGNET1]: 'https://stag1.net',
@ -196,7 +196,7 @@ describe('Network switcher', () => {
const VEGA_NETWORKS: Record<Networks, string | undefined> = {
[Networks.CUSTOM]: undefined,
[Networks.MAINNET]: 'https://main.net',
[Networks.VALIDATOR_TESTNET]: 'https://validator-test.net',
[Networks.VALIDATORS_TESTNET]: 'https://validator-test.net',
[Networks.MAINNET_MIRROR]: 'https://mainnet-mirror.net',
[Networks.TESTNET]: 'https://test.net',
[Networks.DEVNET]: 'https://dev.net',
@ -226,7 +226,7 @@ describe('Network switcher', () => {
const VEGA_NETWORKS: Record<Networks, string | undefined> = {
[Networks.CUSTOM]: undefined,
[Networks.MAINNET]: undefined,
[Networks.VALIDATOR_TESTNET]: 'https://validator-test.net',
[Networks.VALIDATORS_TESTNET]: 'https://validator-test.net',
[Networks.MAINNET_MIRROR]: 'https://mainnet-mirror.net',
[Networks.TESTNET]: 'https://test.net',
[Networks.DEVNET]: 'https://dev.net',

View File

@ -17,7 +17,7 @@ import { useT } from '../../use-t';
export const useEnvNameMapping: () => Record<Networks, string> = () => {
const t = useT();
return {
[Networks.VALIDATOR_TESTNET]: t('VALIDATOR_TESTNET', {
[Networks.VALIDATORS_TESTNET]: t('VALIDATORS_TESTNET', {
contextSeparator: '|',
}),
[Networks.MAINNET_MIRROR]: t('Mainnet-mirror'),
@ -41,7 +41,7 @@ export const useEnvDescriptionMapping: () => Record<Networks, string> = () => {
const t = useT();
return {
[Networks.CUSTOM]: '',
[Networks.VALIDATOR_TESTNET]: t('The validator deployed testnet'),
[Networks.VALIDATORS_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'),

View File

@ -20,7 +20,7 @@ type DAppLinks = {
};
const EmptyLinks: DAppLinks = {
[Networks.VALIDATOR_TESTNET]: '',
[Networks.VALIDATORS_TESTNET]: '',
[Networks.MAINNET_MIRROR]: '',
[Networks.DEVNET]: '',
[Networks.STAGNET1]: '',
@ -32,7 +32,7 @@ const ExplorerLinks = {
...EmptyLinks,
[Networks.STAGNET1]: 'https://explorer.stagnet1.vega.rocks',
[Networks.TESTNET]: 'https://explorer.fairground.wtf',
[Networks.VALIDATOR_TESTNET]:
[Networks.VALIDATORS_TESTNET]:
'https://explorer.validators-testnet.vega.rocks',
[Networks.MAINNET_MIRROR]: 'https://explorer.mainnet-mirror.vega.rocks/',
[Networks.MAINNET]: 'https://explorer.vega.xyz',
@ -51,7 +51,7 @@ const GovernanceLinks = {
[Networks.DEVNET]: 'https://dev.governance.vega.xyz',
[Networks.STAGNET1]: 'https://governance.stagnet1.vega.rocks',
[Networks.TESTNET]: 'https://governance.fairground.wtf',
[Networks.VALIDATOR_TESTNET]:
[Networks.VALIDATORS_TESTNET]:
'https://governance.validators-testnet.vega.rocks',
[Networks.MAINNET_MIRROR]: 'https://governance.mainnet-mirror.vega.rocks',
[Networks.MAINNET]: 'https://governance.vega.xyz',

View File

@ -6,7 +6,7 @@ import type {
} from './utils/validate-environment';
export enum Networks {
VALIDATOR_TESTNET = 'VALIDATOR_TESTNET',
VALIDATORS_TESTNET = 'VALIDATORS_TESTNET',
MAINNET_MIRROR = 'MAINNET_MIRROR',
CUSTOM = 'CUSTOM',
TESTNET = 'TESTNET',

View File

@ -154,7 +154,7 @@
"TYPE_SELECTOR_LIQUIDITY_MONITORING_AUCTION": "This market is in auction until it reaches <0>sufficient liquidity</0>. Only limit orders are permitted when market is in auction.",
"TYPE_SELECTOR_PRICE_MONITORING_AUCTION": "This market is in auction due to <0>high price volatility</0>. Only limit orders are permitted when market is in auction.",
"Until the auction ends, you can only place GFA, GTT, or GTC limit orders": "Until the auction ends, you can only place GFA, GTT, or GTC limit orders",
"VALIDATOR_TESTNET": "VALIDATOR_TESTNET",
"VALIDATORS_TESTNET": "VALIDATORS_TESTNET",
"Volume discount": "Volume discount",
"When the order trades and its size falls below this threshold, it will be reset to the peak size and moved to the back of the priority order. Must be less than or equal to peak size, and greater than 0.": "When the order trades and its size falls below this threshold, it will be reset to the peak size and moved to the back of the priority order. Must be less than or equal to peak size, and greater than 0.",
"You are setting this market to cross-margin mode.": "You are setting this market to cross-margin mode.",

View File

@ -36,7 +36,7 @@
"The validator deployed testnet": "The validator deployed testnet",
"The vega mainnet": "The vega mainnet",
"This app will only work on {{VEGA_ENV}}. Select a node to connect to.": "This app will only work on {{VEGA_ENV}}. Select a node to connect to.",
"VALIDATOR_TESTNET": "VALIDATOR_TESTNET",
"VALIDATORS_TESTNET": "VALIDATORS_TESTNET",
"View on Etherscan (opens in a new tab)": "View on Etherscan (opens in a new tab)",
"View on {{chainLabel}} (opens in a new tab)": "View on {{chainLabel}} (opens in a new tab)",
"Warning delay ( >{{warningLatency}} sec): {{blockUpdateLatency}} sec": "Warning delay ( >{{warningLatency}} sec): {{blockUpdateLatency}} sec",

View File

@ -16,6 +16,12 @@ export const fairground = {
name: 'Fairground',
};
export const validatorsTestnet = {
id: 'vega-testnet-0002-v4',
testnet: true,
name: 'Validators Testnet',
};
export const stagnet = {
id: 'vega-stagnet1-202307191148',
testnet: true,

View File

@ -3,7 +3,14 @@ export * from './types';
export * from './transaction-types';
// Core
export { mainnet, fairground, stagnet, mockChain, type Chain } from './chains';
export {
mainnet,
fairground,
validatorsTestnet,
stagnet,
mockChain,
type Chain,
} from './chains';
export { createConfig, coreStoreSlice, singleKeyStoreSlice } from './wallet';
// Connectors

View File

@ -16,7 +16,7 @@ bucket_name = ''
if 'release/' in args.github_ref:
if 'mainnet-mirror' in args.github_ref:
env_name = 'mainnet-mirror'
elif 'validators-testnet' in args.github_ref or 'validator-testnet' in args.github_ref:
elif 'validators-testnet' in args.github_ref:
env_name = 'validators-testnet'
else:
# remove prefixing release/ and take the first string limited by - which is supposed to be name of the environment for releasing (format: release/testnet-trading)