diff options
author | Maran <maran.hidskes@gmail.com> | 2014-05-05 20:17:20 +0800 |
---|---|---|
committer | Maran <maran.hidskes@gmail.com> | 2014-05-05 20:17:20 +0800 |
commit | cb9ca992debfcef83f79b2c606955e6688880694 (patch) | |
tree | 91133b39f56ab5292a538a353ab3c55c3b951383 /ethereal/assets/samplecoin | |
parent | e94e5ac75dbbc4ec52228ae11377a4fa71ab95ab (diff) | |
parent | 91824af46b59b7af84c7591236fe8b34b667ddb8 (diff) | |
download | go-tangerine-cb9ca992debfcef83f79b2c606955e6688880694.tar go-tangerine-cb9ca992debfcef83f79b2c606955e6688880694.tar.gz go-tangerine-cb9ca992debfcef83f79b2c606955e6688880694.tar.bz2 go-tangerine-cb9ca992debfcef83f79b2c606955e6688880694.tar.lz go-tangerine-cb9ca992debfcef83f79b2c606955e6688880694.tar.xz go-tangerine-cb9ca992debfcef83f79b2c606955e6688880694.tar.zst go-tangerine-cb9ca992debfcef83f79b2c606955e6688880694.zip |
Merge branch 'develop' into feature/rpc
Diffstat (limited to 'ethereal/assets/samplecoin')
-rw-r--r-- | ethereal/assets/samplecoin/samplecoin.html | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/ethereal/assets/samplecoin/samplecoin.html b/ethereal/assets/samplecoin/samplecoin.html index 02e2bd6ea..c1ee941a2 100644 --- a/ethereal/assets/samplecoin/samplecoin.html +++ b/ethereal/assets/samplecoin/samplecoin.html @@ -5,9 +5,11 @@ <link rel="stylesheet" href="bootstrap.min.css"> <link rel="stylesheet" href="bootstrap-theme.min.css"> <link rel="stylesheet" href="samplecoin.css"> +<script src="promise.min.js"></script> <meta name="viewport" content="minimum-scale=1; maximum-scale=1; initial-scale=1;"> <script type="text/javascript"> + var jefcoinAddr = "3dff537f51350239abc95c76a5864aa605259e7d" var mAddr = "" @@ -17,24 +19,24 @@ function createTransaction() { var data = (("0x"+addr).pad(32) + amount.pad(32)).unbin() eth.transact(mAddr, jefcoinAddr, 0, "10000000", "250", data, function(receipt) { - debug("received tx hash:", receipt) + debug("received tx hash:", reciept.address) }) } function init() { - eth.set({width: 500}) - - eth.getKey(function(keyPair) { - mAddr = keyPair.privateKey; + eth.set({width: 500}); - eth.getStorageAt(jefcoinAddr, keyPair.address, function(storage) { - document.querySelector("#current-amount").innerHTML = storage; - }); + eth.getKey(function(sec) { + eth.getSecretToAddress(sec, function(addr) { + mAddr = addr; - eth.watch(jefcoinAddr, function(stateObject) { - eth.getStorageAt(jefcoinAddr, keyPair.address, function(storage) { + eth.getStorageAt(jefcoinAddr, addr, function(storage) { document.querySelector("#current-amount").innerHTML = storage; }); + + eth.watch(jefcoinAddr, addr, function(addr, value) { + document.querySelector("#current-amount").innerHTML = value + }); }); }); } |