-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
70 lines (57 loc) · 2.87 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
<!DOCTYPE html>
<html lang="en">
<head>
<title>Lock and unlock</title>
<meta name="title" content="Forty Two (typed)">
<meta name="description"
content="This contract will lock up some tokens that can only be unlocked providing 42 as typed redeemer and datum.. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/">
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#6d41a1" />
<script src="https://cdn.jsdelivr.net/npm/@gamechanger-finance/gc/dist/browser.min.js"></script>
<script src="connect_script.js"></script>
<script src="magicNumberSC.js"></script>
<script src="lock_script.js"></script>
<script src="unlock_script.js"></script>
<script src="index.js" defer></script>
<link rel="stylesheet" href="index.css">
</head>
<body>
<button class="button connect" id="connectButton"
onclick="location.href='https://beta-preprod-wallet.gamechanger.finance'">Loading...</button>
<div class="box">
<h1>Contract</h1>
<div id="dappConnectorBox">
<textarea type="text" id="heliosInput" rows="15" placeholder="Helios script" onchange="store()">
spending MagicNumber
struct Datum {
magicNumber: Int
}
struct Redeemer {
magicNumber: Int
}
func main(datum: Datum, redeemer: Redeemer, _) -> Bool {
redeemer.magicNumber==datum.magicNumber
}</textarea>
</div>
<h1>Lock tokens</h1>
<p><i>This contract will lock up some tokens that can only be unlocked providing a number as typed redeemer and
datum.. A GameChanger Wallet Dapp Demo. https://gamechanger.finance/</i></p>
<div id="dappConnectorBox">
<button class="button" id="lockBtn" onclick="location.href='https://beta-preprod-wallet.gamechanger.finance'">Loading...</button>
<input type="text" id="lockInput" class="amountInput" placeholder="Lock number" onchange="store()">
</div>
<h1>Unlock tokens</h1>
<div id="dappConnectorBox">
<input type="text" id="contractAddressInput" class="unlockInput" placeholder="Contract address" onchange="store()">
<input type="text" id="txHashInput" class="amountInput" placeholder="txHash to unlock" onchange="store()">
<input type="text" id="txHashIndexInput" class="amountInput" placeholder="txHash index" onchange="store()">
<button class="button" id="unlockBtn"
onclick="location.href='https://beta-preprod-wallet.gamechanger.finance'">Loading...</button>
<input type="text" id="unlockInput" class="amountInput" placeholder="Unlock number" onchange="store()">
</div>
<pre id="errorBox" class="errors"></pre>
<pre id="resultBox" class="console">Results will appear here after you connect with the wallet</pre>
</div>
</body>
</html>