diff --git a/src/status_im/constants.cljs b/src/status_im/constants.cljs index 66d4858225..471bfbd4a8 100644 --- a/src/status_im/constants.cljs +++ b/src/status_im/constants.cljs @@ -83,7 +83,18 @@ :config {:NetworkId (ethereum/chain-keyword->chain-id :rinkeby) :DataDir "/ethereum/rinkeby_rpc" :UpstreamConfig {:Enabled true - :URL "https://rinkeby.infura.io/v3/f315575765b14720b32382a61a89341a"}}}}) + :URL "https://rinkeby.infura.io/v3/f315575765b14720b32382a61a89341a"}}} + "goerli" {:id "goerli", + :name "Goerli", + :config {:NetworkId (ethereum/chain-keyword->chain-id :goerli) + :DataDir "/ethereum/goerli" + :LightEthConfig {:Enabled true}}} + "goerli_rpc" {:id "goerli_rpc", + :name "Goerli with upstream RPC", + :config {:NetworkId (ethereum/chain-keyword->chain-id :goerli) + :DataDir "/ethereum/goerli_rpc" + :UpstreamConfig {:Enabled true + :URL "https://goerli.blockscout.com/"}}}}) (defn network-enabled? [network] (let [rpc-network? (get-in (val network) [:config :UpstreamConfig :Enabled]) diff --git a/src/status_im/ethereum/core.cljs b/src/status_im/ethereum/core.cljs index e710072849..bb2e5a48a2 100644 --- a/src/status_im/ethereum/core.cljs +++ b/src/status_im/ethereum/core.cljs @@ -11,7 +11,8 @@ :testnet {:id 3 :name "Ropsten"} :rinkeby {:id 4 :name "Rinkeby"} :xdai {:id 100 :name "xDai"} - :poa {:id 99 :name "POA"}}) + :poa {:id 99 :name "POA"} + :goerli {:id 5 :name "Goerli"}}) (defn chain-id->chain-keyword [i] (or (some #(when (= i (:id (val %))) (key %)) chains) @@ -22,7 +23,8 @@ (defn testnet? [id] (contains? #{(chain-keyword->chain-id :testnet) - (chain-keyword->chain-id :rinkeby)} id)) + (chain-keyword->chain-id :rinkeby) + (chain-keyword->chain-id :goerli)} id)) (defn sidechain? [id] (contains? #{(chain-keyword->chain-id :xdai)