-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpurchase.html
147 lines (111 loc) · 4.66 KB
/
purchase.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
<html>
<head>
<title>Purchase Eth Llandudno tickets (Demo for imaginary event!)</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- Get some bootstrap default styles -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<body>
<!-- Construct a Bootstrap layout -->
<div class="container">
<div class="row">
<div class="col-md-12">
<h1>Purchase your Eth Llandudno ticket here :)</h1>
</br>
<img src="https://ipfs.io/ipfs/QmSEjtQ988ugMmH56847FoHWCufCHiLM3SqKWB2zNaUsVu" alt="Eth Llandudno"
height=500;><br />
<p>Direct mint a test ticket here for full price. Alternatively purchase at half price by obtaining a referral
ticket by using the souvenir here: <a
href="https://jamessmartcell.github.io/referral.html">https://jamessmartcell.github.io/referral.html</a></p>
<p>No wallet connected. Connect wallet to show accounts and their ETH balances.</p>
<div class="alert alert-danger" id="alert-error-https" style="display: none">
You can run this example only over HTTPS connection.
</div>
<div id="prepare">
<button class="btn btn-primary" id="btn-connect">
Connect wallet
</button>
<button class="btn btn-primary" id="btn-disconnect2">
Force Disconnect
</button>
</div>
<div id="connected" style="display: none">
<button class="btn btn-primary" id="btn-disconnect">
Disconnect wallet
</button>
<br />
<br />
<button class="btn btn-primary" id="btn-pushTS721">
Purchase Test Event Ticket
</button>
<div id="minting-not-started" id="minting-not-started" style="display: none">
<strong>Public minting has not yet started, use the Referral Token if available</strong>
</div>
<br />
<br />
<p>
<strong>Purchase Price:</strong> <span id="purchase-price"></span>
</p>
<br />
<div id="network">
<p>
<strong>Connected blockchain:</strong> <span id="network-name"></span>
</p>
<p>
<strong>Selected account:</strong> <span id="selected-account"></span>
</p>
<p>
<strong>Detected Wallet:</strong> <span id="detected-wallet"></span>
</p>
</div>
<hr>
<h3>All account balances</h3>
<table class="table table-listing">
<thead>
<th>Address</th>
<th>ETH balance</th>
<th>Next Deployed Contract</th>
</thead>
<tbody id="accounts">
</tbody>
</table>
</div>
<br>
<div class="well">
<p class="text-muted">See also the <a href="https://web3modal.com/">TypeScript and React example
application</a></p>
</div>
</div>
</div>
</div>
<!-- We use simple <template> templating for the example -->
<div id="templates" style="display: none">
<template id="template-balance">
<tr>
<th class="address"></th>
<td class="balance"></td>
<td class="contractAddr"></td>
</tr>
</template>
</div>
<!--
Use unpkg CDN to load all NPM packages to vanilla Javascript - read more at http://unpkg.com
On your deployment, you properly either want to use a preprocessing tool like webpack
to include these files, or extract NPM archives and manually host the files inside.
TODO: Pin down all versions.
-->
<script type="text/javascript" src="https://unpkg.com/web3@1.2.11/dist/web3.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/web3modal@1.9.0/dist/index.js"></script>
<script type="text/javascript" src="https://unpkg.com/evm-chains@0.2.0/dist/umd/index.min.js"></script>
<script type="text/javascript"
src="https://unpkg.com/@walletconnect/web3-provider@1.2.1/dist/umd/index.min.js"></script>
<script type="text/javascript" src="https://unpkg.com/fortmatic@2.0.6/dist/fortmatic.js"></script>
<script src="https://cdn.ethers.io/lib/ethers-5.0.umd.min.js" type="application/javascript"></script>
<!-- <script type="module">
import { ethers } from "https://cdn.ethers.io/lib/ethers-5.2.esm.min.js";
</script> -->
<!-- This is our example code -->
<script type="text/javascript" src="./example-purchase.js"></script>
</body>
</html>