-
Notifications
You must be signed in to change notification settings - Fork 0
/
base.html
94 lines (91 loc) · 2.41 KB
/
base.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
<!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.0" />
<title>DEX ERC-20</title>
<style>
.container {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
margin-top: 20px;
}
.row {
display: flex;
flex-direction: row;
width: 100%;
}
.item {
display: flex;
flex-direction: column;
flex: 1;
align-items: center;
justify-content: center;
}
</style>
</head>
<body>
<div class="container">
<h2>General Information</h2>
<div class="row">
<div class="item">
<h3>Token Price: <span id="tokenPrice"></span></h3>
<button onclick="getPrice()">Update Price</button>
</div>
<div class="item">
<h3>Tokens Available: <span id="tokensAvailable"></span></h3>
<button onclick="getAvailableTokens()">
Update Tokens Available
</button>
</div>
<div class="item">
<h3>My Token Balance: <span id="tokensBalance"></span></h3>
<button onclick="getTokenBalance()">Update My Tokens</button>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="item">
<h3>Grant DEX Access</h3>
<div>
<input
type="number"
min="0"
placeholder="Enter number of tokens"
id="tokenGrant"
/>
<button onclick="grantAccess()">Grant</button>
</div>
</div>
<div class="item">
<h3>Sell Tokens</h3>
<button onclick="sell()">Sell</button>
</div>
</div>
</div>
<div class="container">
<h2>User Controls</h2>
<div class="item">
<h3>Buy Tokens</h3>
<div>
<input
type="number"
min="0"
placeholder="Enter number of tokens"
id="tokensToBuy"
/>
<button onclick="buy()">Buy</button>
</div>
</div>
</div>
<script
src="https://cdn.ethers.io/lib/ethers-5.2.umd.min.js"
type="application/javascript"
></script>
<script type="text/javascript" src="script.js"></script>
</body>
</html>