aboutsummaryrefslogtreecommitdiffstats
path: root/ethereal
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-04-26 01:24:39 +0800
committerobscuren <geffobscura@gmail.com>2014-04-26 01:24:39 +0800
commitd0438ac10ab55cd12c1ab5ec3aaf0030185bf131 (patch)
tree3d84f7fad5a69af48b71248afd9458997aa746e9 /ethereal
parent6ca99709d243d384fa2b53d326f68bca8bef5eef (diff)
downloadgo-tangerine-d0438ac10ab55cd12c1ab5ec3aaf0030185bf131.tar
go-tangerine-d0438ac10ab55cd12c1ab5ec3aaf0030185bf131.tar.gz
go-tangerine-d0438ac10ab55cd12c1ab5ec3aaf0030185bf131.tar.bz2
go-tangerine-d0438ac10ab55cd12c1ab5ec3aaf0030185bf131.tar.lz
go-tangerine-d0438ac10ab55cd12c1ab5ec3aaf0030185bf131.tar.xz
go-tangerine-d0438ac10ab55cd12c1ab5ec3aaf0030185bf131.tar.zst
go-tangerine-d0438ac10ab55cd12c1ab5ec3aaf0030185bf131.zip
Moved
Diffstat (limited to 'ethereal')
-rw-r--r--ethereal/assets/samplecoin.html65
1 files changed, 65 insertions, 0 deletions
diff --git a/ethereal/assets/samplecoin.html b/ethereal/assets/samplecoin.html
new file mode 100644
index 000000000..476283f60
--- /dev/null
+++ b/ethereal/assets/samplecoin.html
@@ -0,0 +1,65 @@
+<html>
+<head>
+<title>jeffcoin</title>
+<script type="text/javascript">
+var jefcoinAddr = "3dff537f51350239abc95c76a5864aa605259e7d"
+
+function createTransaction() {
+ var addr = document.querySelector("#addr").value;
+ var amount = document.querySelector("#amount").value;
+
+ var data = "0x" + addr + "\n" + amount
+ eth.createTx(jefcoinAddr, 0, "10000000", "250", data, function(tx) {
+ debug("received tx hash:", tx)
+ })
+}
+
+// Any test related actions here please
+function tests() {
+ eth.getKey(function(keys) {
+ debug(keys)
+ })
+}
+
+function init() {
+ eth.getKey(function(key) {
+ eth.getStorage(jefcoinAddr, key, function(storage) {
+ document.querySelector("#currentAmount").innerHTML = "Amount: " + storage;
+ });
+
+ eth.on("block:new", function() {
+ eth.getStorage(jefcoinAddr, key, function(storage) {
+ document.querySelector("#currentAmount").innerHTML = "Amount: " + storage;
+ });
+ });
+ });
+}
+
+</script>
+<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>
+
+
+<div id="debug" style="border: 1px solid block"></div>
+
+</body>
+</html>
+