-
Notifications
You must be signed in to change notification settings - Fork 30
Expand file tree
/
Copy pathsendtx.html
More file actions
25 lines (23 loc) · 765 Bytes
/
Copy pathsendtx.html
File metadata and controls
25 lines (23 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<html>
<head>
<title>icebox - send tx</title>
</head>
<body>
<script src="./node_modules/web3/dist/web3.min.js"></script>
<script>
function sendTx() {
var web3 = new Web3();
var web3prov = new web3.providers.HttpProvider('http://localhost:8545');
web3.setProvider(web3prov);
var rawtx = document.getElementById('rawSignedTx').value;
web3.eth.sendRawTransaction(rawtx, function () {
document.getElementById('confirmation').innerHTML = "Transaction sent!";
});
}
</script>
<h1>Send Transaction</h1>
<div><textarea id='rawSignedTx' rows=6 cols=40></textarea></div>
<button onclick="sendTx()">Send Transaction</button>
<div id="confirmation"></div>
</body>
</html>