-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
47 lines (38 loc) · 1.99 KB
/
index.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
<!doctype html>
<html>
<head>
<title>Home Page</title>
<!-- import libraries -->
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8="
crossorigin="anonymous"></script>
<script src="./lib/browser-solc.min.js" type="text/javascript"></script>
<script src="./bower_components/web3/dist/web3.js"></script>
<link href="./lib/bootstrap.min.css.map" rel="stylesheet">
<link href="./lib/bootstrap.min.css" rel="stylesheet">
<!-- import user defined scripts -->
<script src="./test.js"></script>
</head>
<style>
#compile {
position: fixed;
right: 0;
top: 2px;
height: 40px;
}
#deploy {
position: fixed;
right: 0;
top: 45px;
}
textarea {
width: 100%;
height: 100vh;
background-color: #EEF;
}
</style>
<body>
<button type="button" id="compile" class="btn btn-primary" onclick="compile(function(){})">compile</button>
<button type="button" id="deploy" class="btn btn-primary" onclick="beforeDeploy()">deploy</button>
<textarea type="text" placeholder="pragma solidity ^0.4.2; contract mortal { /* Define variable owner of the type address*/ address owner; /* this function is executed at initialization and sets the owner of the contract */ function mortal() { owner = msg.sender; } /* Function to recover the funds on the contract */ // function kill() { if (msg.sender == owner) selfdestruct(owner); } } contract greeter is mortal { /* define variable greeting of the type string */ string greeting; /* this runs when the contract is executed */ function greeter(string _greeting) public { greeting = _greeting; } /* main function */ function greet() constant returns (string) { return greeting; } }"></textarea>
</body>
</html>