-
Notifications
You must be signed in to change notification settings - Fork 0
/
fosorciminc.html
108 lines (103 loc) · 3.43 KB
/
fosorciminc.html
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!DOCTYPE HTML>
<!--
Hyperspace by HTML5 UP
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
<html>
<head>
<title>Chain Education</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<link rel="stylesheet" href="assets/css/main.css" />
<noscript><link rel="stylesheet" href="assets/css/noscript.css" /></noscript>
</head>
<body class="is-preload" onload="testETH()">
<script type="text/javascript">
function testETH(){
console.log('starting...');
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider("http://localhost:7545"));
var account = web3.eth.accounts[ 0 ];
var balance = web3.eth.getBalance(account);
console.log('account: ' + account);
console.log('balance: ' + balance);
}
</script>
<script type="text/javascript">
function send() {
var Web3 = require('web3');
var web3 = new Web3();
web3.setProvider(new web3.providers.HttpProvider("http://localhost:7545"));
var companyAccount = web3.eth.accounts[ 2 ];
var studentAccount = web3.eth.accounts[ 0 ];
web3.eth.sendTransaction({from: companyAccount, to:studentAccount, value: web3.toWei(10, 'ether'), gasLimit: 21000, gasPrice: 20000000000})
window.location.replace("account.html");
}
</script>
<!-- Header -->
<header id="header">
<a href="index.html" class="title">Chain Education</a>
<nav>
<ul>
<li><a href="study.html">Study</a></li>
<li><a href="work.html" class="active">Work</a></li>
<li><a href="account.html">Account</a></li>
</ul>
</nav>
</header>
<!-- Wrapper -->
<div id="wrapper">
<!-- Main -->
<section id="main" class="wrapper">
<div class="inner">
<section>
<h2 style="text-align:center">You need to:</h2>
<div class="table-wrapper">
<table class="alt">
<thead>
<tr>
<th>Company Name</th>
<th>Description</th>
<th>Price</th>
</tr>
</thead>
<tbody>
<tr>
<td>Fosorcim Inc.</td>
<td>Make an algorithm to order an array</td>
<td>10 UST</td>
</tr>
</tbody>
</table>
</div>
<form>
<div class="row gtr-uniform">
<div class="col-12">
<textarea placeholder="" rows="6"></textarea>
</div>
</div>
</form>
<button onclick="send()">Submit</button>
</section>
</div>
<!-- Footer -->
<footer id="footer" class="wrapper alt">
<div class="inner">
<ul class="menu">
<li>© Chain Education. All rights reserved.</li><li>Design: <a href="http://html5up.net">HTML5 UP</a></li>
</ul>
</div>
</footer>
<!-- Scripts -->
<script src="assets/js/web3.min.js"></script>
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/jquery.scrollex.min.js"></script>
<script src="assets/js/jquery.scrolly.min.js"></script>
<script src="assets/js/browser.min.js"></script>
<script src="assets/js/breakpoints.min.js"></script>
<script src="assets/js/util.js"></script>
<script src="assets/js/main.js"></script>
</body>
</html>