-
Notifications
You must be signed in to change notification settings - Fork 22
/
E2E_Test_Dapp.html
64 lines (64 loc) · 1.87 KB
/
E2E_Test_Dapp.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
<html> <!-- based on: https://github.com/MetaMask/metamask-extension/tree/develop/test/e2e/contract-test -->
<head>
<meta charset="UTF-8">
<title>E2E Test Dapp</title>
<script src="metamask-onboarding.bundle.js"></script> <!-- from https://www.npmjs.com/package/@metamask/onboarding -->
<script src="E2E_Test_Dapp.js" defer></script>
</head>
<body>
<header>
<h1>E2E Test Dapp</h1>
</header>
<main>
<section>
<h2>Connect</h2>
<button id="connectButton">Connect</button>
</section>
<section>
<h2>Contract</h2>
<div>
<button id="deployButton">Deploy Contract</button>
<button id="depositButton">Deposit</button>
<button id="withdrawButton">Withdraw</button>
</div>
<div>
Contract Status: <span id="contractStatus">Not clicked</span>
</div>
</section>
<section>
<h2>Send Eth</h2>
<button id="sendButton">Send</button>
</section>
<section>
<h2>Send Tokens</h2>
<div>
Token: <span id="tokenAddress"></span>
</div>
<div>
<button id="createToken">Create Token</button>
<button id="transferTokens">Transfer Tokens</button>
<button id="approveTokens">Approve Tokens</button>
<button id="transferTokensWithoutGas">Transfer Tokens Without Gas</button>
<button id="approveTokensWithoutGas">Approve Tokens Without Gas</button>
</div>
</section>
<section>
<h2>Status</h2>
<div>
Network: <span id="network"></span>
</div>
<div>
ChainId: <span id="chainId"></span>
</div>
<div>
Accounts: <span id="accounts"></span>
</div>
</section>
<section>
<h2>Sign Typed Data</h2>
<button id="signTypedData">Sign</button>
<div>Sign Typed Data Result: <span id="signTypedDataResult"></span></div>
</section>
</main>
</body>
</html>