tx · 2RpqCUGTofMBeJGauxv8oNrHpWqZ99QxLQWEWL4Btn1S 3N3EGbtDYQMqnLFrLM3VKjSExoTAjXcUg4c: -0.01000000 Waves 2019.09.09 16:42 [668618] smart account 3N3EGbtDYQMqnLFrLM3VKjSExoTAjXcUg4c > SELF 0.00000000 Waves
{ "type": 13, "id": "2RpqCUGTofMBeJGauxv8oNrHpWqZ99QxLQWEWL4Btn1S", "fee": 1000000, "feeAssetId": null, "timestamp": 1568036542210, "version": 1, "sender": "3N3EGbtDYQMqnLFrLM3VKjSExoTAjXcUg4c", "senderPublicKey": "ECTkg8BD2uHtFqtxdMxZ628uQrzSV7xGhwknrQFfJUt6", "proofs": [ "cUhtSAVR3xBU8YFAEkPy1YP6VXmybWEbTVgQS2pzw1aeq7KgGEQ13v7td4maZCf2SDGorAAEGNHCf8nxPbS3cqU" ], "script": "base64:AAIDAAAAAAAAAAAAAAAUAAAAABFtYW5hZ2VtZW50QWRkcmVzcwEAAAAaAVTGdDKW7RzUAogjVyoUsK5/aaZlQsdZYjEAAAAACWNvbGRWYXVsdAkBAAAAB2V4dHJhY3QAAAABCQEAAAARYWRkcmVzc0Zyb21TdHJpbmcAAAABAgAAACMzTjgxUW1UTEhYZmNrU1dGamlGejZvb3VkM0hjV2prTmJacgAAAAAFdG9rZW4BAAAAINjptaHbvFxVt0AQGDOpMMTGnypUlY2TBKnobO+/EaILAAAAAAl0b2tlblJhdGUAAAAAAAAAAAEAAAAAE3Rva2VuRGVjaW1hbHNPZmZzZXQJAABsAAAABgAAAAAAAAAACgAAAAAAAAAAAAAAAAAAAAAACAAAAAAAAAAAAAAAAAAAAAAAAAkBAAAAAlVwAAAAAAAAAAANaGFyZENhcFRva2VucwAAAAAXSHboAAAAAAAQYWxsb3dEYXRlc0NoYW5nZQcAAAAACXN0YXJ0VGltZQAAAAAAXXdmEAAAAAAHZW5kVGltZQAAAAAAXYHyEAAAAAANd2F2ZXNEZWNpbWFscwkAAGwAAAAGAAAAAAAAAAAKA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JzdFBhZ2VLZXkJAAEsAAAAAgkAASwAAAACBQAAABN3aGl0ZWxpc3REYXRhUHJlZml4AgAAAAEtCQABpAAAAAEFAAAAC2luaXRQYWdlTnVtCQEAAAAIV3JpdGVTZXQAAAABCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABF0b3RhbEludmVzdG9yc0tleQUAAAAQbmV3V2hpdGVsaXN0U2l6ZQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgUAAAARY3VycmVudFBhZ2VOdW1LZXkFAAAAC2luaXRQYWdlTnVtCQAETAAAAAIJAQAAAAlEYXRhRW50cnkAAAACBQAAABJjdXJyZW50UGFnZVNpemVLZXkFAAAAEG5ld1doaXRlbGlzdFNpemUJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAADGZpcnN0UGFnZUtleQUAAAAJaW52ZXN0b3JzBQAAAANuaWwJAQAAAAV0aHJvdwAAAAAAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABx5eBxw=", "chainId": 84, "height": 668618, "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'3N81QmTLHXfckSWFjiFz6ooud3HcWjkNbZr' | |
5 | + | ||
6 | + | let coldVault = extract(addressFromString("3N81QmTLHXfckSWFjiFz6ooud3HcWjkNbZr")) | |
7 | + | ||
8 | + | let token = base58'Fbjkt9bXtcURZN3vNStFQdbYWtFMp8eoiURzKoeCVfgn' | |
9 | + | ||
10 | + | let tokenRate = 1 | |
11 | + | ||
12 | + | let tokenDecimalsOffset = pow(10, 0, 8, 0, 0, Up()) | |
13 | + | ||
14 | + | let hardCapTokens = 100000000000 | |
15 | + | ||
16 | + | let allowDatesChange = false | |
17 | + | ||
18 | + | let startTime = 1568106000 | |
19 | + | ||
20 | + | let endTime = 1568797200 | |
21 | + | ||
22 | + | let wavesDecimals = pow(10, 0, 8, 0, 0, Up()) | |
23 | + | ||
24 | + | func onlyManager (callerBytes) = { | |
25 | + | let caller = toBase58String(callerBytes) | |
26 | + | let managementAddressString = toBase58String(managementAddress) | |
27 | + | if ((caller != managementAddressString)) | |
28 | + | then false | |
29 | + | else true | |
30 | + | } | |
31 | + | ||
32 | + | ||
33 | + | func getTimeNow () = { | |
34 | + | let blockInfo = value(blockInfoByHeight(height)) | |
35 | + | (blockInfo.timestamp / 1000) | |
36 | + | } | |
37 | + | ||
38 | + | ||
39 | + | func getStartTime () = { | |
40 | + | let dataStartTime = getInteger(this, "startTime") | |
41 | + | match dataStartTime { | |
42 | + | case changedStartTime: Int => | |
43 | + | changedStartTime | |
44 | + | case notChanged: Unit => | |
45 | + | startTime | |
46 | + | case _ => | |
47 | + | throw() | |
48 | + | } | |
49 | + | } | |
50 | + | ||
51 | + | ||
52 | + | func getEndTime () = { | |
53 | + | let dataEndTime = getInteger(this, "endTime") | |
54 | + | match dataEndTime { | |
55 | + | case changedEndTime: Int => | |
56 | + | changedEndTime | |
57 | + | case notChanged: Unit => | |
58 | + | endTime | |
59 | + | case _ => | |
60 | + | throw() | |
61 | + | } | |
62 | + | } | |
63 | + | ||
64 | + | ||
65 | + | func hasStarted () = if ((getTimeNow() > getStartTime())) | |
66 | + | then true | |
67 | + | else false | |
68 | + | ||
69 | + | ||
70 | + | func hasEnded () = if ((getTimeNow() > getEndTime())) | |
71 | + | then true | |
72 | + | else false | |
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 (hasFinished()) | |
158 | + | then throw("STO is finalized") | |
159 | + | else if (hasEnded()) | |
160 | + | then throw("STO time is already ended") | |
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 if (!(allowDatesChange)) | |
198 | + | then throw("changing dates is not supported") | |
199 | + | else if ((getTimeNow() >= newStartTime)) | |
200 | + | then throw("Cannot set time to past") | |
201 | + | else if ((newStartTime > getEndTime())) | |
202 | + | then throw("Start date must be lower than end date") | |
203 | + | else WriteSet([DataEntry("startTime", newStartTime)]) | |
204 | + | ||
205 | + | ||
206 | + | ||
207 | + | @Callable(i) | |
208 | + | func setEndTime (newEndTime) = if (!(onlyManager(i.caller.bytes))) | |
209 | + | then throw("Only for administration") | |
210 | + | else if (!(allowDatesChange)) | |
211 | + | then throw("changing dates is not supported") | |
212 | + | else if ((getTimeNow() >= newEndTime)) | |
213 | + | then throw("Cannot set time to past") | |
214 | + | else if ((getStartTime() > newEndTime)) | |
215 | + | then throw("End date must be higher than start date") | |
216 | + | else WriteSet([DataEntry("endTime", newEndTime)]) | |
217 | + | ||
218 | + | ||
219 | + | ||
220 | + | @Callable(i) | |
221 | + | func setStartAndEndTimes (newStartTime,newEndTime) = if (!(onlyManager(i.caller.bytes))) | |
222 | + | then throw("Only for administration") | |
223 | + | else if (!(allowDatesChange)) | |
224 | + | then throw("changing dates is not supported") | |
225 | + | else if ((getTimeNow() >= newStartTime)) | |
226 | + | then throw("Cannot set start time to past") | |
227 | + | else if ((newStartTime > newEndTime)) | |
228 | + | then throw("Start date must be lower than end date") | |
229 | + | else if ((getTimeNow() >= newEndTime)) | |
230 | + | then throw("Cannot set end time to past") | |
231 | + | else WriteSet([DataEntry("startTime", newStartTime), DataEntry("endTime", newEndTime)]) | |
232 | + | ||
233 | + | ||
234 | + | ||
235 | + | @Callable(i) | |
236 | + | func setWhitelistAddresses (investors) = if (!(onlyManager(i.caller.bytes))) | |
237 | + | then throw("Only for administration") | |
238 | + | else { | |
239 | + | let splittedWhitelist = split(investors, ",") | |
240 | + | let newWhitelistSize = size(splittedWhitelist) | |
241 | + | let whitelistDataPrefix = "whitelistedInvestors" | |
242 | + | let totalInvestorsKey = "totalInvestors" | |
243 | + | let currentPageNumKey = "currentWhitelistPage" | |
244 | + | let currentPageSizeKey = "currentWhitelistPageSize" | |
245 | + | let currentWhitelistSize = getInteger(this, totalInvestorsKey) | |
246 | + | match currentWhitelistSize { | |
247 | + | case currentInvestorsSize: Int => | |
248 | + | let currentPageNum = getIntegerValue(this, currentPageNumKey) | |
249 | + | let currentPageSize = getIntegerValue(this, currentPageSizeKey) | |
250 | + | let currentWhitelistKey = ((whitelistDataPrefix + "-") + toString(currentPageNum)) | |
251 | + | let currentWhitelistData = getStringValue(this, currentWhitelistKey) | |
252 | + | let remainingPageSize = (100 - currentPageSize) | |
253 | + | if (if ((remainingPageSize >= newWhitelistSize)) | |
254 | + | then (remainingPageSize > 0) | |
255 | + | else false) | |
256 | + | then { | |
257 | + | let updatedCurrentPageList = ((currentWhitelistData + ",") + investors) | |
258 | + | let updatedPageSize = (currentPageSize + newWhitelistSize) | |
259 | + | let newInvestorsSize = (currentInvestorsSize + newWhitelistSize) | |
260 | + | WriteSet([DataEntry(totalInvestorsKey, newInvestorsSize), DataEntry(currentPageSizeKey, updatedPageSize), DataEntry(currentWhitelistKey, updatedCurrentPageList)]) | |
261 | + | } | |
262 | + | else { | |
263 | + | let newPageNum = (currentPageNum + 1) | |
264 | + | let newInvestorsSize = (currentInvestorsSize + newWhitelistSize) | |
265 | + | let newPageSize = newWhitelistSize | |
266 | + | let newWhitelistKey = ((whitelistDataPrefix + "-") + toString(newPageNum)) | |
267 | + | WriteSet([DataEntry(totalInvestorsKey, newInvestorsSize), DataEntry(currentPageNumKey, newPageNum), DataEntry(currentPageSizeKey, newPageSize), DataEntry(newWhitelistKey, investors)]) | |
268 | + | } | |
269 | + | case emptyWhitelist: Unit => | |
270 | + | let initPageNum = 0 | |
271 | + | let firstPageKey = ((whitelistDataPrefix + "-") + toString(initPageNum)) | |
272 | + | WriteSet([DataEntry(totalInvestorsKey, newWhitelistSize), DataEntry(currentPageNumKey, initPageNum), DataEntry(currentPageSizeKey, newWhitelistSize), DataEntry(firstPageKey, investors)]) | |
273 | + | case _ => | |
274 | + | throw() | |
275 | + | } | |
276 | + | } | |
277 | + | ||
278 | + | ||
279 | + | @Verifier(tx) | |
280 | + | func verify () = false | |
281 | + |
github/deemru/w8io/026f985 20.63 ms ◑