diff --git a/README.md b/README.md index e7c3487..785943a 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ https://commiteth.com The `master` branch is automatically deployed here. -Live testnet (Rinkeby) version: +Live testnet (Ropsten) version: https://commiteth.com:444 The `develop` branch is automatically deployed here. diff --git a/doc/testing.md b/doc/testing.md index 4c9b096..c2316c6 100644 --- a/doc/testing.md +++ b/doc/testing.md @@ -1,12 +1,12 @@ # Testing CommitETH -We have a continuously deployed version tracking the `development` branch live at https://commiteth.com:444. It uses the [Rinkeby](https://rinkeby.io/) Ethereum testnet. Any one is welcome to use it and your help with testing CommitETH is greatly appreciated! +We have a continuously deployed version tracking the `development` branch live at https://commiteth.com:444. It uses the [Ropsten](https://ropsten.io/) Ethereum testnet. Any one is welcome to use it and your help with testing CommitETH is greatly appreciated! ### General For testing you will need: * a web browser (Chrome is known to work, testing with others appreciated) -* an Ethereum account on the Rinkeby testnet +* an Ethereum account on the Ropsten testnet * a Github account with administrative access to one or more repositories * for approving bounty payouts you will additionally need access to an Ethereum wallet. So far, Mist and [MetaMask](https://metamask.io/) have been used, but anything that provides the web3 javascript interface should work. diff --git a/project.clj b/project.clj index e42b169..bafd64e 100644 --- a/project.clj +++ b/project.clj @@ -69,7 +69,7 @@ [lein-auto "0.1.2"] [lein-less "1.7.5"] [lein-shell "0.5.0"] - [cider/cider-nrepl "0.14.0"] + [cider/cider-nrepl "0.15.0-snapshot"] [lein-sha-version "0.1.1"]] diff --git a/src/clj/commiteth/eth/token_data.clj b/src/clj/commiteth/eth/token_data.clj index f24cd34..553f4b1 100644 --- a/src/clj/commiteth/eth/token_data.clj +++ b/src/clj/commiteth/eth/token_data.clj @@ -7,16 +7,14 @@ (def token-data-atom (atom {})) (defn update-data [] - (let [token-data - (if (env :on-testnet true) - (if-let [token-data (env :testnet-token-data)] - token-data - (token-reg/load-parity-tokenreg-data token-reg/STATUS-RINKEBY-ADDR)) - - (token-reg/load-parity-tokenreg-data token-reg/PARITY-MAINNET-ADDR))] + (let [test-data (env :testnet-token-data) + token-data + (if (and (env :on-testnet true) + test-data) + test-data + (token-reg/load-parity-tokenreg-data))] (reset! token-data-atom token-data))) - (mount/defstate token-data :start diff --git a/src/clj/commiteth/eth/token_registry.clj b/src/clj/commiteth/eth/token_registry.clj index d96cffe..2d60cc9 100644 --- a/src/clj/commiteth/eth/token_registry.clj +++ b/src/clj/commiteth/eth/token_registry.clj @@ -16,6 +16,10 @@ (defonce PARITY-MAINNET-ADDR "0x5f0281910af44bfb5fc7e86a404d0304b0e042f1") (defonce STATUS-RINKEBY-ADDR "0x4826Ee32532EeA00Bb71C17Da491f1B2D2193C21") +(defonce STATUS-ROPSTEN-ADDR "0x7d127a3e3b5e72cd8f15e7dee650abe4fcced2b9") + +(defn tokenreg-addr [] + (env :tokenreg-addr STATUS-ROPSTEN-ADDR)) (defn- load-tokenreg-contract [addr] @@ -30,8 +34,9 @@ "Construct a mapping of ERC20 token mnemonic -> token data (name, address, digits, owner) from data in Parity's mainnet token registry contract." ([] - (load-parity-tokenreg-data PARITY-MAINNET-ADDR)) + (load-parity-tokenreg-data (tokenreg-addr))) ([addr] + (println "addr" addr) (let [contract (load-tokenreg-contract addr)] ;(assert (.isValid contract)) ;; web3j's isValid can't be trusted... (let [token-count (-> contract .tokenCount .get .getValue)] diff --git a/src/clj/commiteth/github/core.clj b/src/clj/commiteth/github/core.clj index 13001c9..7233ca6 100644 --- a/src/clj/commiteth/github/core.clj +++ b/src/clj/commiteth/github/core.clj @@ -189,7 +189,7 @@ (defn network-text [] (str "Network: " (if (on-testnet?) - "Testnet (Rinkeby)" + "Testnet (Ropsten)" "Mainnet") "\n")) @@ -203,7 +203,7 @@ "\n"))) (defn contract-addr-text [addr] - (let [url-base (if (on-testnet?) "https://rinkeby.etherscan.io" + (let [url-base (if (on-testnet?) "https://ropsten.etherscan.io" "https://etherscan.io")] (str "Contract address: [" addr "](" url-base "/address/" addr ")\n")))