From b31d233ecd2bef12706ea642e55a14be45e4eb20 Mon Sep 17 00:00:00 2001 From: Gav Wood Date: Tue, 17 Jun 2014 16:24:37 +0100 Subject: [PATCH] Load JS menu item. Newer addresses in AZ --- alethzero/Main.ui | 19 +++++++++++++------ alethzero/MainWin.cpp | 7 +++++++ alethzero/MainWin.h | 1 + libethereum/Executive.cpp | 2 ++ stdserv.js | 4 ++-- 5 files changed, 25 insertions(+), 8 deletions(-) diff --git a/alethzero/Main.ui b/alethzero/Main.ui index e534a2147..5d5919b23 100644 --- a/alethzero/Main.ui +++ b/alethzero/Main.ui @@ -95,8 +95,8 @@ - - + + about:blank @@ -117,7 +117,7 @@ 0 0 1711 - 20 + 27 @@ -148,6 +148,8 @@ + + @@ -475,7 +477,7 @@ 510 - 360 + 386 @@ -1046,8 +1048,8 @@ 0 - - + + about:blank @@ -1410,6 +1412,11 @@ font-family: Monospace, Ubuntu Mono, Lucida Console, Courier New Use &Past Peers + + + &Load Javascript... + + diff --git a/alethzero/MainWin.cpp b/alethzero/MainWin.cpp index 043988c57..f903b3910 100644 --- a/alethzero/MainWin.cpp +++ b/alethzero/MainWin.cpp @@ -285,6 +285,13 @@ void Main::load(QString _s) } // env.load("/home/gav/eth/init.eth") +void Main::on_loadJS_triggered() +{ + QString f = QFileDialog::getOpenFileName(this, "Load Javascript", QString(), "Javascript (*.js);;All files (*)"); + if (f.size()) + load(f); +} + void Main::note(QString _s) { cnote << _s.toStdString(); diff --git a/alethzero/MainWin.h b/alethzero/MainWin.h index 5bf7fa5fa..3afdf8aeb 100644 --- a/alethzero/MainWin.h +++ b/alethzero/MainWin.h @@ -110,6 +110,7 @@ private slots: void on_inject_triggered(); void on_showAll_triggered() { refresh(true); } void on_showAllAccounts_triggered() { refresh(true); } + void on_loadJS_triggered(); void refresh(bool _override = false); void refreshNetwork(); diff --git a/libethereum/Executive.cpp b/libethereum/Executive.cpp index 1744e1fe0..274c55f08 100644 --- a/libethereum/Executive.cpp +++ b/libethereum/Executive.cpp @@ -26,6 +26,8 @@ using namespace std; using namespace eth; +#define EVM_TRACE 1 + Executive::~Executive() { // TODO: Make safe. diff --git a/stdserv.js b/stdserv.js index 5529c90cc..be7ce6cb0 100644 --- a/stdserv.js +++ b/stdserv.js @@ -10,7 +10,7 @@ var configCode = eth.lll("{ ) }") env.note('Config code: ' + configCode.unbin()) -var config; +var config = "0x9ef0f0d81e040012600b0c1abdef7c48f720f88a"; eth.create(eth.key, '0', configCode, 10000, eth.gasPrice, function(a) { config = a; }) env.note('Config at address ' + config) @@ -41,7 +41,7 @@ var nameRegCode = eth.lll("{ }"); env.note('NameReg code: ' + nameRegCode.unbin()) -var nameReg; +var nameReg = "0x3face8f2b3ef580265f0f67a57ce0fb78b135613"; env.note('Create NameReg...') eth.create(eth.key, '0', nameRegCode, 10000, eth.gasPrice, function(a) { nameReg = a; })