forked from cerc-io/plugeth
Moved and improved sample coin
This commit is contained in:
parent
abb2bebf7f
commit
76cd14ab7b
7
ethereal/assets/samplecoin/bootstrap-theme.min.css
vendored
Executable file
7
ethereal/assets/samplecoin/bootstrap-theme.min.css
vendored
Executable file
File diff suppressed because one or more lines are too long
7
ethereal/assets/samplecoin/bootstrap.min.css
vendored
Executable file
7
ethereal/assets/samplecoin/bootstrap.min.css
vendored
Executable file
File diff suppressed because one or more lines are too long
BIN
ethereal/assets/samplecoin/icon.png
Normal file
BIN
ethereal/assets/samplecoin/icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 85 KiB |
34
ethereal/assets/samplecoin/samplecoin.css
Normal file
34
ethereal/assets/samplecoin/samplecoin.css
Normal file
@ -0,0 +1,34 @@
|
||||
/* Space out content a bit */
|
||||
body {
|
||||
padding-top: 20px;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
|
||||
/* Everything but the jumbotron gets side spacing for mobile first
|
||||
* views */
|
||||
.header,
|
||||
.marketing,
|
||||
.footer {
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
/* Custom page header */
|
||||
.header {
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
}
|
||||
/* Make the masthead heading the same height as the navigation */
|
||||
.header h3 {
|
||||
padding-bottom: 19px;
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
line-height: 40px;
|
||||
}
|
||||
|
||||
.jumbotron {
|
||||
text-align: center;
|
||||
border-bottom: 1px solid #e5e5e5;
|
||||
|
||||
margin: 0 auto;
|
||||
width: 300px;
|
||||
}
|
66
ethereal/assets/samplecoin/samplecoin.html
Normal file
66
ethereal/assets/samplecoin/samplecoin.html
Normal file
@ -0,0 +1,66 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>jeffcoin</title>
|
||||
|
||||
<link rel="stylesheet" href="bootstrap.min.css">
|
||||
<link rel="stylesheet" href="bootstrap-theme.min.css">
|
||||
<link rel="stylesheet" href="samplecoin.css">
|
||||
<meta name="viewport" content="minimum-scale=1; maximum-scale=1; initial-scale=1;">
|
||||
|
||||
<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.transact("", jefcoinAddr, 0, "10000000", "250", data, function(tx) {
|
||||
debug("received tx hash:", tx)
|
||||
})
|
||||
}
|
||||
|
||||
function init() {
|
||||
eth.getKey(function(key) {
|
||||
eth.getStorageAt(jefcoinAddr, key, function(storage) {
|
||||
document.querySelector("#current-amount").innerHTML = storage;
|
||||
});
|
||||
|
||||
eth.watch(jefcoinAddr, function(stateObject) {
|
||||
eth.getStorageAt(jefcoinAddr, key, function(storage) {
|
||||
document.querySelector("#current-amount").innerHTML = storage;
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body onload="init();">
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h3 class="text-muted">JeffCoin</h3>
|
||||
</div>
|
||||
|
||||
<div class="jumbotron ">
|
||||
<img src="icon.png">
|
||||
<div>Amount: <strong id="current-amount"></strong></div>
|
||||
|
||||
<div id="transactions">
|
||||
<form role="form">
|
||||
<div class="form-group">
|
||||
<input id="addr" class="form-control" type="text" placeholder="Receiver address"></input><br>
|
||||
<input id="amount" class="form-control" type="text" placeholder="Amount"></input><br>
|
||||
</div>
|
||||
|
||||
<button class="btn btn-default" onclick="createTransaction();">Send Tx</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="debug" style="border: 1px solid block"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user