feat(login): Use Networks on status-go side
This commit is contained in:
parent
4ca7e9b32d
commit
a221c9d823
|
@ -1,162 +1,6 @@
|
|||
import json
|
||||
import ../../constants as main_constants
|
||||
|
||||
var NETWORKS* = %* [
|
||||
{
|
||||
"chainId": 1,
|
||||
"chainName": "Mainnet",
|
||||
"rpcUrl": "https://eth-archival.rpc.grove.city/v1/" & POKT_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"blockExplorerUrl": "https://etherscan.io/",
|
||||
"iconUrl": "network/Network=Ethereum",
|
||||
"chainColor": "#627EEA",
|
||||
"shortName": "eth",
|
||||
"nativeCurrencyName": "Ether",
|
||||
"nativeCurrencySymbol": "ETH",
|
||||
"nativeCurrencyDecimals": 18,
|
||||
"isTest": false,
|
||||
"layer": 1,
|
||||
"enabled": true,
|
||||
"relatedChainId": 5,
|
||||
},
|
||||
{
|
||||
"chainId": 5,
|
||||
"chainName": "Mainnet",
|
||||
"rpcUrl": "https://goerli.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "",
|
||||
"blockExplorerUrl": "https://goerli.etherscan.io/",
|
||||
"iconUrl": "network/Network=Ethereum",
|
||||
"chainColor": "#627EEA",
|
||||
"shortName": "eth",
|
||||
"nativeCurrencyName": "Ether",
|
||||
"nativeCurrencySymbol": "ETH",
|
||||
"nativeCurrencyDecimals": 18,
|
||||
"isTest": true,
|
||||
"layer": 1,
|
||||
"enabled": true,
|
||||
"relatedChainId": 1,
|
||||
},
|
||||
{
|
||||
"chainId": 10,
|
||||
"chainName": "Optimism",
|
||||
"rpcUrl": "https://optimism-mainnet.rpc.grove.city/v1/" & POKT_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "https://optimism-mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"blockExplorerUrl": "https://optimistic.etherscan.io",
|
||||
"iconUrl": "network/Network=Optimism",
|
||||
"chainColor": "#E90101",
|
||||
"shortName": "opt",
|
||||
"nativeCurrencyName": "Ether",
|
||||
"nativeCurrencySymbol": "ETH",
|
||||
"nativeCurrencyDecimals": 18,
|
||||
"isTest": false,
|
||||
"layer": 2,
|
||||
"enabled": true,
|
||||
"relatedChainId": 420,
|
||||
},
|
||||
{
|
||||
"chainId": 420,
|
||||
"chainName": "Optimism",
|
||||
"rpcUrl": "https://optimism-goerli.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "",
|
||||
"blockExplorerUrl": "https://goerli-optimism.etherscan.io/",
|
||||
"iconUrl": "network/Network=Optimism",
|
||||
"chainColor": "#E90101",
|
||||
"shortName": "opt",
|
||||
"nativeCurrencyName": "Ether",
|
||||
"nativeCurrencySymbol": "ETH",
|
||||
"nativeCurrencyDecimals": 18,
|
||||
"isTest": true,
|
||||
"layer": 2,
|
||||
"enabled": true,
|
||||
"relatedChainId": 10,
|
||||
},
|
||||
{
|
||||
"chainId": 42161,
|
||||
"chainName": "Arbitrum",
|
||||
"rpcUrl": "https://arbitrum-one.rpc.grove.city/v1/" & POKT_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "https://arbitrum-mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"blockExplorerUrl": "https://arbiscan.io/",
|
||||
"iconUrl": "network/Network=Arbitrum",
|
||||
"chainColor": "#51D0F0",
|
||||
"shortName": "arb",
|
||||
"nativeCurrencyName": "Ether",
|
||||
"nativeCurrencySymbol": "ETH",
|
||||
"nativeCurrencyDecimals": 18,
|
||||
"isTest": false,
|
||||
"layer": 2,
|
||||
"enabled": true,
|
||||
"relatedChainId": 421613,
|
||||
},
|
||||
{
|
||||
"chainId": 421613,
|
||||
"chainName": "Arbitrum",
|
||||
"rpcUrl": "https://arbitrum-goerli.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "",
|
||||
"blockExplorerUrl": "https://goerli.arbiscan.io/",
|
||||
"iconUrl": "network/Network=Arbitrum",
|
||||
"chainColor": "#51D0F0",
|
||||
"shortName": "arb",
|
||||
"nativeCurrencyName": "Ether",
|
||||
"nativeCurrencySymbol": "ETH",
|
||||
"nativeCurrencyDecimals": 18,
|
||||
"isTest": true,
|
||||
"layer": 2,
|
||||
"enabled": true,
|
||||
"relatedChainId": 42161,
|
||||
},
|
||||
{
|
||||
"chainId": 11155111,
|
||||
"chainName": "Mainnet",
|
||||
"rpcUrl": "https://sepolia-archival.rpc.grove.city/v1/" & POKT_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "https://sepolia.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"blockExplorerUrl": "https://sepolia.etherscan.io/",
|
||||
"iconUrl": "network/Network=Ethereum",
|
||||
"chainColor": "#627EEA",
|
||||
"shortName": "eth",
|
||||
"nativeCurrencyName": "Ether",
|
||||
"nativeCurrencySymbol": "ETH",
|
||||
"nativeCurrencyDecimals": 18,
|
||||
"isTest": true,
|
||||
"layer": 1,
|
||||
"enabled": true,
|
||||
"relatedChainId": 1,
|
||||
},
|
||||
{
|
||||
"chainId": 11155420,
|
||||
"chainName": "Optimism",
|
||||
"rpcUrl": "https://optimism-sepolia.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "",
|
||||
"blockExplorerUrl": "https://sepolia-optimism.etherscan.io/",
|
||||
"iconUrl": "network/Network=Optimism",
|
||||
"chainColor": "#E90101",
|
||||
"shortName": "opt",
|
||||
"nativeCurrencyName": "Ether",
|
||||
"nativeCurrencySymbol": "ETH",
|
||||
"nativeCurrencyDecimals": 18,
|
||||
"isTest": true,
|
||||
"layer": 2,
|
||||
"enabled": true,
|
||||
"relatedChainId": 10,
|
||||
},
|
||||
{
|
||||
"chainId": 421614,
|
||||
"chainName": "Arbitrum",
|
||||
"rpcUrl": "https://arbitrum-sepolia.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "",
|
||||
"blockExplorerUrl": "https://sepolia-explorer.arbitrum.io/",
|
||||
"iconUrl": "network/Network=Arbitrum",
|
||||
"chainColor": "#51D0F0",
|
||||
"shortName": "arb",
|
||||
"nativeCurrencyName": "Ether",
|
||||
"nativeCurrencySymbol": "ETH",
|
||||
"nativeCurrencyDecimals": 18,
|
||||
"isTest": true,
|
||||
"layer": 2,
|
||||
"enabled": true,
|
||||
"relatedChainId": 42161,
|
||||
}
|
||||
]
|
||||
|
||||
var NODE_CONFIG* = %* {
|
||||
"BrowsersConfig": {
|
||||
"Enabled": true
|
||||
|
@ -260,9 +104,9 @@ var NODE_CONFIG* = %* {
|
|||
},
|
||||
"InfuraAPIKey": INFURA_TOKEN_RESOLVED,
|
||||
"InfuraAPIKeySecret": INFURA_TOKEN_SECRET_RESOLVED,
|
||||
"PoktAPIKey": POKT_TOKEN_RESOLVED,
|
||||
"LoadAllTransfers": true,
|
||||
},
|
||||
"Networks": NETWORKS,
|
||||
"TorrentConfig": {
|
||||
"Enabled": true,
|
||||
"Port": TORRENT_CONFIG_PORT,
|
||||
|
|
|
@ -318,10 +318,8 @@ QtObject:
|
|||
|
||||
result = NODE_CONFIG.copy()
|
||||
result["ClusterConfig"]["Fleet"] = newJString($fleet)
|
||||
result["NetworkId"] = NETWORKS[0]{"chainId"}
|
||||
result["DataDir"] = "ethereum".newJString()
|
||||
result["UpstreamConfig"]["Enabled"] = true.newJBool()
|
||||
result["UpstreamConfig"]["URL"] = NETWORKS[0]{"rpcUrl"}
|
||||
result["ShhextConfig"]["InstallationID"] = newJString(installationId)
|
||||
|
||||
|
||||
|
@ -357,24 +355,10 @@ QtObject:
|
|||
result = %*{}
|
||||
|
||||
# mandatory params
|
||||
result["NetworkId"] = NETWORKS[0]{"chainId"}
|
||||
result["DataDir"] = %* "./ethereum/mainnet"
|
||||
result["KeyStoreDir"] = %* self.keyStoreDir.replace(main_constants.STATUSGODIR, "")
|
||||
result["KeycardPairingDataFile"] = %* main_constants.KEYCARDPAIRINGDATAFILE
|
||||
|
||||
# other params
|
||||
result["Networks"] = NETWORKS
|
||||
|
||||
result["UpstreamConfig"] = %* {
|
||||
"URL": NETWORKS[0]{"rpcUrl"},
|
||||
"Enabled": true,
|
||||
}
|
||||
|
||||
result["ShhextConfig"] = %* {
|
||||
"VerifyENSURL": NETWORKS[0]{"fallbackUrl"},
|
||||
"VerifyTransactionURL": NETWORKS[0]{"fallbackUrl"}
|
||||
}
|
||||
|
||||
result["WakuV2Config"] = %* {
|
||||
"Port": WAKU_V2_PORT,
|
||||
"UDPPort": WAKU_V2_PORT
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit f69ee07593e8e35bb029f62de670b5554d71c932
|
||||
Subproject commit 7b3515c19eacf9f661de20f78934e0c0d82c2836
|
Loading…
Reference in New Issue