diff --git a/apps/explorer-e2e/.env b/apps/explorer-e2e/.env index b48aad733..ec072e6c6 100644 --- a/apps/explorer-e2e/.env +++ b/apps/explorer-e2e/.env @@ -3,7 +3,7 @@ NX_TENDERMINT_URL=http://localhost:26617 NX_TENDERMINT_WEBSOCKET_URL=wss://localhost:26617/websocket NX_VEGA_URL=http://localhost:3028/query NX_VEGA_ENV=CUSTOM -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/capsule-network.json +NX_VEGA_CONFIG_URL= CYPRESS_VEGA_TENDERMINT_URL=http://localhost:26617 diff --git a/apps/explorer/.env b/apps/explorer/.env index ee3a6926f..dbdbcd3d4 100644 --- a/apps/explorer/.env +++ b/apps/explorer/.env @@ -1,6 +1,6 @@ NX_TENDERMINT_URL=https://tm.n00.stagnet3.vega.xyz NX_TENDERMINT_WEBSOCKET_URL=wss://tm.n00.stagnet3.vega.xyz/websocket -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml NX_VEGA_NETWORKS='{"SANDBOX":"https://sandbox.explorer.vega.xyz","STAGNET1":"https://stagnet1.token.vega.xyz", "STAGNET3":"https://stagnet3.explorer.vega.xyz","VALIDATOR_TESTNET":"https://validator-testnet.fairground.wtf","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}' NX_VEGA_ENV=STAGNET3 NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions diff --git a/apps/explorer/.env.devnet b/apps/explorer/.env.devnet index 8c965abac..22b999009 100644 --- a/apps/explorer/.env.devnet +++ b/apps/explorer/.env.devnet @@ -1,10 +1,10 @@ # App configuration variables NX_TENDERMINT_URL=https://tm.be.devnet1.vega.xyz/tm NX_TENDERMINT_WEBSOCKET_URL=wss://be.devnet1.vega.xyz/websocket -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/devnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/devnet1/vegawallet-devnet1.toml NX_VEGA_ENV=DEVNET NX_BLOCK_EXPLORER=https://be.devnet1.vega.xyz/rest NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_VEGA_GOVERNANCE_URL=https://dev.token.vega.xyz NX_VEGA_URL=https://api.devnet1.vega.xyz/graphql -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/devnet1-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/devnet1/vegawallet-devnet1.toml diff --git a/apps/explorer/.env.mainnet b/apps/explorer/.env.mainnet index c9db6ca60..73a40c4b9 100644 --- a/apps/explorer/.env.mainnet +++ b/apps/explorer/.env.mainnet @@ -1,8 +1,8 @@ # App configuration variables NX_TENDERMINT_URL=https://be.explorer.vega.xyz NX_TENDERMINT_WEBSOCKET_URL=wss://be.explorer.vega.xyz/websocket -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/mainnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/mainnet1/mainnet1.toml NX_VEGA_ENV=MAINNET NX_BLOCK_EXPLORER=https://be.explorer.vega.xyz/rest/ NX_ETHERSCAN_URL=https://etherscan.io -NX_VEGA_GOVERNANCE_URL=https://token.vega.xyz \ No newline at end of file +NX_VEGA_GOVERNANCE_URL=https://token.vega.xyz diff --git a/apps/explorer/.env.mirror b/apps/explorer/.env.mirror index 282267035..3ad5277e9 100644 --- a/apps/explorer/.env.mirror +++ b/apps/explorer/.env.mirror @@ -1,7 +1,7 @@ # App configuration variables NX_TENDERMINT_URL=https://tm.be.mainnet-mirror.vega.xyz NX_TENDERMINT_WEBSOCKET_URL=wss://be.mainnet-mirror.vega.xyz/websocket -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/mirror-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/mainnet-mirror/vegawallet-mainnet-mirror.toml NX_VEGA_ENV=MIRROR NX_BLOCK_EXPLORER=https://be.mainnet-mirror.vega.xyz/rest/ NX_ETHERSCAN_URL=https://sepolia.etherscan.io diff --git a/apps/explorer/.env.sandbox b/apps/explorer/.env.sandbox index 83e351f43..41b01badc 100644 --- a/apps/explorer/.env.sandbox +++ b/apps/explorer/.env.sandbox @@ -1,6 +1,6 @@ # App configuration variables NX_VEGA_ENV=SANDBOX -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/sandbox-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/sandbox/vegawallet-sandbox.toml NX_VEGA_EXPLORER_URL=https://sandbox.explorer.vega.xyz NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 diff --git a/apps/explorer/.env.stagnet1 b/apps/explorer/.env.stagnet1 index d3d225505..56ecf5dbf 100644 --- a/apps/explorer/.env.stagnet1 +++ b/apps/explorer/.env.stagnet1 @@ -1,7 +1,7 @@ NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet1-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet1/vegawallet-stagnet1.toml NX_VEGA_ENV=STAGNET1 NX_VEGA_EXPLORER_URL=https://stagnet1.explorer.vega.xyz NX_VEGA_TOKEN_URL=https://stagnet1.token.vega.xyz diff --git a/apps/explorer/.env.stagnet3 b/apps/explorer/.env.stagnet3 index 41c944c12..461d4cf8b 100644 --- a/apps/explorer/.env.stagnet3 +++ b/apps/explorer/.env.stagnet3 @@ -1,6 +1,6 @@ NX_TENDERMINT_URL=https://tm.n00.stagnet3.vega.xyz NX_TENDERMINT_WEBSOCKET_URL=wss://be.stagnet3.vega.xyz/websocket -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml NX_VEGA_ENV=STAGNET3 NX_BLOCK_EXPLORER=https://be.stagnet3.vega.xyz/rest NX_VEGA_GOVERNANCE_URL=https://stagnet3.token.vega.xyz diff --git a/apps/explorer/.env.testnet b/apps/explorer/.env.testnet index 6da08ce66..d79d0623d 100644 --- a/apps/explorer/.env.testnet +++ b/apps/explorer/.env.testnet @@ -2,9 +2,9 @@ NX_TENDERMINT_URL=https://tm.be.testnet.vega.xyz NX_BLOCK_EXPLORER=https://be.testnet.vega.xyz/rest NX_TENDERMINT_WEBSOCKET_URL=wss://be.testnet.vega.xyz/websocket -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/testnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/fairground/vegawallet-fairground.toml NX_VEGA_ENV=TESTNET NX_VEGA_URL=https://api.n07.testnet.vega.xyz/graphql NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz NX_ETHERSCAN_URL=https://sepolia.etherscan.io -NX_VEGA_GOVERNANCE_URL=https://token.fairground.wtf \ No newline at end of file +NX_VEGA_GOVERNANCE_URL=https://token.fairground.wtf diff --git a/apps/explorer/.env.validator-testnet b/apps/explorer/.env.validator-testnet index aa6f58e93..cf2d4c960 100644 --- a/apps/explorer/.env.validator-testnet +++ b/apps/explorer/.env.validator-testnet @@ -1,6 +1,6 @@ # App configuration variables NX_VEGA_ENV=VALIDATOR_TESTNET -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/validator-testnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/testnet2/testnet2.toml NX_VEGA_URL=https://api.validators-testnet.vega.xyz/graphql NX_VEGA_REST=https://api.validators-testnet.vega.xyz/ NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 diff --git a/apps/governance/.env b/apps/governance/.env index ad2cc883c..70a8aa548 100644 --- a/apps/governance/.env +++ b/apps/governance/.env @@ -1,6 +1,6 @@ # App configuration variables NX_VEGA_ENV=STAGNET3 -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml NX_VEGA_URL=https://api.stagnet3.vega.xyz/graphql NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 NX_ETHERSCAN_URL=https://sepolia.etherscan.io diff --git a/apps/governance/.env.devnet b/apps/governance/.env.devnet index b5f9f3ce1..633e6e244 100644 --- a/apps/governance/.env.devnet +++ b/apps/governance/.env.devnet @@ -1,6 +1,6 @@ # App configuration variables NX_VEGA_ENV=DEVNET -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/devnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/devnet1/vegawallet-devnet1.toml NX_VEGA_URL=https://api.n00.devnet1.vega.xyz/graphql NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}' NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 @@ -9,4 +9,4 @@ NX_GITHUB_FEEDBACK_URL=https://github.com/vegaprotocol/feedback/discussions NX_VEGA_EXPLORER_URL=https://dev.explorer.vega.xyz NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet NX_DELEGATIONS_PAGINATION=50 -NX_TRANCHES_SERVICE_URL=https://tranches-devnet1-k8s.ops.vega.xyz \ No newline at end of file +NX_TRANCHES_SERVICE_URL=https://tranches-devnet1-k8s.ops.vega.xyz diff --git a/apps/governance/.env.mainnet b/apps/governance/.env.mainnet index 005fd0f45..4f23f934c 100644 --- a/apps/governance/.env.mainnet +++ b/apps/governance/.env.mainnet @@ -1,6 +1,6 @@ # App configuration variables NX_VEGA_ENV=MAINNET -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/mainnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/mainnet1/mainnet1.toml NX_VEGA_URL=https://api.vega.xyz/query NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}' NX_ETHEREUM_PROVIDER_URL=https://mainnet.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 @@ -10,4 +10,4 @@ NX_VEGA_EXPLORER_URL=https://explorer.vega.xyz NX_VEGA_DOCS_URL=https://docs.vega.xyz/mainnet NX_SENTRY_DSN=https://4b8c8a8ba07742648aa4dfe1b8d17e40:87edc2605e544f888305d7fc4a9141bd@o286262.ingest.sentry.io/5882996 NX_DELEGATIONS_PAGINATION=50 -NX_TRANCHES_SERVICE_URL=https://tranches-mainnet-k8s.ops.vega.xyz \ No newline at end of file +NX_TRANCHES_SERVICE_URL=https://tranches-mainnet-k8s.ops.vega.xyz diff --git a/apps/governance/.env.mirror b/apps/governance/.env.mirror index 2013c4ec4..b19e33cb4 100644 --- a/apps/governance/.env.mirror +++ b/apps/governance/.env.mirror @@ -1,6 +1,6 @@ # App configuration variables NX_VEGA_ENV=MIRROR -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/mirror-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/mainnet-mirror/vegawallet-mainnet-mirror.toml NX_VEGA_URL=https://api.n00.mainnet-mirror.vega.xyz/graphql NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}' NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 diff --git a/apps/governance/.env.sandbox b/apps/governance/.env.sandbox index 47298aeb8..375c40dd8 100644 --- a/apps/governance/.env.sandbox +++ b/apps/governance/.env.sandbox @@ -2,7 +2,7 @@ NX_VEGA_URL=https://api.sandbox.vega.xyz/graphql NX_VEGA_ENV=SANDBOX NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","STAGNET1":"https://stagnet1.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}' -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/sandbox-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/sandbox/vegawallet-sandbox.toml NX_VEGA_EXPLORER_URL=https://sandbox.explorer.vega.xyz NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet NX_DELEGATIONS_PAGINATION=50 diff --git a/apps/governance/.env.stagnet1 b/apps/governance/.env.stagnet1 index 77ca95fa8..02f8dead9 100644 --- a/apps/governance/.env.stagnet1 +++ b/apps/governance/.env.stagnet1 @@ -2,8 +2,8 @@ NX_VEGA_URL=https://api.n00.stagnet1.vega.xyz/graphql NX_VEGA_ENV=STAGNET1 NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","STAGNET1":"https://stagnet1.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}' -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet1-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet1/vegawallet-stagnet1.toml NX_VEGA_EXPLORER_URL=https://stagnet1.explorer.vega.xyz NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet NX_DELEGATIONS_PAGINATION=50 -NX_TRANCHES_SERVICE_URL=https://tranches-stagnet1-k8s.ops.vega.xyz \ No newline at end of file +NX_TRANCHES_SERVICE_URL=https://tranches-stagnet1-k8s.ops.vega.xyz diff --git a/apps/governance/.env.stagnet3 b/apps/governance/.env.stagnet3 index 49cec2fc8..900fdf20b 100644 --- a/apps/governance/.env.stagnet3 +++ b/apps/governance/.env.stagnet3 @@ -2,9 +2,9 @@ NX_VEGA_URL=https://api.stagnet3.vega.xyz/graphql NX_VEGA_ENV=STAGNET3 NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}' -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml NX_VEGA_EXPLORER_URL=https://stagnet3.explorer.vega.xyz NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz NX_DELEGATIONS_PAGINATION=50 -NX_TRANCHES_SERVICE_URL=https://tranches-stagnet3-k8s.ops.vega.xyz \ No newline at end of file +NX_TRANCHES_SERVICE_URL=https://tranches-stagnet3-k8s.ops.vega.xyz diff --git a/apps/governance/.env.testnet b/apps/governance/.env.testnet index 84823e8a2..aca146870 100644 --- a/apps/governance/.env.testnet +++ b/apps/governance/.env.testnet @@ -1,6 +1,6 @@ # App configuration variables NX_VEGA_ENV=TESTNET -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/testnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/fairground/vegawallet-fairground.toml NX_VEGA_URL=https://api.n08.testnet.vega.xyz/graphql NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}' NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 @@ -10,4 +10,4 @@ NX_VEGA_EXPLORER_URL=https://explorer.fairground.wtf NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz NX_DELEGATIONS_PAGINATION=50 -NX_TRANCHES_SERVICE_URL=https://tranches-testnet-k8s.ops.vega.xyz \ No newline at end of file +NX_TRANCHES_SERVICE_URL=https://tranches-testnet-k8s.ops.vega.xyz diff --git a/apps/governance/.env.validator-testnet b/apps/governance/.env.validator-testnet index 8b16e1c58..bca039a58 100644 --- a/apps/governance/.env.validator-testnet +++ b/apps/governance/.env.validator-testnet @@ -1,6 +1,6 @@ # App configuration variables NX_VEGA_ENV=VALIDATOR_TESTNET -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/validator-testnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/testnet2/testnet2.toml NX_VEGA_URL=https://api.validators-testnet.vega.xyz/graphql NX_VEGA_REST=https://api.validators-testnet.vega.xyz/ NX_VEGA_NETWORKS='{"DEVNET":"https://dev.token.vega.xyz","STAGNET3":"https://stagnet3.token.vega.xyz","TESTNET":"https://token.fairground.wtf","MAINNET":"https://token.vega.xyz"}' diff --git a/apps/liquidity-provision-dashboard/.env b/apps/liquidity-provision-dashboard/.env index 24965cf0a..6573e8bbc 100644 --- a/apps/liquidity-provision-dashboard/.env +++ b/apps/liquidity-provision-dashboard/.env @@ -17,7 +17,7 @@ NX_INCOMING_HOOK_BODY=$INCOMING_HOOK_BODY NX_URL=$URL NX_DEPLOY_URL=$DEPLOY_URL NX_DEPLOY_PRIME_URL=$DEPLOY_PRIME_URL -NX_VEGA_CONFIG_URL="https://static.vega.xyz/assets/testnet-network.json" +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/fairground/vegawallet-fairground.toml NX_VEGA_ENV = 'TESTNET' NX_VEGA_URL="https://api.n11.testnet.vega.xyz/graphql" NX_VEGA_WALLET_URL=http://localhost:1789 diff --git a/apps/liquidity-provision-dashboard/.env.devnet b/apps/liquidity-provision-dashboard/.env.devnet index e45e00c9f..5afd02920 100644 --- a/apps/liquidity-provision-dashboard/.env.devnet +++ b/apps/liquidity-provision-dashboard/.env.devnet @@ -1,8 +1,8 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/devnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/devnet1/vegawallet-devnet1.toml NX_VEGA_URL=https://api.n04.d.vega.xyz/graphql NX_VEGA_ENV=DEVNET NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"} NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 NX_ETHERSCAN_URL=https://sepolia.etherscan.io -NX_VEGA_EXPLORER_URL=https://dev.explorer.vega.xyz \ No newline at end of file +NX_VEGA_EXPLORER_URL=https://dev.explorer.vega.xyz diff --git a/apps/liquidity-provision-dashboard/.env.mainnet b/apps/liquidity-provision-dashboard/.env.mainnet index f04c69cf0..c3d30ae52 100644 --- a/apps/liquidity-provision-dashboard/.env.mainnet +++ b/apps/liquidity-provision-dashboard/.env.mainnet @@ -1,5 +1,5 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/mainnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/mainnet1/mainnet1.toml NX_VEGA_URL=https://api.vega.xyz/query NX_VEGA_ENV=MAINNET NX_VEGA_NETWORKS={\"MAINNET\":\"https://alpha.console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\"} diff --git a/apps/liquidity-provision-dashboard/.env.stagnet1 b/apps/liquidity-provision-dashboard/.env.stagnet1 index d4a51d22b..bb7a88eb9 100644 --- a/apps/liquidity-provision-dashboard/.env.stagnet1 +++ b/apps/liquidity-provision-dashboard/.env.stagnet1 @@ -1,5 +1,5 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet1-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet1/vegawallet-stagnet1.toml NX_VEGA_URL=https://api.n00.stagnet1.vega.xyz/graphql NX_VEGA_ENV=STAGNET1 NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 diff --git a/apps/liquidity-provision-dashboard/.env.stagnet3 b/apps/liquidity-provision-dashboard/.env.stagnet3 index f5918216d..27e58cd05 100644 --- a/apps/liquidity-provision-dashboard/.env.stagnet3 +++ b/apps/liquidity-provision-dashboard/.env.stagnet3 @@ -1,8 +1,8 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml NX_VEGA_URL=https://api.stagnet3.vega.xyz/graphql NX_VEGA_ENV=STAGNET3 NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_VEGA_EXPLORER_URL=https://staging2.explorer.vega.xyz -NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"} \ No newline at end of file +NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"} diff --git a/apps/liquidity-provision-dashboard/.env.testnet b/apps/liquidity-provision-dashboard/.env.testnet index 89abc1ec3..fded68ffa 100644 --- a/apps/liquidity-provision-dashboard/.env.testnet +++ b/apps/liquidity-provision-dashboard/.env.testnet @@ -1,5 +1,5 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/testnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/fairground/vegawallet-fairground.toml NX_VEGA_URL=https://api.n11.testnet.vega.xyz/graphql NX_VEGA_ENV=TESTNET NX_VEGA_NETWORKS={\"MAINNET\":\"https://alpha.console.vega.xyz\",\"TESTNET\":\"https://console.fairground.wtf\"} diff --git a/apps/multisig-signer/.env b/apps/multisig-signer/.env index ddb4546bd..11619d228 100644 --- a/apps/multisig-signer/.env +++ b/apps/multisig-signer/.env @@ -1,5 +1,5 @@ NX_VEGA_URL=https://api.stagnet3.vega.xyz/graphql -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml NX_VEGA_NETWORKS='{"TESTNET":"https://multisig-signer.fairground.wtf","MAINNET":"https://multisig-signer.vega.xyz"}' NX_VEGA_ENV=STAGNET3 diff --git a/apps/multisig-signer/.env.devnet b/apps/multisig-signer/.env.devnet index 4155154bf..83e563ab3 100644 --- a/apps/multisig-signer/.env.devnet +++ b/apps/multisig-signer/.env.devnet @@ -1,5 +1,5 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/devnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/devnet1/vegawallet-devnet1.toml NX_VEGA_URL=https://api.n04.d.vega.xyz/graphql NX_VEGA_NETWORKS='{"TESTNET":"https://multisig-signer.fairground.wtf","MAINNET":"https://multisig-signer.vega.xyz"}' NX_VEGA_ENV=DEVNET diff --git a/apps/multisig-signer/.env.mainnet b/apps/multisig-signer/.env.mainnet index 59c595f17..7b7c76d24 100644 --- a/apps/multisig-signer/.env.mainnet +++ b/apps/multisig-signer/.env.mainnet @@ -1,5 +1,5 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/mainnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/mainnet1/mainnet1.toml NX_VEGA_URL=https://api.vega.xyz/query NX_VEGA_NETWORKS='{"TESTNET":"https://multisig-signer.fairground.wtf","MAINNET":"https://multisig-signer.vega.xyz"}' NX_VEGA_ENV=MAINNET diff --git a/apps/multisig-signer/.env.sandbox b/apps/multisig-signer/.env.sandbox index baa7a9415..09c51a52b 100644 --- a/apps/multisig-signer/.env.sandbox +++ b/apps/multisig-signer/.env.sandbox @@ -1,5 +1,5 @@ -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/sandbox-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/sandbox/vegawallet-sandbox.toml NX_VEGA_URL=https://api.sandbox.vega.xyz/graphql NX_VEGA_ENV=SANDBOX NX_VEGA_NETWORKS={\"DEVNET\":\"https://dev.token.vega.xyz\",\"STAGNET3\":\"https://stagnet3.token.vega.xyz\",\"STAGNET1\":\"https://stagnet1.token.vega.xyz\",\"TESTNET\":\"https://token.fairground.wtf\",\"MAINNET\":\"https://token.vega.xyz\"} -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/sandbox-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/sandbox/vegawallet-sandbox.toml diff --git a/apps/multisig-signer/.env.stagnet3 b/apps/multisig-signer/.env.stagnet3 index 93045d219..c044d7f1d 100644 --- a/apps/multisig-signer/.env.stagnet3 +++ b/apps/multisig-signer/.env.stagnet3 @@ -1,5 +1,5 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml NX_VEGA_URL=https://api.stagnet3.vega.xyz/graphql NX_VEGA_NETWORKS='{"TESTNET":"https://multisig-signer.fairground.wtf","MAINNET":"https://multisig-signer.vega.xyz"}' NX_VEGA_ENV=STAGNET3 diff --git a/apps/multisig-signer/.env.testnet b/apps/multisig-signer/.env.testnet index ae63ae5af..de6b3a29f 100644 --- a/apps/multisig-signer/.env.testnet +++ b/apps/multisig-signer/.env.testnet @@ -1,5 +1,5 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/testnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/fairground/vegawallet-fairground.toml NX_VEGA_URL=https://api.n09.testnet.vega.xyz/graphql NX_VEGA_NETWORKS='{"TESTNET":"https://multisig-signer.fairground.wtf","MAINNET":"https://multisig-signer.vega.xyz"}' NX_VEGA_ENV=TESTNET diff --git a/apps/multisig-signer/.env.validator-testnet b/apps/multisig-signer/.env.validator-testnet index 31a4b06e0..9e3502404 100644 --- a/apps/multisig-signer/.env.validator-testnet +++ b/apps/multisig-signer/.env.validator-testnet @@ -1,5 +1,5 @@ # App configuration variables -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/validator-testnet-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks/master/testnet2/testnet2.tom NX_VEGA_URL=https://api.validators-testnet.vega.xyz/graphql NX_VEGA_NETWORKS='{"TESTNET":"https://multisig-signer.fairground.wtf","MAINNET":"https://multisig-signer.vega.xyz"}' NX_VEGA_ENV=VALIDATOR_TESTNET diff --git a/apps/trading-e2e/.env.stagnet3 b/apps/trading-e2e/.env.stagnet3 index 0d5c911b6..886447ead 100644 --- a/apps/trading-e2e/.env.stagnet3 +++ b/apps/trading-e2e/.env.stagnet3 @@ -1,7 +1,7 @@ NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet NX_VEGA_ENV=STAGNET3 NX_VEGA_EXPLORER_URL=https://stagnet3.explorer.vega.xyz diff --git a/apps/trading/.env b/apps/trading/.env index ace275e46..aac3932ec 100644 --- a/apps/trading/.env +++ b/apps/trading/.env @@ -1,7 +1,7 @@ NX_ETHEREUM_PROVIDER_URL=https://sepolia.infura.io/v3/4f846e79e13f44d1b51bbd7ed9edefb8 NX_ETHERSCAN_URL=https://sepolia.etherscan.io NX_HOSTED_WALLET_URL=https://wallet.testnet.vega.xyz -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/stagnet3-network.json +NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/stagnet3/vegawallet-stagnet3.toml NX_VEGA_ENV=STAGNET3 NX_VEGA_EXPLORER_URL=https://stagnet3.explorer.vega.xyz NX_VEGA_NETWORKS={\"TESTNET\":\"https://console.fairground.wtf\",\"STAGNET1\":\"https://stagnet1.console.vega.xyz\",\"STAGNET3\":\"https://stagnet3.console.vega.xyz\"} diff --git a/apps/trading/.env.sandbox b/apps/trading/.env.sandbox index 5e381894f..51d102e8d 100644 --- a/apps/trading/.env.sandbox +++ b/apps/trading/.env.sandbox @@ -4,7 +4,6 @@ NX_HOSTED_WALLET_URL=https://wallet.sandbox.vega.xyz NX_VEGA_CONFIG_URL=https://raw.githubusercontent.com/vegaprotocol/networks-internal/main/sandbox/vegawallet-sandbox.toml NX_VEGA_ENV=SANDBOX NX_VEGA_NETWORKS={\"DEVNET\":\"https://dev.token.vega.xyz\",\"STAGNET3\":\"https://stagnet3.token.vega.xyz\",\"STAGNET1\":\"https://stagnet1.token.vega.xyz\",\"TESTNET\":\"https://token.fairground.wtf\",\"MAINNET\":\"https://token.vega.xyz\"} -NX_VEGA_CONFIG_URL=https://static.vega.xyz/assets/sandbox-network.json NX_VEGA_EXPLORER_URL=https://sandbox.explorer.vega.xyz NX_VEGA_DOCS_URL=https://docs.vega.xyz/testnet NX_VEGA_REPO_URL=https://github.com/vegaprotocol/vega/releases diff --git a/libs/environment/src/hooks/use-environment.spec.ts b/libs/environment/src/hooks/use-environment.spec.ts index 8fc770d24..d4b793e7c 100644 --- a/libs/environment/src/hooks/use-environment.spec.ts +++ b/libs/environment/src/hooks/use-environment.spec.ts @@ -36,11 +36,16 @@ const createDefaultMockClient = () => { global.fetch = jest.fn(); // eslint-disable-next-line -const setupFetch = (result: any) => { +const setupFetch = ({ hosts }: any) => { + const result = ` + [API] + [API.GraphQL] + Hosts = ${JSON.stringify(hosts)} + `; return () => { return Promise.resolve({ ok: true, - json: () => Promise.resolve(result), + text: () => Promise.resolve(result), }); }; }; @@ -102,7 +107,7 @@ describe('useEnvironment', () => { }; it('exposes env vars and sets VEGA_URL from config nodes', async () => { - const configUrl = 'https://vega.xyz/testnet-config.json'; + const configUrl = 'https://vega.xyz/testnet-config.toml'; process.env['NX_VEGA_CONFIG_URL'] = configUrl; const nodes = [ 'https://api.n00.foo.vega.xyz', @@ -137,7 +142,7 @@ describe('useEnvironment', () => { it('uses the first successfully responding node', async () => { jest.useFakeTimers(); - const configUrl = 'https://vega.xyz/testnet-config.json'; + const configUrl = 'https://vega.xyz/testnet-config.toml'; process.env['NX_VEGA_CONFIG_URL'] = configUrl; const slowNode = 'https://api.n00.foo.vega.xyz'; @@ -204,7 +209,7 @@ describe('useEnvironment', () => { }); it('passes a node if both queries and subscriptions working', async () => { - const configUrl = 'https://vega.xyz/testnet-config.json'; + const configUrl = 'https://vega.xyz/testnet-config.toml'; process.env['NX_VEGA_CONFIG_URL'] = configUrl; const successNode = 'https://api.n01.foo.vega.xyz'; const failNode = 'https://api.n00.foo.vega.xyz'; @@ -254,7 +259,7 @@ describe('useEnvironment', () => { }); it('fails initialization if no suitable node is found', async () => { - const configUrl = 'https://vega.xyz/testnet-config.json'; + const configUrl = 'https://vega.xyz/testnet-config.toml'; process.env['NX_VEGA_CONFIG_URL'] = configUrl; const nodes = [ 'https://api.n00.foo.vega.xyz', @@ -345,7 +350,7 @@ describe('useEnvironment', () => { }); it('allows for undefined VEGA_URL if VEGA_CONFIG_URL is set', async () => { - const configUrl = 'https://vega.xyz/testnet-config.json'; + const configUrl = 'https://vega.xyz/testnet-config.toml'; process.env['NX_VEGA_CONFIG_URL'] = configUrl; process.env['NX_VEGA_URL'] = undefined; const nodes = [ @@ -365,7 +370,7 @@ describe('useEnvironment', () => { }); it('handles error if node config cannot be fetched', async () => { - const configUrl = 'https://vega.xyz/testnet-config.json'; + const configUrl = 'https://vega.xyz/testnet-config.toml'; process.env['NX_VEGA_CONFIG_URL'] = configUrl; process.env['NX_VEGA_URL'] = undefined; // @ts-ignore setup mock fetch for config url @@ -385,7 +390,7 @@ describe('useEnvironment', () => { }); it('handles an invalid node config', async () => { - const configUrl = 'https://vega.xyz/testnet-config.json'; + const configUrl = 'https://vega.xyz/testnet-config.toml'; process.env['NX_VEGA_CONFIG_URL'] = configUrl; process.env['NX_VEGA_URL'] = undefined; // @ts-ignore: typscript doesn't recognise the mock implementation @@ -403,7 +408,7 @@ describe('useEnvironment', () => { }); it('uses stored url', async () => { - const configUrl = 'https://vega.xyz/testnet-config.json'; + const configUrl = 'https://vega.xyz/testnet-config.toml'; process.env['NX_VEGA_CONFIG_URL'] = configUrl; // @ts-ignore setup mock fetch for config url global.fetch.mockImplementation( @@ -435,39 +440,4 @@ describe('useEnvironment', () => { expect(result.current.VEGA_URL).toBe(newUrl); expect(localStorage.getItem(STORAGE_KEY)).toBe(newUrl); }); - - it('can fetch and parse toml network files', async () => { - process.env['NX_VEGA_CONFIG_URL'] = - 'https://raw.githubusercontent.com/mainnet1.toml'; - const textContent1 = ` - [API] - [API.GraphQL] - Hosts = [ - "http://t1.vega.community", - "http://t2.vega.community", - ] - `; - - const jsonSpy = jest.fn(); - const textSpy = jest.fn(() => Promise.resolve(textContent1)); - (global.fetch as jest.Mock).mockImplementation(() => { - return Promise.resolve({ - ok: true, - json: jsonSpy, - text: textSpy, - }); - }); - const { result } = setup(); - await act(async () => { - result.current.initialize(); - }); - await waitFor(() => { - expect(jsonSpy).not.toHaveBeenCalled(); - expect(textSpy).toHaveBeenCalled(); - expect(result.current.nodes).toEqual([ - 'http://t1.vega.community', - 'http://t2.vega.community', - ]); - }); - }); }); diff --git a/libs/environment/src/hooks/use-environment.ts b/libs/environment/src/hooks/use-environment.ts index eb4df44e7..0aa8d4f30 100644 --- a/libs/environment/src/hooks/use-environment.ts +++ b/libs/environment/src/hooks/use-environment.ts @@ -163,22 +163,15 @@ export const useInitializeEnv = () => { const fetchConfig = async (url?: string) => { if (!url) return []; const res = await fetch(url); - let cfg: Record; - if (url.match(/github(.+)\.toml$/)) { - const content = await res.text(); - const parsed = tomlParse(content); - const tomlResults = tomlConfigSchema.parse(parsed); - const { - API: { - GraphQL: { Hosts: hosts }, - }, - } = tomlResults; - cfg = { hosts }; - } else { - cfg = await res.json(); - } - const result = configSchema.parse(cfg); - return result.hosts; + const content = await res.text(); + const parsed = tomlParse(content); + const tomlResults = tomlConfigSchema.parse(parsed); + const { + API: { + GraphQL: { Hosts }, + }, + } = tomlResults; + return Hosts; }; /**