-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
176 lines (172 loc) · 9.18 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<meta charset="utf-8" />
<title>Cardano Contract Test</title>
<div class="container">
<div class="row">
<div class="col d-flex justify-content-center">
<div>
<h3>Cardano Contract Test</h3>
</div>
</div>
</div>
<div class="row my-3">
<div id="access-row" class="col-12 text-center">
<input type="checkbox" id="check-identification"> Request identification</input><br /><br />
<button id="access-button" class="btn btn-primary">Request access to Yoroi</button>
</div>
<div id="connection-status" class="col-12 text-center my-3 d-none">
<span style="display: block">Connected to: <b id="wallet-plate">ABCD-1234</b></span>
<span style="display: block" id="wallet-icon"></span>
</div>
</div>
<div class="row">
<div class="card w-100">
<div class="card-body">
<form>
<div class="form-group">
<label for="contract-address">Contract Address</label>
<input class="form-control" id="contract-address" placeholder="Enter contract address" />
</div>
<div class="form-group">
<label for="contract-hex">Contract Hex</label>
<input class="form-control" id="contract-hex" placeholder="Enter contract hex" />
</div>
<button id="save-contract-button" type="button" class="btn btn-primary">Save To Local
Storage</button>
</form>
</div>
</div>
</div>
<div class="row my-3">
<div class="col-10 px-0">
<pre id="balance-alert" class="alert alert-info"></pre>
<pre id="pkh-alert" class="alert alert-info"></pre>
</div>
<div class="col-2">
<button id="get-balance-button" type="button" class="btn btn-primary mb-2">Get Balance</button>
<button id="mint-test-NFT-button" type="button" class="btn btn-primary mb-2">Mint Test NFT</button>
<button id="get-pkh-button" type="button" class="btn btn-primary">Get Change Address pkh</button>
</div>
</div>
<div class="row my-3">
<div class="card col-6 w-100">
<h5 class="card-title mt-3">Send To Contract</h5>
<div class="card-body">
<form>
<ul id="asset-list" class="list-unstyled">
<li>
<div class="form-group">
<label for="send-amount">Send Amount (lovelaces)</label>
<input type="number" min="0" class="form-control" id="send-amount"
placeholder="Enter send amount" />
</div>
</li>
</ul>
<button id="add-asset-button" type="button" class="btn btn-primary">Add Asset Field</button>
<button id="remove-asset-button" type="button" class="btn btn-warning">Remove Asset
Field</button>
<div class="form-group mt-3">
<label for="datum-json-send">Datum JSON</label>
<textarea class="form-control" id="datum-json-send" rows="3"></textarea>
</div>
<button id="submit-send-button" type="button" class="btn btn-primary">Sign and
Submit</button>
</form>
</div>
</div>
<div class="card col-6 w-100">
<h5 class="card-title mt-3">Redeem From Contract</h5>
<div class="card-body">
<form>
<div class="form-group">
<div class="row">
<div class="col-9">
<label for="transaction-hash">Transaction Hash</label>
<input class="form-control" id="transaction-hash"
placeholder="Enter transaction Hash" />
</div>
<div class="col-3">
<label for="output-id">Output Id</label>
<input min="0" type="number" class="form-control" id="output-id" placeholder="Id" />
</div>
</div>
</div>
<h3>Extra Outputs</h3>
<ul id="extra-output-list" class="px-3"></ul>
<button id="add-output-redeem-button" data-toggle="modal" data-target="#output-redeem-modal"
type="button" class="btn btn-primary">Add Extra Outputs</button>
<div class="form-group my-3">
<label for="datum-json-redeem">Script Input Datum JSON</label>
<textarea class="form-control" id="datum-json-redeem" rows="3"></textarea>
</div>
<div class="form-group">
<label for="redeemer-json">Redeemer JSON</label>
<textarea class="form-control" id="redeemer-json" rows="3"></textarea>
</div>
<button id="submit-redeem-button" type="button" class="btn btn-primary">Sign and
Submit</button>
</form>
</div>
</div>
</div>
<div class="row my-3">
<pre id="on-screen-alert" class="d-none" role="alert">
</pre>
</div>
</div>
<div class="modal fade" id="output-redeem-modal" tabindex="-1" role="dialog" aria-labelledby="add-output"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="add-output-title">Add Output</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body">
<label for="redeem-send-address">Address</label>
<input class="form-control" id="redeem-send-address" placeholder="Enter send address" />
<ul id="redeem-asset-list" class="list-unstyled my-3">
<li>
<div class="form-group">
<label for="redeem-send-amount">Send Amount (lovelaces)</label>
<input type="number" min="0" class="form-control" id="redeem-send-amount"
placeholder="Enter send amount" />
</div>
</li>
</ul>
<button id="add-redeem-send-asset-button" type="button" class="btn btn-primary">Add Asset
Field</button>
<button id="remove-redeem-send-asset-button" type="button" class="btn btn-warning">Remove Asset
Field</button>
<div class="form-group my-3">
<label for="datum-json-redeem-output">Output Datum JSON</label>
<textarea class="form-control" id="datum-json-redeem-output" rows="3"></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
<button type="button" id="add-redeem-output-button" class="btn btn-primary">Add</button>
</div>
</div>
</div>
</div>
</head>
<body>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
<script type="module" src="./bootstrap.js"></script>
</body>
</html>