diff options
author | obscuren <geffobscura@gmail.com> | 2014-04-30 20:54:59 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-04-30 20:54:59 +0800 |
commit | c5481b7654b8ab35b2242befc3a5b235e6d70685 (patch) | |
tree | ca9f30bdca1b1488e18d0279b014765920d4a849 /ethereal | |
parent | 183dbcc6a0e56bf46f6406d47134f3b88eb5eef1 (diff) | |
download | go-tangerine-c5481b7654b8ab35b2242befc3a5b235e6d70685.tar.gz go-tangerine-c5481b7654b8ab35b2242befc3a5b235e6d70685.tar.zst go-tangerine-c5481b7654b8ab35b2242befc3a5b235e6d70685.zip |
getBalanceAt getStorageAt, fixed get balance api call
Diffstat (limited to 'ethereal')
-rw-r--r-- | ethereal/assets/ethereum.js | 4 | ||||
-rw-r--r-- | ethereal/assets/qml/webapp.qml | 2 | ||||
-rw-r--r-- | ethereal/assets/samplecoin.html | 8 |
3 files changed, 9 insertions, 5 deletions
diff --git a/ethereal/assets/ethereum.js b/ethereal/assets/ethereum.js index 916655d5e..fd5091bd1 100644 --- a/ethereal/assets/ethereum.js +++ b/ethereal/assets/ethereum.js @@ -29,7 +29,7 @@ window.eth = { postData({call: "create", args: [sec, value, gas, gasPrice, init, body]}, cb); }, - getStorage: function(address, storageAddress, cb) { + getStorageAt: function(address, storageAddress, cb) { postData({call: "getStorage", args: [address, storageAddress]}, cb); }, @@ -37,7 +37,7 @@ window.eth = { postData({call: "getKey"}, cb); }, - getBalance: function(address, cb) { + getBalanceAt: function(address, cb) { postData({call: "getBalance", args: [address]}, cb); }, diff --git a/ethereal/assets/qml/webapp.qml b/ethereal/assets/qml/webapp.qml index 2f3fef4d2..c0df0b66e 100644 --- a/ethereal/assets/qml/webapp.qml +++ b/ethereal/assets/qml/webapp.qml @@ -76,7 +76,7 @@ ApplicationWindow { case "getBalance": require(1); - postData(data._seed, eth.getStateObject(data.args[0]).Value()); + postData(data._seed, eth.getStateObject(data.args[0]).value()); break case "getKey": diff --git a/ethereal/assets/samplecoin.html b/ethereal/assets/samplecoin.html index 02efa8e01..3b039fb04 100644 --- a/ethereal/assets/samplecoin.html +++ b/ethereal/assets/samplecoin.html @@ -23,15 +23,19 @@ function tests() { function init() { eth.getKey(function(key) { - eth.getStorage(jefcoinAddr, key, function(storage) { + eth.getStorageAt(jefcoinAddr, key, function(storage) { document.querySelector("#currentAmount").innerHTML = "Amount: " + storage; }); eth.watch(jefcoinAddr, function(stateObject) { - eth.getStorage(jefcoinAddr, key, function(storage) { + eth.getStorageAt(jefcoinAddr, key, function(storage) { document.querySelector("#currentAmount").innerHTML = "Amount: " + storage; }); }); + + eth.getBalanceAt(key, function(balance) { + debug("balance", balance); + }) }); } |