fix(@test): token override

This commit is contained in:
Anthony Laibe 2022-10-20 13:25:16 +02:00 committed by Anthony Laibe
parent 6e664564e0
commit 6c90034b6b
2 changed files with 44 additions and 29 deletions

View File

@ -13,23 +13,52 @@ let INFURA_TOKEN_RESOLVED =
INFURA_TOKEN
const GOERLI_NETWORK_RPC_URL = $getEnv("GOERLI_NETWORK_RPC_URL")
let OVERRIDE_TOKENS =
if GOERLI_NETWORK_RPC_URL != "":
@[
{
"symbol": "STT",
"address": "0x8571Ddc46b10d31EF963aF49b6C7799Ea7eff818"
}
]
else:
@[]
let GOERLI_RPC_URL_RESOLVED =
if GOERLI_NETWORK_RPC_URL != "":
GOERLI_NETWORK_RPC_URL
else:
"https://goerli.infura.io/v3/" & INFURA_TOKEN_RESOLVED
let GOERLI_CONFIG =
if GOERLI_NETWORK_RPC_URL != "":
%* {
"chainId": 5,
"chainName": "Goerli",
"rpcUrl": GOERLI_RPC_URL_RESOLVED,
"blockExplorerUrl": "https://goerli.etherscan.io/",
"iconUrl": "network/Network=Testnet",
"chainColor": "#939BA1",
"shortName": "goeEth",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": true,
"layer": 1,
"enabled": true,
"tokenOverrides": [
{
"symbol": "STT",
"address": "0x8571Ddc46b10d31EF963aF49b6C7799Ea7eff818"
}
]
}
else:
%* {
"chainId": 5,
"chainName": "Goerli",
"rpcUrl": GOERLI_RPC_URL_RESOLVED,
"blockExplorerUrl": "https://goerli.etherscan.io/",
"iconUrl": "network/Network=Testnet",
"chainColor": "#939BA1",
"shortName": "goeEth",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": true,
"layer": 1,
"enabled": true,
}
const OPENSEA_API_KEY {.strdefine.} = ""
# allow runtime override via environment variable; core contributors can set a
# an opensea API key in this way for local development
@ -61,22 +90,6 @@ let NETWORKS* = %* [
"layer": 1,
"enabled": true,
},
{
"chainId": 5,
"chainName": "Goerli",
"rpcUrl": GOERLI_RPC_URL_RESOLVED,
"blockExplorerUrl": "https://goerli.etherscan.io/",
"iconUrl": "network/Network=Testnet",
"chainColor": "#939BA1",
"shortName": "goeEth",
"nativeCurrencyName": "Ether",
"nativeCurrencySymbol": "ETH",
"nativeCurrencyDecimals": 18,
"isTest": true,
"layer": 1,
"enabled": true,
"overrideTokens": OVERRIDE_TOKENS.toJson
},
{
"chainId": 10,
"chainName": "Optimism",
@ -139,6 +152,8 @@ let NETWORKS* = %* [
}
]
NETWORKS.elems.add(GOERLI_CONFIG)
var NODE_CONFIG* = %* {
"BrowsersConfig": {
"Enabled": true
@ -227,4 +242,4 @@ var NODE_CONFIG* = %* {
"DataDir": DEFAULT_TORRENT_CONFIG_DATADIR,
"TorrentDir": DEFAULT_TORRENT_CONFIG_TORRENTDIR
}
}
}

2
vendor/status-go vendored

@ -1 +1 @@
Subproject commit 616a58f5c9a82073ac7911a307515c071d59ea43
Subproject commit 37c9eb1a9d3f539a0beec7ed7fa371012318cbdd