feat(@wallet): add pokt network + fallbark
This commit is contained in:
parent
2accc52b15
commit
7d9a6f5a71
12
Makefile
12
Makefile
|
@ -316,12 +316,20 @@ $(QM_BINARIES): $(TS_SOURCES) | check-qt-dir
|
|||
|
||||
compile-translations: $(QM_BINARIES)
|
||||
|
||||
# default token is a free-tier token with limited capabilities and usage
|
||||
# limits; our docs should include directions for community contributor to setup
|
||||
# their own Pokt account and token instead of relying on this default token
|
||||
# during development
|
||||
DEFAULT_POKT_TOKEN := 849214fd2f85acead08f5184
|
||||
POKT_TOKEN ?= $(DEFAULT_POKT_TOKEN)
|
||||
NIM_PARAMS += -d:POKT_TOKEN:"$(POKT_TOKEN)"
|
||||
|
||||
# default token is a free-tier token with limited capabilities and usage
|
||||
# limits; our docs should include directions for community contributor to setup
|
||||
# their own Infura account and token instead of relying on this default token
|
||||
# during development
|
||||
DEFAULT_TOKEN := 220a1abb4b6943a093c35d0ce4fb0732
|
||||
INFURA_TOKEN ?= $(DEFAULT_TOKEN)
|
||||
DEFAULT_INFURA_TOKEN := 220a1abb4b6943a093c35d0ce4fb0732
|
||||
INFURA_TOKEN ?= $(DEFAULT_INFURA_TOKEN)
|
||||
NIM_PARAMS += -d:INFURA_TOKEN:"$(INFURA_TOKEN)"
|
||||
|
||||
DEFAULT_OPENSEA_API_KEY := ""
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
pipeline {
|
||||
agent { label 'linux' }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
library 'status-jenkins-lib@v1.6.3'
|
||||
library 'status-jenkins-lib@v1.6.8'
|
||||
|
||||
/* Options section can't access functions in objects. */
|
||||
def isPRBuild = utils.isPRBuild()
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
import json, os, chronicles, strutils
|
||||
import ../../constants as main_constants
|
||||
|
||||
# set via `nim c` param `-d:POKT_TOKEN:[token]`; should be set in CI/release builds
|
||||
const POKT_TOKEN {.strdefine.} = ""
|
||||
# allow runtime override via environment variable; core contributors can set a
|
||||
# release token in this way for local development
|
||||
let POKT_TOKEN_ENV = $getEnv("POKT_TOKEN")
|
||||
let POKT_TOKEN_RESOLVED =
|
||||
if POKT_TOKEN_ENV != "":
|
||||
POKT_TOKEN_ENV
|
||||
else:
|
||||
POKT_TOKEN
|
||||
|
||||
# set via `nim c` param `-d:INFURA_TOKEN:[token]`; should be set in CI/release builds
|
||||
const INFURA_TOKEN {.strdefine.} = ""
|
||||
# allow runtime override via environment variable; core contributors can set a
|
||||
|
@ -43,7 +54,8 @@ var NETWORKS* = %* [
|
|||
{
|
||||
"chainId": 1,
|
||||
"chainName": "Ethereum Mainnet",
|
||||
"rpcUrl": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"rpcUrl": "https://eth-mainnet.gateway.pokt.network/v1/lb/" & POKT_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "https://mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"blockExplorerUrl": "https://etherscan.io/",
|
||||
"iconUrl": "network/Network=Ethereum",
|
||||
"chainColor": "#627EEA",
|
||||
|
@ -58,7 +70,8 @@ var NETWORKS* = %* [
|
|||
{
|
||||
"chainId": 5,
|
||||
"chainName": "Goerli",
|
||||
"rpcUrl": "https://goerli.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"rpcUrl": "https://eth-goerli.gateway.pokt.network/v1/lb/" & POKT_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "https://goerli.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"blockExplorerUrl": "https://goerli.etherscan.io/",
|
||||
"iconUrl": "network/Network=Testnet",
|
||||
"chainColor": "#939BA1",
|
||||
|
@ -73,7 +86,8 @@ var NETWORKS* = %* [
|
|||
{
|
||||
"chainId": 10,
|
||||
"chainName": "Optimism",
|
||||
"rpcUrl": "https://optimism-mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"rpcUrl": "https://optimism-mainnet.gateway.pokt.network/v1/lb/" & POKT_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "https://optimism-mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"blockExplorerUrl": "https://optimistic.etherscan.io",
|
||||
"iconUrl": "network/Network=Optimism",
|
||||
"chainColor": "#E90101",
|
||||
|
@ -89,6 +103,7 @@ var NETWORKS* = %* [
|
|||
"chainId": 420,
|
||||
"chainName": "Optimism Goerli Testnet",
|
||||
"rpcUrl": "https://optimism-goerli.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "",
|
||||
"blockExplorerUrl": "https://goerli-optimism.etherscan.io/",
|
||||
"iconUrl": "network/Network=Testnet",
|
||||
"chainColor": "#939BA1",
|
||||
|
@ -103,7 +118,8 @@ var NETWORKS* = %* [
|
|||
{
|
||||
"chainId": 42161,
|
||||
"chainName": "Arbitrum",
|
||||
"rpcUrl": "https://arbitrum-mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"rpcUrl": "https://arbitrum-one.gateway.pokt.network/v1/lb/" & POKT_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "https://arbitrum-mainnet.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"blockExplorerUrl": "https://arbiscan.io/",
|
||||
"iconUrl": "network/Network=Arbitrum",
|
||||
"chainColor": "#51D0F0",
|
||||
|
@ -119,6 +135,7 @@ var NETWORKS* = %* [
|
|||
"chainId": 421613,
|
||||
"chainName": "Arbitrum Goerli",
|
||||
"rpcUrl": "https://arbitrum-goerli.infura.io/v3/" & INFURA_TOKEN_RESOLVED,
|
||||
"fallbackUrl": "",
|
||||
"blockExplorerUrl": "https://goerli.arbiscan.io/",
|
||||
"iconUrl": "network/Network=Testnet",
|
||||
"chainColor": "#939BA1",
|
||||
|
@ -138,6 +155,7 @@ if GANACHE_NETWORK_RPC_URL != "":
|
|||
"chainId": 1,
|
||||
"chainName": "Ethereum Mainnet",
|
||||
"rpcUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"fallbackUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"blockExplorerUrl": "https://etherscan.io/",
|
||||
"iconUrl": "network/Network=Ethereum",
|
||||
"chainColor": "#627EEA",
|
||||
|
@ -159,6 +177,7 @@ if GANACHE_NETWORK_RPC_URL != "":
|
|||
"chainId": 5,
|
||||
"chainName": "Goerli",
|
||||
"rpcUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"fallbackUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"blockExplorerUrl": "https://goerli.etherscan.io/",
|
||||
"iconUrl": "network/Network=Testnet",
|
||||
"chainColor": "#939BA1",
|
||||
|
@ -180,6 +199,7 @@ if GANACHE_NETWORK_RPC_URL != "":
|
|||
"chainId": 10,
|
||||
"chainName": "Optimism",
|
||||
"rpcUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"fallbackUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"blockExplorerUrl": "https://optimistic.etherscan.io",
|
||||
"iconUrl": "network/Network=Optimism",
|
||||
"chainColor": "#E90101",
|
||||
|
@ -195,6 +215,7 @@ if GANACHE_NETWORK_RPC_URL != "":
|
|||
"chainId": 420,
|
||||
"chainName": "Optimism Goerli Testnet",
|
||||
"rpcUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"fallbackUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"blockExplorerUrl": "https://goerli-optimism.etherscan.io/",
|
||||
"iconUrl": "network/Network=Testnet",
|
||||
"chainColor": "#939BA1",
|
||||
|
@ -210,6 +231,7 @@ if GANACHE_NETWORK_RPC_URL != "":
|
|||
"chainId": 42161,
|
||||
"chainName": "Arbitrum",
|
||||
"rpcUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"fallbackUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"blockExplorerUrl": "https://arbiscan.io/",
|
||||
"iconUrl": "network/Network=Arbitrum",
|
||||
"chainColor": "#51D0F0",
|
||||
|
@ -225,6 +247,7 @@ if GANACHE_NETWORK_RPC_URL != "":
|
|||
"chainId": 421613,
|
||||
"chainName": "Arbitrum Goerli",
|
||||
"rpcUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"fallbackUrl": GANACHE_NETWORK_RPC_URL,
|
||||
"blockExplorerUrl": "https://goerli.arbiscan.io/",
|
||||
"iconUrl": "network/Network=Testnet",
|
||||
"chainColor": "#939BA1",
|
||||
|
|
|
@ -9,6 +9,7 @@ type NetworkDto* = ref object
|
|||
layer* {.serializedFieldName("layer").}: int
|
||||
chainName* {.serializedFieldName("chainName").}: string
|
||||
rpcURL* {.serializedFieldName("rpcUrl").}: string
|
||||
fallbackURL* {.serializedFieldName("fallbackUrl").}: string
|
||||
blockExplorerURL* {.serializedFieldName("blockExplorerUrl").}: string
|
||||
iconURL* {.serializedFieldName("iconUrl").}: string
|
||||
nativeCurrencyName* {.serializedFieldName("nativeCurrencyName").}: string
|
||||
|
@ -26,6 +27,7 @@ proc `$`*(self: NetworkDto): string =
|
|||
chainName:{self.chainName},
|
||||
name:{self.chainName},
|
||||
rpcURL:{self.rpcURL},
|
||||
fallbackURL:{self.rpcURL},
|
||||
blockExplorerURL:{self.blockExplorerURL},
|
||||
iconURL:{self.iconURL},
|
||||
nativeCurrencyName:{self.nativeCurrencyName},
|
||||
|
|
|
@ -62,6 +62,7 @@ proc upsertNetwork*(self: Service, network: NetworkDto) =
|
|||
layer: network.layer,
|
||||
chainName: network.chainName,
|
||||
rpcURL: network.rpcURL,
|
||||
fallbackURL: network.fallbackURL,
|
||||
blockExplorerURL: network.blockExplorerURL,
|
||||
iconURL: network.iconURL,
|
||||
nativeCurrencyName: network.nativeCurrencyName,
|
||||
|
|
|
@ -36,6 +36,7 @@ type
|
|||
layer* {.serializedFieldName("layer").}: int
|
||||
chainName* {.serializedFieldName("chainName").}: string
|
||||
rpcURL* {.serializedFieldName("rpcUrl").}: string
|
||||
fallbackURL* {.serializedFieldName("fallbackUrl").}: string
|
||||
blockExplorerURL* {.serializedFieldName("blockExplorerUrl").}: string
|
||||
iconURL* {.serializedFieldName("iconUrl").}: string
|
||||
nativeCurrencyName* {.serializedFieldName("nativeCurrencyName").}: string
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 2d16e7b8910f40070086f3966ce8f9eb55ee8223
|
||||
Subproject commit 60e1978bb5917078830aab13e1f2e1b3da17e865
|
Loading…
Reference in New Issue