-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
209 lines (206 loc) · 9.4 KB
/
index.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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html>
<html lang="en">
<head>
<title>fungi</title>
<meta charset="utf-8" />
<meta name="description" content="Post an image, get a token, earn dividends!" />
<meta name="keywords" content="token, eth, fungi, erc1155, erc20, ethereum, dividend" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="theme-color" content="yellowgreen" />
<link rel="icon" href="assets/icon.png" />
<link rel="stylesheet" href="assets/style.css" />
</head>
<body>
<div id="header">
<div id="connect">
<button id="headerConnect" type="button">connect</button>
</div>
<div>
<button id="headerStart" type="button" title="start"></button>
</div>
<div>
<button id="headerFt" type="button">FGI</button>
</div>
<div>
<button id="headerNft" type="button">NFT</button>
</div>
<div>
<button id="headerCreate" type="button">create</button>
</div>
<div>
<button id="headerMarket" type="button">market</button>
</div>
</div>
<div id="start">
<p id="startMessage">loading...</p>
<h1 class="gap">fungi</h1>
<h2>buy/sell FGI tokens</h2>
<p class="gap">
FGI is an ERC20 token with a fixed price of 0.1 ETH per token.
It is used for creating and purchasing NFT and paying dividends.
Contract -
<a id="ftAddress" class="onestring"
href="https://ropsten.etherscan.io/address/0x8adaDB0fBD9dEac3350c4265F58d858599380D7e"
target="_blank" rel="noopener">0x8adaDB0fBD9dEac3350c4265F58d858599380D7e</a>,
contract balance -
<span id="ftContractEth">...</span>
ETH.
</p>
<h2>post your favorite art image and set its value in FGI</h2>
<p>
The image will be uploaded to IPFS and then an NFT token will be issued.
NFT is an ERC1155 token containing the name, description and IPFS hash of the image.
NFT has an initial value in FGI, that the publisher converts from FGI when creating NFT.
NFT cannot be changed or destroyed, it can only be transferred or purchased with FGI.
The owner of NFT can put it up for sale, setting the price not lower than its current value.
After the purchase, its value will increase to the sale price.
</p>
<p class="gap">
Contract -
<a id="nftAddress" class="onestring"
href="https://ropsten.etherscan.io/address/0xA2991cc511fccf14B4542f10a250683Af04CE374"
target="_blank" rel="noopener">0xA2991cc511fccf14B4542f10a250683Af04CE374</a>.
</p>
<h2>dividends</h2>
<p class="gap">
Some operations have a fee.
Buying and selling FGI - 10%, transferring FGI - 5%.
Purchasing NFT has a fee of 10% of the price difference.
The entire fee goes to dividends.
Dividends are distributed among all users according to the amount of FGI and all NFT values
that each user has.
</p>
<p class="gap">
<a href="https://github.com/aqoleg/fungi" target="_blank" rel="noopener">
github.com/aqoleg/fungi
</a>
</p>
<p class="gap">Contract deployed in the ropsten testnet.</p>
<p class="gap">Like? Mainnet? Eth 0x23882da9C8A362C62B45e74A6c05a79072A2a4Eb.</p>
</div>
<div id="ft">
<p class="big">balance</p>
<p class="medium"><span id="ftBalance">...</span> / <span id="ftShares">...</span> FGI</p>
<p class="small">(excluding/including NFT values)</p>
<div class="half">
<div>
<label>
enter ETH value
<span id="ftBuyValueHint" class="hint"></span>
<input id="ftBuyValue" type="text" />
</label>
<button id="ftBuy" class="button" type="button">buy</button>
</div>
<div>
<label>
enter FGI value
<span id="ftSellValueHint" class="hint"></span>
<input id="ftSellValue" type="text" />
</label>
<button id="ftSell" class="button" type="button">sell</button>
</div>
</div>
<p class="big">dividends</p>
<p class="medium"><span id="ftDividends">...</span> FGI</p>
<div class="half">
<div>
<button id="ftReinvest" class="button" type="button">reinvest</button>
</div>
<div>
<button id="ftWithdraw" class="button" type="button">withdraw</button>
</div>
</div>
</div>
<div id="nft">
<div id="nftItems">
<p class="itemsmessage">loading...</p>
</div>
<div id="nftEdit">
<button id="nftClose" class="button" type="button">back</button>
<div class="half">
<div>
<button id="nftItemImage" type="button"></button>
<p class="medium" id="nftItemName">...</p>
</div>
<div>
<p class="description" id="nftItemDescription">...</p>
<p class="description">value <span id="nftItemPrice">...</span> FGI</p>
<label>
sell price in FGI
<span id="nftSellPriceHint" class="hint"></span>
<input id="nftSellPrice" type="text" />
</label>
<button id="nftSet" class="button" type="button">set price</button>
<label>
enter address
<span id="nftSendAddressHint" class="hint"></span>
<input id="nftSendAddress" type="text" size="42" maxlength="42" />
</label>
<button id="nftSend" class="button" type="button">send</button>
</div>
</div>
</div>
</div>
<div id="create">
<p class="big">create new NFT</p>
<input id="createImage" type="file" accept="image/*" />
<div class="half">
<div>
<button id="createPreview" type="button"
onclick="document.getElementById('createImage').click()">
click or drop the file here
</button>
</div>
<div>
<label>
enter name
<input id="createName" type="text" size="40" maxlength="40" />
</label>
<label>
enter description
<input id="createDescription" type="text" size="100" maxlength="100" />
</label>
<label>
enter value in FGI
<span id="createPriceHint" class="hint"></span>
<input id="createPrice" type="text" />
</label>
<label>
enter sell price in FGI
<span id="createSellPriceHint" class="hint"></span>
<input id="createSellPrice" type="text" />
</label>
<button id="createMint" class="button" type="button">create</button>
</div>
</div>
</div>
<div id="market">
<div id="marketItems">
<p class="itemsmessage">loading...</p>
</div>
<div id="marketBuy">
<button id="marketClose" class="button" type="button">back</button>
<div class="half">
<div>
<button id="marketItemImage" type="button"></button>
<p class="medium" id="marketItemName">...</p>
</div>
<div>
<p class="market" id="marketItemDescription">...</p>
<p class="market">value <span id="marketItemPrice">...</span> FGI</p>
<p class="market">sell price <span id="marketItemSellPrice">...</span> FGI</p>
<p class="market onestring">
owner
<span id="marketItemOwner">...</span>
</p>
<p id="marketItemHint"></p>
<button id="marketBuyButton" class="button" type="button">buy</button>
</div>
</div>
</div>
</div>
<div id="log"></div>
<script src="assets/bignumber.min.js"></script>
<script src="assets/script.js"></script>
</body>
</html>