-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (108 loc) · 4.91 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
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
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css"
integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"
integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb"
crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"
integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn"
crossorigin="anonymous"></script>
<title>Hidden Contract Dapp</title>
</head>
<body class="container-fluid">
<div class="row" style="padding-top: 20px">
<div class="col-md-8">
<div class="container" id="loading_boxes">
<div class="row">
<h1>Web3 + Solc are loading....</h1>
</div>
</div>
<div class="container" id="loaded_boxes" style="display: none;">
<div class="row">
<div class="col-md-12">
<h2>Hidden Contract</h2>
</div>
<div class="col-md-12">
<textarea class="form-control" id="contract_hidden_code" rows="20"></textarea>
</div>
</div>
<div class="row">
<div class="col-md-12">
<h2>Main Contract</h2>
</div>
<div class="col-md-12">
<textarea class="form-control" id="contract_main_code" rows="40"></textarea>
</div>
</div>
</div>
</div>
<div class="col-md-4">
<div class="row" style="padding-bottom: 20px">
<div class="col-md-12" id="info_accounts" style="padding-bottom: 20px">
<h2>Account</h2>
<span id="info_accounts_owner"></span>
</div>
<div class="col-md-12" id="contract_button_0">
<button class="contract-btns btn btn-outline-success my-2 my-sm-0"
onClick="return false;">
Step0. WAIT
</button>
</div>
<div class="col-md-12" id="contract_button_1" style="display: none">
<button class="contract-btns btn btn-outline-success my-2 my-sm-0"
onClick="Contracts.deployMain($('#contract_main_code').val()); return false;">
Step1. COMPILE MAIN and CREATE
</button>
</div>
<div class="col-md-12" id="contract_button_2" style="display: none">
<button class="contract-btns btn btn-outline-success my-2 my-sm-0"
onClick="Contracts.pushHidden($('#contract_hidden_code').val()); return false;">
Step2. COMPILE HIDDEN and PUSH to MAIN
</button>
</div>
<div class="col-md-12" id="contract_button_3" style="display: none">
<button class="contract-btns btn btn-outline-success my-2 my-sm-0"
onClick="Contracts.deployHidden(); return false;">
Step3. CREATE PRECOMPILED HIDDEN
</button>
</div>
<div class="col-md-12" id="contract_button_4" style="display: none">
<button class="contract-btns btn btn-outline-success my-2 my-sm-0"
onClick="Contracts.escrowMain(); return false;">
Step4. CALL MAIN
</button>
<button class="contract-btns btn btn-outline-success my-2 my-sm-0"
onClick="Contracts.restart(); return false;">
or RESTART
</button>
</div>
<div class="col-md-12" id="contract_button_5" style="display: none">
<button class="contract-btns btn btn-outline-success my-2 my-sm-0"
onClick="Contracts.restart(); return false;">
Step5. ALL DONE, RESTART
</button>
</div>
</div>
<div id="info_alerts">
</div>
</div>
</div>
<hr>
</div> <!-- /container -->
<script src="./libs/web3.js"></script>
<script src="./libs/solc.js"></script>
<script src="./app/common.js"></script>
<script src="./app/app.js"></script>
<script src="./app/contracts.js"></script>
<script src="./app/contracts_tx_wrapper.js"></script>
<script src="./app/init.js"></script>
</body>
</html>