aboutsummaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-01-29 07:24:00 +0800
committerobscuren <geffobscura@gmail.com>2015-01-29 07:24:18 +0800
commitec85458612e1d5374767f87005dd0ad5934f74d5 (patch)
treea7e11798765bd56eb088259f2ab4401ec87e4f24 /cmd
parent73dcbf7ba23ea4d4d87d4261ff7ebaecfe0ec810 (diff)
downloaddexon-ec85458612e1d5374767f87005dd0ad5934f74d5.tar.gz
dexon-ec85458612e1d5374767f87005dd0ad5934f74d5.tar.zst
dexon-ec85458612e1d5374767f87005dd0ad5934f74d5.zip
updated ethereum.js and moved to subfolder
* Previous subtree caused a lot of trouble * Implemented sha3 in our shiny new http JSON RPC
Diffstat (limited to 'cmd')
-rw-r--r--cmd/mist/assets/ext/ethereum.js/dist/ethereum.js5
-rw-r--r--cmd/mist/assets/ext/filter.js66
-rw-r--r--cmd/mist/assets/ext/http.js30
-rw-r--r--cmd/mist/assets/qml/views/browser.qml2
4 files changed, 101 insertions, 2 deletions
diff --git a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js
index 7e7be6d9d..74da740bd 100644
--- a/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js
+++ b/cmd/mist/assets/ext/ethereum.js/dist/ethereum.js
@@ -550,6 +550,9 @@ var contract = function (address, desc) {
result[displayName][typeName] = impl;
});
+ console.log("call:")
+ console.log(result.call)
+ console.log(JSON.stringify(result));
return result;
};
@@ -1195,4 +1198,4 @@ module.exports = web3;
},{"./lib/abi":1,"./lib/contract":2,"./lib/filter":3,"./lib/httpsync":4,"./lib/providermanager":5,"./lib/qtsync":6,"./lib/web3":7}]},{},["web3"])
-//# sourceMappingURL=ethereum.js.map \ No newline at end of file
+//# sourceMappingURL=ethereum.js.map
diff --git a/cmd/mist/assets/ext/filter.js b/cmd/mist/assets/ext/filter.js
new file mode 100644
index 000000000..f8529c54b
--- /dev/null
+++ b/cmd/mist/assets/ext/filter.js
@@ -0,0 +1,66 @@
+// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+// MA 02110-1301 USA
+
+var ethx = {
+ prototype: Object,
+
+ watch: function(options) {
+ return new Filter(options);
+ },
+
+ note: function() {
+ var args = Array.prototype.slice.call(arguments, 0);
+ var o = []
+ for(var i = 0; i < args.length; i++) {
+ o.push(args[i].toString())
+ }
+
+ eth.notef(o);
+ },
+};
+
+var Filter = function(options) {
+ this.callbacks = [];
+ this.options = options;
+
+ if(options === "chain") {
+ this.id = eth.newFilterString(options);
+ } else if(typeof options === "object") {
+ this.id = eth.newFilter(options);
+ }
+};
+
+Filter.prototype.changed = function(callback) {
+ this.callbacks.push(callback);
+
+ var self = this;
+ messages.connect(function(messages, id) {
+ if(id == self.id) {
+ for(var i = 0; i < self.callbacks.length; i++) {
+ self.callbacks[i].call(self, messages);
+ }
+ }
+ });
+};
+
+Filter.prototype.uninstall = function() {
+ eth.uninstallFilter(this.id)
+}
+
+Filter.prototype.messages = function() {
+ return eth.messages(this.id)
+}
diff --git a/cmd/mist/assets/ext/http.js b/cmd/mist/assets/ext/http.js
new file mode 100644
index 000000000..81908266f
--- /dev/null
+++ b/cmd/mist/assets/ext/http.js
@@ -0,0 +1,30 @@
+// Copyright (c) 2013-2014, Jeffrey Wilcke. All rights reserved.
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+// General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+// MA 02110-1301 USA
+
+// this function is included locally, but you can also include separately via a header definition
+function request(url, callback) {
+ var xhr = new XMLHttpRequest();
+ xhr.onreadystatechange = (function(req) {
+ return function() {
+ if(req.readyState === 4) {
+ callback(req);
+ }
+ }
+ })(xhr);
+ xhr.open('GET', url, true);
+ xhr.send('');
+}
diff --git a/cmd/mist/assets/qml/views/browser.qml b/cmd/mist/assets/qml/views/browser.qml
index 0b70e0120..d6a762278 100644
--- a/cmd/mist/assets/qml/views/browser.qml
+++ b/cmd/mist/assets/qml/views/browser.qml
@@ -155,7 +155,7 @@ Rectangle {
onLoadingChanged: {
if (loadRequest.status == WebEngineView.LoadSucceededStatus) {
webview.runJavaScript(eth.readFile("bignumber.min.js"));
- webview.runJavaScript(eth.readFile("dist/ethereum.js"));
+ webview.runJavaScript(eth.readFile("ethereum.js/dist/ethereum.js"));
}
}
onJavaScriptConsoleMessage: {