aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal/assets
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-08-15 07:07:40 +0800
committerobscuren <geffobscura@gmail.com>2014-08-15 07:07:40 +0800
commitc362172567e7bd499ea0d0bcf84c54a9b7788614 (patch)
treee1b15a860e6c2a286d441ef1e69bdfd0f0b64efb /ethereal/assets
parentaadc5be3ff9e3818e41d83910b9730e5f1af042e (diff)
downloaddexon-c362172567e7bd499ea0d0bcf84c54a9b7788614.tar.gz
dexon-c362172567e7bd499ea0d0bcf84c54a9b7788614.tar.zst
dexon-c362172567e7bd499ea0d0bcf84c54a9b7788614.zip
Got rid of warnings and updated storage getters
Diffstat (limited to 'ethereal/assets')
-rw-r--r--ethereal/assets/ext/ethereum.js12
-rw-r--r--ethereal/assets/ext/test.html3
-rw-r--r--ethereal/assets/qml/webapp.qml2
3 files changed, 10 insertions, 7 deletions
diff --git a/ethereal/assets/ext/ethereum.js b/ethereal/assets/ext/ethereum.js
index 5891fb9f9..03b25179b 100644
--- a/ethereal/assets/ext/ethereum.js
+++ b/ethereal/assets/ext/ethereum.js
@@ -1,6 +1,8 @@
// Main Ethereum library
window.eth = {
prototype: Object(),
+ _callbacks: {},
+ _onCallbacks: {},
mutan: function(code) {
},
@@ -103,8 +105,8 @@ window.eth = {
postData({call: "getStorage", args: [address, storageAddress]}, cb);
},
- getStateKeyVals: function(address, cb){
- postData({call: "getStateKeyVals", args: [address]}, cb);
+ getEachStorageAt: function(address, cb){
+ postData({call: "getEachStorage", args: [address]}, cb);
},
getKey: function(cb) {
@@ -221,17 +223,15 @@ window.eth = {
},
}
-window.eth._callbacks = {}
-window.eth._onCallbacks = {}
var Filter = function(options) {
this.options = options;
};
-
Filter.prototype.changed = function(callback) {
+ // Register the watched:<number>. Qml will call the appropriate event if anything
+ // interesting happens in the land of Go.
eth.on("watched:"+this.number, callback)
}
-
Filter.prototype.getMessages = function(cb) {
return eth.getMessages(this.options, cb)
}
diff --git a/ethereal/assets/ext/test.html b/ethereal/assets/ext/test.html
index b605e8dbd..0d6b710fa 100644
--- a/ethereal/assets/ext/test.html
+++ b/ethereal/assets/ext/test.html
@@ -22,6 +22,9 @@ function test() {
console.log("getMessages", messages)
});
+ eth.getEachStorageAt("9ef0f0d81e040012600b0c1abdef7c48f720f88a", function(a, b) {
+ console.log(a,b)
+ })
}
</script>
diff --git a/ethereal/assets/qml/webapp.qml b/ethereal/assets/qml/webapp.qml
index b0f50c8f9..5faf50e91 100644
--- a/ethereal/assets/qml/webapp.qml
+++ b/ethereal/assets/qml/webapp.qml
@@ -193,7 +193,7 @@ ApplicationWindow {
break
- case "getStateKeyVals":
+ case "getEachStorage":
require(1);
var stateObject = eth.getStateObject(data.args[0]).stateKeyVal(true)
postData(data._seed,stateObject)