tx · 24Z2o5iVP7Gw5qDLWqDPRMfKi5qcbTgnmirBK5FsKiiT 3Msq4ZGFnkf1fSdRprhrKeATWkN2z181Lnp: -0.01000000 Waves 2019.07.16 18:45 [588586] smart account 3Msq4ZGFnkf1fSdRprhrKeATWkN2z181Lnp > SELF 0.00000000 Waves
{ "type": 13, "id": "24Z2o5iVP7Gw5qDLWqDPRMfKi5qcbTgnmirBK5FsKiiT", "fee": 1000000, "feeAssetId": null, "timestamp": 1563291979145, "version": 1, "sender": "3Msq4ZGFnkf1fSdRprhrKeATWkN2z181Lnp", "senderPublicKey": "4KGnd8LUss96iQherVkPbXcSmLvr2aFQg2dP8y3BYWSh", "proofs": [ "3hP34qyCzqSCCsjzCMKuyVHVAJwdytwosb8Ysepgz5TxzaNViDgb1hEEwwNHUwXFszewi8Aq6zAXoF7b9bqZhzN9" ], "script": "base64:AAIDAAAAAAAAAAAAAAASAAAAABFtYW5hZ2VtZW50QWRkcmVzcwEAAAAaAVRkmbvJ0kO3B6PgkTRvykeiF9hL1K/ebWwAAAAACWNvbGRWYXVsdAkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTXk2MVdoUmIxSFhKZGhqYndrR3g2NmhRUXlRTjhYWjMxZAAAAAAFdG9rZW4BAAAAINkxm7o5gvj0t54JuACL0cqC1fkgioAfOie2ZwzBvziXAAAAAAl0b2tlblJhdGUAAAAAAAABhqAAAAAAE3Rva2VuRGVjaW1hbHNPZmZzZXQAAAAAAAX14QAAAAAADWhhcmRDYXBUb2tlbnMAACOG8m/BAAAAAAAAC3N0YXJ0SGVpZ2h0AAAAAABdLuOQAAAAAAllbmRIZWlnaHQAAAAAAF0u45AAAAAADXdhdmVzRGVjaW1hbHMAAAAAAAX14QABAAAAC29ubHlNYW5hZ2VyAAAAAQAAAAtjYWxsZXJCeXRlcwQAAAAGY2FsbGVyCQACWAAAAAEFAAAAC2NhbGxlckJ5dGVzBAAAABdtYW5hZ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RW50cnkAAAACBQAAABFjdXJyZW50UGFnZU51bUtleQUAAAAKbmV3UGFnZU51bQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAASY3VycmVudFBhZ2VTaXplS2V5BQAAAAtuZXdQYWdlU2l6ZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAAPbmV3V2hpdGVsaXN0S2V5BQAAAAlpbnZlc3RvcnMFAAAAA25pbAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAEVW5pdAQAAAAOZW1wdHlXaGl0ZWxpc3QFAAAAByRtYXRjaDAEAAAAC2luaXRQYWdlTnVtAAAAAAAAAAAABAAAAAxmaXJzdFBhZ2VLZXkJAAEsAAAAAgkAASwAAAACBQAAABN3aGl0ZWxpc3REYXRhUHJlZml4AgAAAAEtCQABpAAAAAEFAAAAC2luaXRQYWdlTnVtCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABF0b3RhbEludmVzdG9yc0tleQUAAAAQbmV3V2hpdGVsaXN0U2l6ZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAARY3VycmVudFBhZ2VOdW1LZXkFAAAAC2luaXRQYWdlTnVtCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJjdXJyZW50UGFnZVNpemVLZXkFAAAAEG5ld1doaXRlbGlzdFNpemUJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADGZpcnN0UGFnZUtleQUAAAAJaW52ZXN0b3JzBQAAAANuaWwJAQAAAAV0aHJvdwAAAAAAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAAB7Qcjos=", "chainId": 84, "height": 588586, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let managementAddress = base58'3My61WhRb1HXJdhjbwkGx66hQQyQN8XZ31d' | |
5 | + | ||
6 | + | let coldVault = extract(addressFromString("3My61WhRb1HXJdhjbwkGx66hQQyQN8XZ31d")) | |
7 | + | ||
8 | + | let token = base58'FcqLy5LtoA8ouXbaSP9CE5wQknotgBCcpvnpcEgRHCDt' | |
9 | + | ||
10 | + | let tokenRate = 100000 | |
11 | + | ||
12 | + | let tokenDecimalsOffset = 100000000 | |
13 | + | ||
14 | + | let hardCapTokens = 10000000000000000 | |
15 | + | ||
16 | + | let startHeight = 1563354000 | |
17 | + | ||
18 | + | let endHeight = 1563354000 | |
19 | + | ||
20 | + | let wavesDecimals = 100000000 | |
21 | + | ||
22 | + | func onlyManager (callerBytes) = { | |
23 | + | let caller = toBase58String(callerBytes) | |
24 | + | let managementAddressString = toBase58String(managementAddress) | |
25 | + | if ((caller != managementAddressString)) | |
26 | + | then false | |
27 | + | else true | |
28 | + | } | |
29 | + | ||
30 | + | ||
31 | + | func getStartHeight () = { | |
32 | + | let dataStartHeight = getInteger(this, "startHeight") | |
33 | + | match dataStartHeight { | |
34 | + | case changedStartHeight: Int => | |
35 | + | changedStartHeight | |
36 | + | case notChanged: Unit => | |
37 | + | startHeight | |
38 | + | case _ => | |
39 | + | throw() | |
40 | + | } | |
41 | + | } | |
42 | + | ||
43 | + | ||
44 | + | func getEndHeight () = { | |
45 | + | let dataEndHeight = getInteger(this, "endHeight") | |
46 | + | match dataEndHeight { | |
47 | + | case changedEndHeight: Int => | |
48 | + | changedEndHeight | |
49 | + | case notChanged: Unit => | |
50 | + | endHeight | |
51 | + | case _ => | |
52 | + | throw() | |
53 | + | } | |
54 | + | } | |
55 | + | ||
56 | + | ||
57 | + | func hasStarted () = { | |
58 | + | let dataStartHeight = getInteger(this, "startHeight") | |
59 | + | let stoStartHeight = getStartHeight() | |
60 | + | if ((height > stoStartHeight)) | |
61 | + | then true | |
62 | + | else false | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func hasEnded () = { | |
67 | + | let dataEndHeight = getInteger(this, "endHeight") | |
68 | + | let stoEndHeight = getEndHeight() | |
69 | + | if ((height > stoEndHeight)) | |
70 | + | then true | |
71 | + | else false | |
72 | + | } | |
73 | + | ||
74 | + | ||
75 | + | func hasFinished () = { | |
76 | + | let isFinalized = getBoolean(this, "finalized") | |
77 | + | match isFinalized { | |
78 | + | case dataFinalized: Boolean => | |
79 | + | dataFinalized | |
80 | + | case notFinalized: Unit => | |
81 | + | false | |
82 | + | case _ => | |
83 | + | throw() | |
84 | + | } | |
85 | + | } | |
86 | + | ||
87 | + | ||
88 | + | func getWavesRaised () = { | |
89 | + | let wavesRaised = getInteger(this, "wavesRaised") | |
90 | + | match wavesRaised { | |
91 | + | case waves: Int => | |
92 | + | waves | |
93 | + | case emptyState: Unit => | |
94 | + | 0 | |
95 | + | case _ => | |
96 | + | throw() | |
97 | + | } | |
98 | + | } | |
99 | + | ||
100 | + | ||
101 | + | func checkInvestorInPage (address,page) = { | |
102 | + | let whitelistPageKey = ("whitelistedInvestors-" + toString(page)) | |
103 | + | let whitelistPage = getString(this, whitelistPageKey) | |
104 | + | match whitelistPage { | |
105 | + | case pageString: String => | |
106 | + | let addressPosition = indexOf(pageString, address) | |
107 | + | match addressPosition { | |
108 | + | case pos: Int => | |
109 | + | true | |
110 | + | case empty: Unit => | |
111 | + | false | |
112 | + | case _ => | |
113 | + | throw() | |
114 | + | } | |
115 | + | case emptyPage: Unit => | |
116 | + | false | |
117 | + | case _ => | |
118 | + | throw() | |
119 | + | } | |
120 | + | } | |
121 | + | ||
122 | + | ||
123 | + | func checkInvestorInAllPages (address) = if (checkInvestorInPage(address, 0)) | |
124 | + | then true | |
125 | + | else if (checkInvestorInPage(address, 1)) | |
126 | + | then true | |
127 | + | else if (checkInvestorInPage(address, 2)) | |
128 | + | then true | |
129 | + | else if (checkInvestorInPage(address, 3)) | |
130 | + | then true | |
131 | + | else if (checkInvestorInPage(address, 4)) | |
132 | + | then true | |
133 | + | else if (checkInvestorInPage(address, 5)) | |
134 | + | then true | |
135 | + | else if (checkInvestorInPage(address, 6)) | |
136 | + | then true | |
137 | + | else if (checkInvestorInPage(address, 7)) | |
138 | + | then true | |
139 | + | else if (checkInvestorInPage(address, 8)) | |
140 | + | then true | |
141 | + | else if (checkInvestorInPage(address, 9)) | |
142 | + | then true | |
143 | + | else false | |
144 | + | ||
145 | + | ||
146 | + | @Callable(i) | |
147 | + | func buyTokens () = { | |
148 | + | let investorAddress = toBase58String(i.caller.bytes) | |
149 | + | if (!(checkInvestorInAllPages(investorAddress))) | |
150 | + | then throw("Only for whitelisted") | |
151 | + | else { | |
152 | + | let sendedAmount = extract(i.payment).amount | |
153 | + | if ((0 >= sendedAmount)) | |
154 | + | then throw("Cannot accept zero value payments") | |
155 | + | else if (!(hasStarted())) | |
156 | + | then throw("STO time is not started yet") | |
157 | + | else if (hasEnded()) | |
158 | + | then throw("STO time is already ended") | |
159 | + | else if (hasFinished()) | |
160 | + | then throw("STO is finalized") | |
161 | + | else { | |
162 | + | let wavesRaised = getWavesRaised() | |
163 | + | let wavesOffset = (wavesDecimals / tokenDecimalsOffset) | |
164 | + | let hardCapWaves = ((hardCapTokens / tokenRate) * wavesOffset) | |
165 | + | let updatedWavesRaised = (wavesRaised + sendedAmount) | |
166 | + | if ((updatedWavesRaised > hardCapWaves)) | |
167 | + | then throw("Attached payment overflows hardcap") | |
168 | + | else { | |
169 | + | let tokenAmountRaw = (sendedAmount * tokenRate) | |
170 | + | if ((wavesOffset > tokenAmountRaw)) | |
171 | + | then throw("Attached payment is too low to buy unit of token") | |
172 | + | else { | |
173 | + | let tokenAmount = (tokenAmountRaw / wavesOffset) | |
174 | + | ScriptResult(WriteSet([DataEntry("wavesRaised", updatedWavesRaised)]), TransferSet([ScriptTransfer(coldVault, sendedAmount, unit), ScriptTransfer(i.caller, tokenAmount, token)])) | |
175 | + | } | |
176 | + | } | |
177 | + | } | |
178 | + | } | |
179 | + | } | |
180 | + | ||
181 | + | ||
182 | + | ||
183 | + | @Callable(i) | |
184 | + | func finalize () = if (!(onlyManager(i.caller.bytes))) | |
185 | + | then throw("Only for administration") | |
186 | + | else if (hasFinished()) | |
187 | + | then throw("Already finalized") | |
188 | + | else if (hasEnded()) | |
189 | + | then WriteSet([DataEntry("finalized", true)]) | |
190 | + | else throw("STO not finished yet") | |
191 | + | ||
192 | + | ||
193 | + | ||
194 | + | @Callable(i) | |
195 | + | func setStartTime (newStartTime) = if (!(onlyManager(i.caller.bytes))) | |
196 | + | then throw("Only for administration") | |
197 | + | else { | |
198 | + | let currentEndHeight = getEndHeight() | |
199 | + | if ((newStartTime > currentEndHeight)) | |
200 | + | then throw("Start date must be lower than end date") | |
201 | + | else WriteSet([DataEntry("startHeight", newStartTime)]) | |
202 | + | } | |
203 | + | ||
204 | + | ||
205 | + | ||
206 | + | @Callable(i) | |
207 | + | func setEndTime (newEndTime) = if (!(onlyManager(i.caller.bytes))) | |
208 | + | then throw("Only for administration") | |
209 | + | else { | |
210 | + | let currentStartHeight = getStartHeight() | |
211 | + | if ((newEndTime > currentStartHeight)) | |
212 | + | then throw("End date must be higher than start date") | |
213 | + | else WriteSet([DataEntry("endHeight", newEndTime)]) | |
214 | + | } | |
215 | + | ||
216 | + | ||
217 | + | ||
218 | + | @Callable(i) | |
219 | + | func setStartAndEndTimes (newStartTime,newEndTime) = if (!(onlyManager(i.caller.bytes))) | |
220 | + | then throw("Only for administration") | |
221 | + | else if ((height >= newEndTime)) | |
222 | + | then throw("Cannot set time to past") | |
223 | + | else WriteSet([DataEntry("startHeight", newStartTime), DataEntry("endHeight", newEndTime)]) | |
224 | + | ||
225 | + | ||
226 | + | ||
227 | + | @Callable(i) | |
228 | + | func setWhitelistAddresses (investors) = if (!(onlyManager(i.caller.bytes))) | |
229 | + | then throw("Only for administration") | |
230 | + | else { | |
231 | + | let splittedWhitelist = split(investors, ",") | |
232 | + | let newWhitelistSize = size(splittedWhitelist) | |
233 | + | let whitelistDataPrefix = "whitelistedInvestors" | |
234 | + | let totalInvestorsKey = "totalInvestors" | |
235 | + | let currentPageNumKey = "currentWhitelistPage" | |
236 | + | let currentPageSizeKey = "currentWhitelistPageSize" | |
237 | + | let currentWhitelistSize = getInteger(this, totalInvestorsKey) | |
238 | + | match currentWhitelistSize { | |
239 | + | case currentInvestorsSize: Int => | |
240 | + | let currentPageNum = getIntegerValue(this, currentPageNumKey) | |
241 | + | let currentPageSize = getIntegerValue(this, currentPageSizeKey) | |
242 | + | let currentWhitelistKey = ((whitelistDataPrefix + "-") + toString(currentPageNum)) | |
243 | + | let currentWhitelistData = getStringValue(this, currentWhitelistKey) | |
244 | + | let remainingPageSize = (100 - currentPageSize) | |
245 | + | if (if ((remainingPageSize >= newWhitelistSize)) | |
246 | + | then (remainingPageSize > 0) | |
247 | + | else false) | |
248 | + | then { | |
249 | + | let updatedCurrentPageList = ((currentWhitelistData + ",") + investors) | |
250 | + | let updatedPageSize = (currentPageSize + newWhitelistSize) | |
251 | + | let newInvestorsSize = (currentInvestorsSize + newWhitelistSize) | |
252 | + | WriteSet([DataEntry(totalInvestorsKey, newInvestorsSize), DataEntry(currentPageSizeKey, updatedPageSize), DataEntry(currentWhitelistKey, updatedCurrentPageList)]) | |
253 | + | } | |
254 | + | else { | |
255 | + | let newPageNum = (currentPageNum + 1) | |
256 | + | let newInvestorsSize = (currentInvestorsSize + newWhitelistSize) | |
257 | + | let newPageSize = newWhitelistSize | |
258 | + | let newWhitelistKey = ((whitelistDataPrefix + "-") + toString(newPageNum)) | |
259 | + | WriteSet([DataEntry(totalInvestorsKey, newInvestorsSize), DataEntry(currentPageNumKey, newPageNum), DataEntry(currentPageSizeKey, newPageSize), DataEntry(newWhitelistKey, investors)]) | |
260 | + | } | |
261 | + | case emptyWhitelist: Unit => | |
262 | + | let initPageNum = 0 | |
263 | + | let firstPageKey = ((whitelistDataPrefix + "-") + toString(initPageNum)) | |
264 | + | WriteSet([DataEntry(totalInvestorsKey, newWhitelistSize), DataEntry(currentPageNumKey, initPageNum), DataEntry(currentPageSizeKey, newWhitelistSize), DataEntry(firstPageKey, investors)]) | |
265 | + | case _ => | |
266 | + | throw() | |
267 | + | } | |
268 | + | } | |
269 | + | ||
270 | + | ||
271 | + | @Verifier(tx) | |
272 | + | func verify () = false | |
273 | + |
github/deemru/w8io/026f985 20.86 ms ◑