Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #113

Closed
wants to merge 23 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Ethereum
========

[![Build Status](https://travis-ci.org/ethereum/go-ethereum.png?branch=master)](https://travis-ci.org/ethereum/go-ethereum)
Master [![Build
Status](http://cpt-obvious.ethercasts.com:8010/buildstatusimage?builder=go-ethereum-master-docker)](http://cpt-obvious.ethercasts.com:8010/builders/go-ethereum-master-docker/builds/-1) Develop [![Build
Status](http://cpt-obvious.ethercasts.com:8010/buildstatusimage?builder=go-ethereum-develop-docker)](http://cpt-obvious.ethercasts.com:8010/builders/go-ethereum-develop-docker/builds/-1)

Ethereum Go Client © 2014 Jeffrey Wilcke.

Expand Down
21 changes: 21 additions & 0 deletions ethereal/assets/ext/home.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<!doctype>
<html>
<head>
<title>Ethereum</title>

<style type="text/css">
h1 {
text-align: center;
font-family: Courier;
font-size: 50pt;
margin-top: 25%
}
</style>
</head>

<body>
<h1>... Ethereum ...</h1>
<!-- ĐΞV --!>
</body>
</html>

117 changes: 117 additions & 0 deletions ethereal/assets/ext/messaging.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
function handleMessage(message) {
console.log("[onMessageReceived]: ", message.data)
// TODO move to messaging.js
var data = JSON.parse(message.data)

try {
switch(data.call) {
case "getCoinBase":
postData(data._seed, eth.getCoinBase())

break
case "getIsListening":
postData(data._seed, eth.getIsListening())

break
case "getIsMining":
postData(data._seed, eth.getIsMining())

break
case "getPeerCount":
postData(data._seed, eth.getPeerCount())

break

case "getTxCountAt":
require(1)
postData(data._seed, eth.getTxCountAt(data.args[0]))

break
case "getBlockByNumber":
var block = eth.getBlock(data.args[0])
postData(data._seed, block)

break
case "getBlockByHash":
var block = eth.getBlock(data.args[0])
postData(data._seed, block)

break
case "transact":
require(5)

var tx = eth.transact(data.args[0], data.args[1], data.args[2],data.args[3],data.args[4],data.args[5])
postData(data._seed, tx)

break
case "create":
postData(data._seed, null)

break
case "getStorage":
require(2);

var stateObject = eth.getStateObject(data.args[0])
var storage = stateObject.getStorage(data.args[1])
postData(data._seed, storage)

break
case "getStateKeyVals":
require(1);
var stateObject = eth.getStateObject(data.args[0]).stateKeyVal(true)
postData(data._seed,stateObject)

break
case "getTransactionsFor":
require(1);
var txs = eth.getTransactionsFor(data.args[0], true)
postData(data._seed, txs)

break
case "getBalance":
require(1);

postData(data._seed, eth.getStateObject(data.args[0]).value());

break
case "getKey":
var key = eth.getKey().privateKey;

postData(data._seed, key)
break
case "watch":
require(1)
eth.watch(data.args[0], data.args[1]);
break
case "disconnect":
require(1)
postData(data._seed, null)
break;
case "set":
console.log("'Set' has been depcrecated")
/*
for(var key in data.args) {
if(webview.hasOwnProperty(key)) {
window[key] = data.args[key];
}
}
*/
break;
case "getSecretToAddress":
require(1)
postData(data._seed, eth.secretToAddress(data.args[0]))
break;
case "debug":
console.log(data.args[0]);
break;
}
} catch(e) {
console.log(data.call + ": " + e)

postData(data._seed, null);
}
}

function postData(seed, data) {
webview.experimental.postMessage(JSON.stringify({data: data, _seed: seed}))
}
Loading