-
Notifications
You must be signed in to change notification settings - Fork 0
/
NFT.html
109 lines (98 loc) · 5.05 KB
/
NFT.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
<html>
<head>
<meta charset="UTF-8">
<title>E2E Test Dapp</title>
<link rel="icon" type="image/png" href="metamask-fox.svg">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
<link href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.14.1/css/mdb.min.css" rel="stylesheet">
<link rel="stylesheet" href="metamask.css" type="text/css">
</head>
<body>
<main class="container-fluid">
<header>
<h1 class="text-center">E2E Test Dapp</h1>
</header>
<!-- Part 1 Setting up Basic Actions and Status-->
<section>
<h3 class="card-title">Status</h3>
<div class="row">
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12">
<p class="info-text alert alert-primary">Network: <span id="network"></span></p>
</div>
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12">
<p class="info-text alert alert-secondary">ChainId: <span id="chainId"></span></p>
</div>
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12">
<p class="info-text alert alert-success">Accounts: <span id="accounts"></span></p>
</div>
</div>
</section>
<section>
<div class="row d-flex justify-content-center">
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12">
<div class="card">
<img class="card-img-top" src="https://metamask.github.io/metamask-docs/ethereum-metamask-chrome.png"
alt="Card image cap">
<div class="card-body">
<h4 class="card-title">Basic Actions</h4>
<button class="btn btn-primary btn-lg btn-block mb-3" id="connectButton" disabled></button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="getAccounts">eth_accounts</button>
<p class="info-text alert alert-secondary">eth_accounts result: <span id="getAccountsResult"></span></p>
</div>
</div>
</div>
</div>
</section>
<!-- /Part 1 -->
<section>
<!-- Part 2 Contract-->
<div class="row">
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12 d-flex align-items-stretch">
<div class="card full-width">
<div class="card-body">
<h4 class="card-title">Contract</h4>
<button class="btn btn-primary btn-lg btn-block mb-3" id="deployButton" disabled>Deploy Contract</button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="depositButton" disabled>Deposit</button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="withdrawButton" disabled>Withdraw</button>
<p class="info-text alert alert-secondary">Contract Status: <span id="contractStatus">Not clicked</span></p>
</div>
</div>
</div>
<!-- /Part 2 -->
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12 d-flex align-items-stretch">
<div class="card full-width">
<div class="card-body">
<h4 class="card-title">Send Eth</h4>
<button class="btn btn-primary btn-lg btn-block mb-3" id="sendButton" disabled>Send</button>
<p class="info-text alert alert-info">Contract Status: <span id="contractStatus">Not clicked</span></p>
<hr />
<h4>Sign Typed Data</h4>
<button class="btn btn-primary btn-lg btn-block mb-3" id="signTypedData" disabled>Sign</button>
<p class="info-text alert alert-warning">Sign Typed Data Result: <span id="signTypedDataResult"></span></p>
</div>
</div>
</div>
<div class="col-xl-4 col-lg-6 col-md-12 col-sm-12 col-12 d-flex align-items-stretch">
<div class="card full-width">
<div class="card-body">
<h4 class="card-title">Send Tokens</h4>
<p class="info-text alert alert-success">Token: <span id="tokenAddress"></span></p>
<button class="btn btn-primary btn-lg btn-block mb-3" id="createToken" disabled>Create Token</button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="transferTokens" disabled>Transfer Tokens</button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="approveTokens" disabled>Approve Tokens</button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="transferTokensWithoutGas" disabled>Transfer Tokens
Without Gas</button>
<button class="btn btn-primary btn-lg btn-block mb-3" id="approveTokensWithoutGas" disabled>Approve Tokens
Without Gas</button>
<p class="info-text alert alert-info">Contract Status: <span id="contractStatus">Not clicked</span></p>
</div>
</div>
</div>
</div>
</section>
</main>
<script src="node_modules/@metamask/onboarding/dist/metamask-onboarding.bundle.js" defer></script>
<script src="contract.js" defer></script>
</body>
</html>