tx · EQywz87c6LcD7m2EeejdMoSHosf5ryFXEMNQgykz9qki 3N7JvGVcDhmBu4ZscM9XoL3Z3M5QXUhHNHZ: -0.01000000 Waves 2019.11.06 18:18 [753231] smart account 3N7JvGVcDhmBu4ZscM9XoL3Z3M5QXUhHNHZ > SELF 0.00000000 Waves
{ "type": 13, "id": "EQywz87c6LcD7m2EeejdMoSHosf5ryFXEMNQgykz9qki", "fee": 1000000, "feeAssetId": null, "timestamp": 1573053539517, "version": 1, "sender": "3N7JvGVcDhmBu4ZscM9XoL3Z3M5QXUhHNHZ", "senderPublicKey": "4kyQSoUdJm6Wv3E9iw2XXX4NDwRPUnzP9wHimwHJLL9r", "proofs": [ "iFXBP2YpP1Urj6p8MoS4Tn5guq986G1cA1gAJap1Yp4SEkBssGmjBdLvzJ6bvZvW6WZCexsRt182Ga47S1CtYwD" ], "script": "base64:AAIDAAAAAAAAACUIARIAEgASAwoBARIDCgEBEgQKAgEBEgMKAQESAwoBARIDCgEIAAAAGAAAAAARbWFuYWdlbWVudEFkZHJlc3MBAAAAGgFUE6hvtoSE62S1nC/g4FR6ERC9dnr0zRUiAAAAAAljb2xkVmF1bHQJAQAAAAdleHRyYWN0AAAAAQkBAAAAEWFkZHJlc3NGcm9tU3RyaW5nAAAAAQIAAAAjM04zNFVuc3VOUk5XWkRHdWtnV1p0YVRZU3RTaXdMYnVoUG4AAAAABXRva2VuAQAAACCv9ps9yoimL7rMFU6Oe3ziUjMfG6fU0n6NuOsyA3EmdQAAAAAJdG9rZW5SYXRlAAAAAAAAAABkAAAAABN0b2tlbkRlY2ltYWxzT2Zmc2V0CQAAbAAAAAYAAAAAAAAAAAoAAAAAAAAAAAAAAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAAAAJAQAAAAJVcAAAAAAAAAAADWhhcmRDYXBUb2tlbnMAAAAJGE5yoAAAAAAAEm1pbkludmVzdG1lbnRXYXZlcwAAAAAABfXhAAAAAAASbWF4SW52ZXN0bWVudFdhdmVzAAAAA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QAAAAtpbml0UGFnZU51bQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAASY3VycmVudFBhZ2VTaXplS2V5BQAAABBuZXdXaGl0ZWxpc3RTaXplCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAAAxmaXJzdFBhZ2VLZXkFAAAACWludmVzdG9ycwUAAAADbmlsCQEAAAAFdGhyb3cAAAAAAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAeEMH8f", "chainId": 84, "height": 753231, "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'3Mqi2PjJG63WxBN2kTj76bE7Hs3e7sZBhWZ' | |
5 | + | ||
6 | + | let coldVault = extract(addressFromString("3N34UnsuNRNWZDGukgWZtaTYStSiwLbuhPn")) | |
7 | + | ||
8 | + | let token = base58'CqtSvwV8bNyuie2oGL3ywVtNkVrsAR4wgc4MY3XdhQqS' | |
9 | + | ||
10 | + | let tokenRate = 100 | |
11 | + | ||
12 | + | let tokenDecimalsOffset = pow(10, 0, 8, 0, 0, Up()) | |
13 | + | ||
14 | + | let hardCapTokens = 10000000000000 | |
15 | + | ||
16 | + | let minInvestmentWaves = 100000000 | |
17 | + | ||
18 | + | let maxInvestmentWaves = 10000000000 | |
19 | + | ||
20 | + | let allowDatesChange = true | |
21 | + | ||
22 | + | let startTime = 1573057020 | |
23 | + | ||
24 | + | let endTime = 1575129600 | |
25 | + | ||
26 | + | let wavesDecimals = pow(10, 0, 8, 0, 0, Up()) | |
27 | + | ||
28 | + | func onlyManager (callerBytes) = { | |
29 | + | let caller = toBase58String(callerBytes) | |
30 | + | let managementAddressString = toBase58String(managementAddress) | |
31 | + | if ((caller != managementAddressString)) | |
32 | + | then false | |
33 | + | else true | |
34 | + | } | |
35 | + | ||
36 | + | ||
37 | + | func getTimeNow () = { | |
38 | + | let blockInfo = value(blockInfoByHeight(height)) | |
39 | + | (blockInfo.timestamp / 1000) | |
40 | + | } | |
41 | + | ||
42 | + | ||
43 | + | func getStartTime () = { | |
44 | + | let dataStartTime = getInteger(this, "startTime") | |
45 | + | match dataStartTime { | |
46 | + | case changedStartTime: Int => | |
47 | + | changedStartTime | |
48 | + | case notChanged: Unit => | |
49 | + | startTime | |
50 | + | case _ => | |
51 | + | throw() | |
52 | + | } | |
53 | + | } | |
54 | + | ||
55 | + | ||
56 | + | func getEndTime () = { | |
57 | + | let dataEndTime = getInteger(this, "endTime") | |
58 | + | match dataEndTime { | |
59 | + | case changedEndTime: Int => | |
60 | + | changedEndTime | |
61 | + | case notChanged: Unit => | |
62 | + | endTime | |
63 | + | case _ => | |
64 | + | throw() | |
65 | + | } | |
66 | + | } | |
67 | + | ||
68 | + | ||
69 | + | func hasStarted () = if ((getTimeNow() > getStartTime())) | |
70 | + | then true | |
71 | + | else false | |
72 | + | ||
73 | + | ||
74 | + | func hasEnded () = if ((getTimeNow() > getEndTime())) | |
75 | + | then true | |
76 | + | else false | |
77 | + | ||
78 | + | ||
79 | + | func hasFinished () = { | |
80 | + | let isFinalized = getBoolean(this, "finalized") | |
81 | + | match isFinalized { | |
82 | + | case dataFinalized: Boolean => | |
83 | + | dataFinalized | |
84 | + | case notFinalized: Unit => | |
85 | + | false | |
86 | + | case _ => | |
87 | + | throw() | |
88 | + | } | |
89 | + | } | |
90 | + | ||
91 | + | ||
92 | + | func getWavesRaised () = { | |
93 | + | let wavesRaised = getInteger(this, "wavesRaised") | |
94 | + | match wavesRaised { | |
95 | + | case waves: Int => | |
96 | + | waves | |
97 | + | case emptyState: Unit => | |
98 | + | 0 | |
99 | + | case _ => | |
100 | + | throw() | |
101 | + | } | |
102 | + | } | |
103 | + | ||
104 | + | ||
105 | + | func checkInvestorInPage (address,page) = { | |
106 | + | let whitelistPageKey = ("whitelistedInvestors-" + toString(page)) | |
107 | + | let whitelistPage = getString(this, whitelistPageKey) | |
108 | + | match whitelistPage { | |
109 | + | case pageString: String => | |
110 | + | let addressPosition = indexOf(pageString, address) | |
111 | + | match addressPosition { | |
112 | + | case pos: Int => | |
113 | + | true | |
114 | + | case empty: Unit => | |
115 | + | false | |
116 | + | case _ => | |
117 | + | throw() | |
118 | + | } | |
119 | + | case emptyPage: Unit => | |
120 | + | false | |
121 | + | case _ => | |
122 | + | throw() | |
123 | + | } | |
124 | + | } | |
125 | + | ||
126 | + | ||
127 | + | func checkInvestorInAllPages (address) = if (checkInvestorInPage(address, 0)) | |
128 | + | then true | |
129 | + | else if (checkInvestorInPage(address, 1)) | |
130 | + | then true | |
131 | + | else if (checkInvestorInPage(address, 2)) | |
132 | + | then true | |
133 | + | else if (checkInvestorInPage(address, 3)) | |
134 | + | then true | |
135 | + | else if (checkInvestorInPage(address, 4)) | |
136 | + | then true | |
137 | + | else if (checkInvestorInPage(address, 5)) | |
138 | + | then true | |
139 | + | else if (checkInvestorInPage(address, 6)) | |
140 | + | then true | |
141 | + | else if (checkInvestorInPage(address, 7)) | |
142 | + | then true | |
143 | + | else if (checkInvestorInPage(address, 8)) | |
144 | + | then true | |
145 | + | else if (checkInvestorInPage(address, 9)) | |
146 | + | then true | |
147 | + | else false | |
148 | + | ||
149 | + | ||
150 | + | func getMinInvestment () = { | |
151 | + | let dataMinInvestment = getInteger(this, "minInvestment") | |
152 | + | match dataMinInvestment { | |
153 | + | case changedMinInvestment: Int => | |
154 | + | changedMinInvestment | |
155 | + | case notChanged: Unit => | |
156 | + | minInvestmentWaves | |
157 | + | case _ => | |
158 | + | throw() | |
159 | + | } | |
160 | + | } | |
161 | + | ||
162 | + | ||
163 | + | func getMaxInvestment () = { | |
164 | + | let dataMaxInvestment = getInteger(this, "maxInvestment") | |
165 | + | match dataMaxInvestment { | |
166 | + | case changedMaxInvestment: Int => | |
167 | + | changedMaxInvestment | |
168 | + | case notChanged: Unit => | |
169 | + | maxInvestmentWaves | |
170 | + | case _ => | |
171 | + | throw() | |
172 | + | } | |
173 | + | } | |
174 | + | ||
175 | + | ||
176 | + | @Callable(i) | |
177 | + | func buyTokens () = { | |
178 | + | let investorAddress = toBase58String(i.caller.bytes) | |
179 | + | if (!(checkInvestorInAllPages(investorAddress))) | |
180 | + | then throw("Only for whitelisted") | |
181 | + | else { | |
182 | + | let sendedAmount = extract(i.payment).amount | |
183 | + | if ((0 >= sendedAmount)) | |
184 | + | then throw("Cannot accept zero value payments") | |
185 | + | else if ((getMinInvestment() > sendedAmount)) | |
186 | + | then throw("Attached payment is below minimal price") | |
187 | + | else if ((sendedAmount > getMaxInvestment())) | |
188 | + | then throw("Attached payment is above maximum price") | |
189 | + | else if (!(hasStarted())) | |
190 | + | then throw("STO time is not started yet") | |
191 | + | else if (hasFinished()) | |
192 | + | then throw("STO is finalized") | |
193 | + | else if (hasEnded()) | |
194 | + | then throw("STO time is already ended") | |
195 | + | else { | |
196 | + | let wavesRaised = getWavesRaised() | |
197 | + | let wavesOffset = (wavesDecimals / tokenDecimalsOffset) | |
198 | + | let hardCapWaves = ((hardCapTokens / tokenRate) * wavesOffset) | |
199 | + | let updatedWavesRaised = (wavesRaised + sendedAmount) | |
200 | + | if ((updatedWavesRaised > hardCapWaves)) | |
201 | + | then throw("Attached payment overflows hardcap") | |
202 | + | else { | |
203 | + | let tokenAmountRaw = (sendedAmount * tokenRate) | |
204 | + | if ((wavesOffset > tokenAmountRaw)) | |
205 | + | then throw("Attached payment is too low to buy unit of token") | |
206 | + | else { | |
207 | + | let tokenAmount = (tokenAmountRaw / wavesOffset) | |
208 | + | ScriptResult(WriteSet([DataEntry("wavesRaised", updatedWavesRaised)]), TransferSet([ScriptTransfer(coldVault, sendedAmount, unit), ScriptTransfer(i.caller, tokenAmount, token)])) | |
209 | + | } | |
210 | + | } | |
211 | + | } | |
212 | + | } | |
213 | + | } | |
214 | + | ||
215 | + | ||
216 | + | ||
217 | + | @Callable(i) | |
218 | + | func finalize () = if (!(onlyManager(i.caller.bytes))) | |
219 | + | then throw("Only for administration") | |
220 | + | else if (hasFinished()) | |
221 | + | then throw("Already finalized") | |
222 | + | else if (hasEnded()) | |
223 | + | then WriteSet([DataEntry("finalized", true)]) | |
224 | + | else throw("STO not finished yet") | |
225 | + | ||
226 | + | ||
227 | + | ||
228 | + | @Callable(i) | |
229 | + | func setStartTime (newStartTime) = if (!(onlyManager(i.caller.bytes))) | |
230 | + | then throw("Only for administration") | |
231 | + | else if (!(allowDatesChange)) | |
232 | + | then throw("changing dates is not supported") | |
233 | + | else if ((getTimeNow() >= newStartTime)) | |
234 | + | then throw("Cannot set time to past") | |
235 | + | else if ((newStartTime > getEndTime())) | |
236 | + | then throw("Start date must be lower than end date") | |
237 | + | else WriteSet([DataEntry("startTime", newStartTime)]) | |
238 | + | ||
239 | + | ||
240 | + | ||
241 | + | @Callable(i) | |
242 | + | func setEndTime (newEndTime) = if (!(onlyManager(i.caller.bytes))) | |
243 | + | then throw("Only for administration") | |
244 | + | else if (!(allowDatesChange)) | |
245 | + | then throw("changing dates is not supported") | |
246 | + | else if ((getTimeNow() >= newEndTime)) | |
247 | + | then throw("Cannot set time to past") | |
248 | + | else if ((getStartTime() > newEndTime)) | |
249 | + | then throw("End date must be higher than start date") | |
250 | + | else WriteSet([DataEntry("endTime", newEndTime)]) | |
251 | + | ||
252 | + | ||
253 | + | ||
254 | + | @Callable(i) | |
255 | + | func setStartAndEndTimes (newStartTime,newEndTime) = if (!(onlyManager(i.caller.bytes))) | |
256 | + | then throw("Only for administration") | |
257 | + | else if (!(allowDatesChange)) | |
258 | + | then throw("changing dates is not supported") | |
259 | + | else if ((getTimeNow() >= newStartTime)) | |
260 | + | then throw("Cannot set start time to past") | |
261 | + | else if ((newStartTime > newEndTime)) | |
262 | + | then throw("Start date must be lower than end date") | |
263 | + | else if ((getTimeNow() >= newEndTime)) | |
264 | + | then throw("Cannot set end time to past") | |
265 | + | else WriteSet([DataEntry("startTime", newStartTime), DataEntry("endTime", newEndTime)]) | |
266 | + | ||
267 | + | ||
268 | + | ||
269 | + | @Callable(i) | |
270 | + | func setMinInvestment (newValue) = if (!(onlyManager(i.caller.bytes))) | |
271 | + | then throw("Only for administration") | |
272 | + | else WriteSet([DataEntry("minInvestment", newValue)]) | |
273 | + | ||
274 | + | ||
275 | + | ||
276 | + | @Callable(i) | |
277 | + | func setMaxInvestment (newValue) = if (!(onlyManager(i.caller.bytes))) | |
278 | + | then throw("Only for administration") | |
279 | + | else WriteSet([DataEntry("maxInvestment", newValue)]) | |
280 | + | ||
281 | + | ||
282 | + | ||
283 | + | @Callable(i) | |
284 | + | func setWhitelistAddresses (investors) = if (!(onlyManager(i.caller.bytes))) | |
285 | + | then throw("Only for administration") | |
286 | + | else { | |
287 | + | let splittedWhitelist = split(investors, ",") | |
288 | + | let newWhitelistSize = size(splittedWhitelist) | |
289 | + | let whitelistDataPrefix = "whitelistedInvestors" | |
290 | + | let totalInvestorsKey = "totalInvestors" | |
291 | + | let currentPageNumKey = "currentWhitelistPage" | |
292 | + | let currentPageSizeKey = "currentWhitelistPageSize" | |
293 | + | let currentWhitelistSize = getInteger(this, totalInvestorsKey) | |
294 | + | match currentWhitelistSize { | |
295 | + | case currentInvestorsSize: Int => | |
296 | + | let currentPageNum = getIntegerValue(this, currentPageNumKey) | |
297 | + | let currentPageSize = getIntegerValue(this, currentPageSizeKey) | |
298 | + | let currentWhitelistKey = ((whitelistDataPrefix + "-") + toString(currentPageNum)) | |
299 | + | let currentWhitelistData = getStringValue(this, currentWhitelistKey) | |
300 | + | let remainingPageSize = (100 - currentPageSize) | |
301 | + | if (if ((remainingPageSize >= newWhitelistSize)) | |
302 | + | then (remainingPageSize > 0) | |
303 | + | else false) | |
304 | + | then { | |
305 | + | let updatedCurrentPageList = ((currentWhitelistData + ",") + investors) | |
306 | + | let updatedPageSize = (currentPageSize + newWhitelistSize) | |
307 | + | let newInvestorsSize = (currentInvestorsSize + newWhitelistSize) | |
308 | + | WriteSet([DataEntry(totalInvestorsKey, newInvestorsSize), DataEntry(currentPageSizeKey, updatedPageSize), DataEntry(currentWhitelistKey, updatedCurrentPageList)]) | |
309 | + | } | |
310 | + | else { | |
311 | + | let newPageNum = (currentPageNum + 1) | |
312 | + | let newInvestorsSize = (currentInvestorsSize + newWhitelistSize) | |
313 | + | let newPageSize = newWhitelistSize | |
314 | + | let newWhitelistKey = ((whitelistDataPrefix + "-") + toString(newPageNum)) | |
315 | + | WriteSet([DataEntry(totalInvestorsKey, newInvestorsSize), DataEntry(currentPageNumKey, newPageNum), DataEntry(currentPageSizeKey, newPageSize), DataEntry(newWhitelistKey, investors)]) | |
316 | + | } | |
317 | + | case emptyWhitelist: Unit => | |
318 | + | let initPageNum = 0 | |
319 | + | let firstPageKey = ((whitelistDataPrefix + "-") + toString(initPageNum)) | |
320 | + | WriteSet([DataEntry(totalInvestorsKey, newWhitelistSize), DataEntry(currentPageNumKey, initPageNum), DataEntry(currentPageSizeKey, newWhitelistSize), DataEntry(firstPageKey, investors)]) | |
321 | + | case _ => | |
322 | + | throw() | |
323 | + | } | |
324 | + | } | |
325 | + | ||
326 | + | ||
327 | + | @Verifier(tx) | |
328 | + | func verify () = false | |
329 | + |
github/deemru/w8io/169f3d6 30.86 ms ◑