Use Ropsten as testnet instead of Rinkeby.
* make token registry contract address configurable * update documentation * indicate ropsten usage on github comment
This commit is contained in:
parent
a9c38ba3e5
commit
beca021050
|
@ -10,7 +10,7 @@ https://commiteth.com
|
||||||
The `master` branch is automatically deployed here.
|
The `master` branch is automatically deployed here.
|
||||||
|
|
||||||
|
|
||||||
Live testnet (Rinkeby) version:
|
Live testnet (Ropsten) version:
|
||||||
https://commiteth.com:444
|
https://commiteth.com:444
|
||||||
The `develop` branch is automatically deployed here.
|
The `develop` branch is automatically deployed here.
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
# Testing CommitETH
|
# 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
|
### General
|
||||||
|
|
||||||
For testing you will need:
|
For testing you will need:
|
||||||
* a web browser (Chrome is known to work, testing with others appreciated)
|
* 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
|
* 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.
|
* 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.
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@
|
||||||
[lein-auto "0.1.2"]
|
[lein-auto "0.1.2"]
|
||||||
[lein-less "1.7.5"]
|
[lein-less "1.7.5"]
|
||||||
[lein-shell "0.5.0"]
|
[lein-shell "0.5.0"]
|
||||||
[cider/cider-nrepl "0.14.0"]
|
[cider/cider-nrepl "0.15.0-snapshot"]
|
||||||
[lein-sha-version "0.1.1"]]
|
[lein-sha-version "0.1.1"]]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -7,16 +7,14 @@
|
||||||
(def token-data-atom (atom {}))
|
(def token-data-atom (atom {}))
|
||||||
|
|
||||||
(defn update-data []
|
(defn update-data []
|
||||||
(let [token-data
|
(let [test-data (env :testnet-token-data)
|
||||||
(if (env :on-testnet true)
|
|
||||||
(if-let [token-data (env :testnet-token-data)]
|
|
||||||
token-data
|
token-data
|
||||||
(token-reg/load-parity-tokenreg-data token-reg/STATUS-RINKEBY-ADDR))
|
(if (and (env :on-testnet true)
|
||||||
|
test-data)
|
||||||
(token-reg/load-parity-tokenreg-data token-reg/PARITY-MAINNET-ADDR))]
|
test-data
|
||||||
|
(token-reg/load-parity-tokenreg-data))]
|
||||||
(reset! token-data-atom token-data)))
|
(reset! token-data-atom token-data)))
|
||||||
|
|
||||||
|
|
||||||
(mount/defstate
|
(mount/defstate
|
||||||
token-data
|
token-data
|
||||||
:start
|
:start
|
||||||
|
|
|
@ -16,6 +16,10 @@
|
||||||
|
|
||||||
(defonce PARITY-MAINNET-ADDR "0x5f0281910af44bfb5fc7e86a404d0304b0e042f1")
|
(defonce PARITY-MAINNET-ADDR "0x5f0281910af44bfb5fc7e86a404d0304b0e042f1")
|
||||||
(defonce STATUS-RINKEBY-ADDR "0x4826Ee32532EeA00Bb71C17Da491f1B2D2193C21")
|
(defonce STATUS-RINKEBY-ADDR "0x4826Ee32532EeA00Bb71C17Da491f1B2D2193C21")
|
||||||
|
(defonce STATUS-ROPSTEN-ADDR "0x7d127a3e3b5e72cd8f15e7dee650abe4fcced2b9")
|
||||||
|
|
||||||
|
(defn tokenreg-addr []
|
||||||
|
(env :tokenreg-addr STATUS-ROPSTEN-ADDR))
|
||||||
|
|
||||||
|
|
||||||
(defn- load-tokenreg-contract [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
|
"Construct a mapping of ERC20 token mnemonic -> token data (name, address, digits, owner) from data
|
||||||
in Parity's mainnet token registry contract."
|
in Parity's mainnet token registry contract."
|
||||||
([]
|
([]
|
||||||
(load-parity-tokenreg-data PARITY-MAINNET-ADDR))
|
(load-parity-tokenreg-data (tokenreg-addr)))
|
||||||
([addr]
|
([addr]
|
||||||
|
(println "addr" addr)
|
||||||
(let [contract (load-tokenreg-contract addr)]
|
(let [contract (load-tokenreg-contract addr)]
|
||||||
;(assert (.isValid contract)) ;; web3j's isValid can't be trusted...
|
;(assert (.isValid contract)) ;; web3j's isValid can't be trusted...
|
||||||
(let [token-count (-> contract .tokenCount .get .getValue)]
|
(let [token-count (-> contract .tokenCount .get .getValue)]
|
||||||
|
|
|
@ -189,7 +189,7 @@
|
||||||
|
|
||||||
(defn network-text []
|
(defn network-text []
|
||||||
(str "Network: " (if (on-testnet?)
|
(str "Network: " (if (on-testnet?)
|
||||||
"Testnet (Rinkeby)"
|
"Testnet (Ropsten)"
|
||||||
"Mainnet")
|
"Mainnet")
|
||||||
"\n"))
|
"\n"))
|
||||||
|
|
||||||
|
@ -203,7 +203,7 @@
|
||||||
"\n")))
|
"\n")))
|
||||||
|
|
||||||
(defn contract-addr-text [addr]
|
(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")]
|
"https://etherscan.io")]
|
||||||
(str "Contract address: [" addr "](" url-base "/address/" addr ")\n")))
|
(str "Contract address: [" addr "](" url-base "/address/" addr ")\n")))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue