2014-04-21 01:58:02 +03:00
|
|
|
<html>
|
|
|
|
<head>
|
2014-04-23 12:51:34 +03:00
|
|
|
<title>jeffcoin</title>
|
2014-04-21 01:58:02 +03:00
|
|
|
<script type="text/javascript">
|
2014-04-24 01:01:22 +03:00
|
|
|
var jefcoinAddr = "3dff537f51350239abc95c76a5864aa605259e7d"
|
|
|
|
|
2014-04-23 12:51:34 +03:00
|
|
|
function createTransaction() {
|
|
|
|
var addr = document.querySelector("#addr").value;
|
|
|
|
var amount = document.querySelector("#amount").value;
|
|
|
|
|
2014-04-24 01:01:22 +03:00
|
|
|
var data = "0x" + addr + "\n" + amount
|
|
|
|
eth.createTx(jefcoinAddr, 0, "10000000", "250", data, function(tx) {
|
2014-04-23 12:51:34 +03:00
|
|
|
debug("received tx hash:", tx)
|
2014-04-21 01:58:02 +03:00
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2014-04-23 12:51:34 +03:00
|
|
|
// Any test related actions here please
|
|
|
|
function tests() {
|
2014-04-24 01:01:22 +03:00
|
|
|
eth.getKey(function(keys) {
|
|
|
|
debug(keys)
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
function init() {
|
|
|
|
eth.getKey(function(key) {
|
|
|
|
eth.getStorage(jefcoinAddr, key, function(storage) {
|
|
|
|
debug("Currently in storage: ", storage);
|
|
|
|
document.querySelector("#currentAmount").innerHTML = "Amount: " + storage;
|
|
|
|
})
|
2014-04-23 12:51:34 +03:00
|
|
|
})
|
|
|
|
}
|
2014-04-24 01:01:22 +03:00
|
|
|
|
2014-04-21 01:58:02 +03:00
|
|
|
</script>
|
2014-04-24 01:01:22 +03:00
|
|
|
<style type="text/css">
|
|
|
|
input[type="text"] {
|
|
|
|
width: 300px;
|
|
|
|
}
|
|
|
|
</style>
|
|
|
|
</head>
|
|
|
|
|
|
|
|
<body onload="init();">
|
|
|
|
<h1>Jeff Coin</h1>
|
|
|
|
|
|
|
|
<img src="icon.png">
|
|
|
|
<div id="currentAmount"></div>
|
|
|
|
|
|
|
|
<div id="transactions">
|
|
|
|
<input id="addr" type="text" placeholder="Receiver address"></input><br>
|
|
|
|
<input id="amount" type="text" placeholder="Amount"></input><br>
|
|
|
|
<button onclick="createTransaction();">Send Tx</button>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div><button onclick="tests();">Tests</button></div>
|
|
|
|
|
2014-04-21 01:58:02 +03:00
|
|
|
|
2014-04-23 12:51:34 +03:00
|
|
|
<div id="debug" style="border: 1px solid block"></div>
|
|
|
|
|
2014-04-21 01:58:02 +03:00
|
|
|
</body>
|
|
|
|
</html>
|
|
|
|
|