forked from deprecated-near/token-contract-as
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
40 lines (35 loc) · 1.22 KB
/
index.html
File metadata and controls
40 lines (35 loc) · 1.22 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
</head>
<body style="background: #fff">
<div class="container">
<h1>Hello, you have got a token!</h1>
<div class="sign-in" style="display: none;">
<p>You'll need to sign in to call contract methods:</p>
<button class="btn btn-primary">Sign In</button>
</div>
<div class="after-sign-in" style="display: none;">
<p>Here is how you use can use it from JavaScript.</p>
<p>To init:</p>
<pre>
await contract.init({initialOwner: walletAccount.getAccountId()})
</pre>
<p>To check your balance:</p>
<pre>
await contract.balanceOf({tokenOwner: walletAccount.getAccountId()})
</pre>
<p>To send money:</p>
<pre>
await contract.transfer({to: 'bob.near', tokens: '1000'})
</pre>
</div>
<div class="after-sign-in sign-out" style="display: none;">
<button class="btn btn-primary">Sign Out</button>
</div>
</div>
<script src="./main.js"></script>
</body>
</html>