tx · 4hmE9GihFDvacVJzuT5amvcokDmHaqbrKzJeMbJxL3kB 3NC7LFpzeWvBEc5MeLQz4mRNfhvXGJtG39C: -0.01500000 Waves 2021.02.10 13:40 [1391970] smart account 3NC7LFpzeWvBEc5MeLQz4mRNfhvXGJtG39C > SELF 0.00000000 Waves
{ "type": 13, "id": "4hmE9GihFDvacVJzuT5amvcokDmHaqbrKzJeMbJxL3kB", "fee": 1500000, "feeAssetId": null, "timestamp": 1612953663668, "version": 2, "chainId": 84, "sender": "3NC7LFpzeWvBEc5MeLQz4mRNfhvXGJtG39C", "senderPublicKey": "6177aLzMsXkcUKVywgPKC9Mf9dLa4GkPgndGBQHZe844", "proofs": [ "3gX4wBZ1fX1ywNE6eaF2VqTJ9MHfdbx1RveXk7BA9ea56sqaYckAtJrEabVxw79QGt7Fk1a7j8Qj7ZWKT2JNLmCp" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEwAAAAAKZEFwcEFkZHJlcwIAAAArRjlEQ0dpWWdUOHl2QnExQVFGY1NwR0c0cDhzZHpOejltWmN6RHZKNDVMTAAAAAALdGlja2V0QXNzZXQBAAAAIEYc9ZUgYtXiRrToDJgiMgFmnQRu3R1NoyARqb9irygsAAAAAA10b2tlbnNQZXJQbGF5AAAAAAAF9eEAAAAAAA1sb3R0ZXJ5YW1vdW50AgAAAAdfYW1vdW50AAAAABJsb3R0ZXJ5cHJvYmFiaWxpdHkCAAAADF9wcm9iYWJpbGl0eQAAAAAZbG90dGVyeXByb2JhYmlsaXR5ZGVjaW1hbAIAAAAUX3Byb2JhYmlsaXR5X2RlY2ltYWwAAAAADGxvdHRlcnlQcmljZQIAAAAGX3ByaWNlAAAAAA1sb3R0ZXJ5UHJpY2VzAgAAAA9fbG90dGVyeV9wcmljZXMAAAAADmxvdHRlcnlBc3NldElkAgAAABFfbG90dGVyeV9hc3NldF9pZAAAAAANY291bnRPZlByaWNlcwIAAAANX2NvdW50X3ByaWNlcwAAAAAUbG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ADyRhY2MzMTEzMzYxMTM4NgQAAAAPJGFjYzQxMTMzNjExMzg2CQEAAAAXZ2VuZXJhdGVOZXdMaXN0T2ZQcmljZXMAAAACBQAAAA8kYWNjMzExMzM2MTEzODYJAAGRAAAAAgUAAAAPJGxpc3QxMTMzNjExMzg2AAAAAAAAAAADAwkAAAAAAAACBQAAAA8kc2l6ZTExMzM2MTEzODYAAAAAAAAAAAQFAAAADyRhY2M0MTEzMzYxMTM4NgQAAAAPJGFjYzUxMTMzNjExMzg2CQEAAAAXZ2VuZXJhdGVOZXdMaXN0T2ZQcmljZXMAAAACBQAAAA8kYWNjNDExMzM2MTEzODYJAAGRAAAAAgUAAAAPJGxpc3QxMTMzNjExMzg2AAAAAAAAAAAEAwkAAAAAAAACBQAAAA8kc2l6ZTExMzM2MTEzODYAAAAAAAAAAAUFAAAADyRhY2M1MTEzMzYxMTM4NgQAAAAPJGFjYzYxMTMzNjExMzg2CQEAAAAXZ2VuZXJhdGVOZXdMaXN0T2ZQcmljZXMAAAACBQAAAA8kYWNjNTExMzM2MTEzODYJAAGRAAAAAgUAAAAPJGxpc3QxMTMzNjExMzg2AAAAAAAAAAAFCQAAAgAAAAECAAAAEkxpc3Qgc2l6ZSBleGNlZWQgNQkAAAIAAAABCQABLAAAAAIJAAEsAAAAAgUAAAASc3RvcmVkVG9rZW5zVmFsdWVzAgAAAAQgOjogBQAAAAV0b2tlbgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQ0Y8i8=", "height": 1391970, "applicationStatus": "succeeded", "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 dAppAddres = "F9DCGiYgT8yvBq1AQFcSpGG4p8sdzNz9mZczDvJ45LL" | |
5 | + | ||
6 | + | let ticketAsset = base58'5ih9jd4KV9kSey55yvKMgLSHcwsYYkQ4pRDJtRNoxUhy' | |
7 | + | ||
8 | + | let tokensPerPlay = 100000000 | |
9 | + | ||
10 | + | let lotteryamount = "_amount" | |
11 | + | ||
12 | + | let lotteryprobability = "_probability" | |
13 | + | ||
14 | + | let lotteryprobabilitydecimal = "_probability_decimal" | |
15 | + | ||
16 | + | let lotteryPrice = "_price" | |
17 | + | ||
18 | + | let lotteryPrices = "_lottery_prices" | |
19 | + | ||
20 | + | let lotteryAssetId = "_lottery_asset_id" | |
21 | + | ||
22 | + | let countOfPrices = "_count_prices" | |
23 | + | ||
24 | + | let lastHashRandomNumber = "last_spin_random_hash" | |
25 | + | ||
26 | + | let lastTokenRandomHash = "last_token_random_hash" | |
27 | + | ||
28 | + | let allowSizeLottery = 5 | |
29 | + | ||
30 | + | func randomizer (inv) = { | |
31 | + | let lastPlay = match getBinary(this, lastHashRandomNumber) { | |
32 | + | case s: ByteVector => | |
33 | + | s | |
34 | + | case _: Unit => | |
35 | + | base58'2ee4oFDYriWJ9EMeR' | |
36 | + | case _ => | |
37 | + | throw("Match error") | |
38 | + | } | |
39 | + | let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
40 | + | sha256(rand) | |
41 | + | } | |
42 | + | ||
43 | + | ||
44 | + | func generatorRandomHash (inv) = { | |
45 | + | let lastHashForToken = match getBinary(this, lastTokenRandomHash) { | |
46 | + | case s: ByteVector => | |
47 | + | s | |
48 | + | case _: Unit => | |
49 | + | base58'4dD7osCQzvuXJdTiGfKvTwnKT' | |
50 | + | case _ => | |
51 | + | throw("Match error") | |
52 | + | } | |
53 | + | let rand = (((((lastHashForToken + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
54 | + | sha256(rand) | |
55 | + | } | |
56 | + | ||
57 | + | ||
58 | + | func getPriceArray () = { | |
59 | + | let tempPrices = getStringValue(this, lotteryPrices) | |
60 | + | let trimPrices = take(tempPrices, (size(tempPrices) - 1)) | |
61 | + | let newArray = split(trimPrices, ",") | |
62 | + | newArray | |
63 | + | } | |
64 | + | ||
65 | + | ||
66 | + | func generateNewListOfPrices (token,val) = { | |
67 | + | let indexOfComma = indexOf(token, ",") | |
68 | + | let isTokenVal = if ((token != val)) | |
69 | + | then true | |
70 | + | else false | |
71 | + | if (if (isDefined(indexOfComma)) | |
72 | + | then isTokenVal | |
73 | + | else false) | |
74 | + | then ((token + val) + ",") | |
75 | + | else if (isTokenVal) | |
76 | + | then (val + ",") | |
77 | + | else "" | |
78 | + | } | |
79 | + | ||
80 | + | ||
81 | + | func generatePriceStringFromList (list,val) = if (isDefined(val)) | |
82 | + | then { | |
83 | + | let listSize = size(list) | |
84 | + | let tokenToRemove = list[(listSize - 1)] | |
85 | + | if ((tokenToRemove == val)) | |
86 | + | then list | |
87 | + | else val :: list | |
88 | + | } | |
89 | + | else list | |
90 | + | ||
91 | + | ||
92 | + | func procedLottery (win,token) = if (if (isDefined(token)) | |
93 | + | then true | |
94 | + | else (token != "")) | |
95 | + | then { | |
96 | + | let tokenProbability = getIntegerValue(this, (token + lotteryprobability)) | |
97 | + | let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal)) | |
98 | + | let probabilityValue = (tokenProbabilityDecimal * 1000) | |
99 | + | let probCompare = (tokenProbabilityDecimal % probabilityValue) | |
100 | + | let sizeOfWin = size(win) | |
101 | + | if ((sizeOfWin == 1)) | |
102 | + | then { | |
103 | + | let randomNumber = win[0] | |
104 | + | let comp = toInt(fromBase64String(randomNumber)) | |
105 | + | if ((probCompare > comp)) | |
106 | + | then token :: win | |
107 | + | else win | |
108 | + | } | |
109 | + | else win | |
110 | + | } | |
111 | + | else win | |
112 | + | ||
113 | + | ||
114 | + | @Callable(i) | |
115 | + | func updateprobability (probability,amount,poolprice,probDecimal,assetId) = { | |
116 | + | let token = toBase64String(generatorRandomHash(i)) | |
117 | + | let paymentIsDefined = if (!(isDefined(i.payment))) | |
118 | + | then false | |
119 | + | else true | |
120 | + | let lotteryAssetTN = if ((assetId == "")) | |
121 | + | then true | |
122 | + | else false | |
123 | + | let totalRequiredAmount = (amount * poolprice) | |
124 | + | if ((paymentIsDefined == true)) | |
125 | + | then { | |
126 | + | let payment = extract(i.payment) | |
127 | + | let paymentAssetId = match payment.assetId { | |
128 | + | case a: ByteVector => | |
129 | + | toBase58String(a) | |
130 | + | case _: Unit => | |
131 | + | "" | |
132 | + | case _ => | |
133 | + | throw("Match error") | |
134 | + | } | |
135 | + | let paymentAmount = payment.amount | |
136 | + | if ((paymentAssetId != assetId)) | |
137 | + | then throw("Asset Id not matching with Payment Asset Id") | |
138 | + | else if ((totalRequiredAmount > paymentAmount)) | |
139 | + | then throw("Not enough Asset Amount") | |
140 | + | else { | |
141 | + | let tempValue = match getString(this, lotteryPrices) { | |
142 | + | case a: String => | |
143 | + | a | |
144 | + | case _: Unit => | |
145 | + | "" | |
146 | + | case _ => | |
147 | + | throw("Match error") | |
148 | + | } | |
149 | + | let containKey = indexOf(tempValue, token) | |
150 | + | let storedTokensValues = match containKey { | |
151 | + | case _: Unit => | |
152 | + | ((tempValue + token) + ",") | |
153 | + | case x: Int => | |
154 | + | throw("Token is duplicated") | |
155 | + | case _ => | |
156 | + | throw("Match error") | |
157 | + | } | |
158 | + | let countTokens = match getInteger(this, countOfPrices) { | |
159 | + | case a: Int => | |
160 | + | a | |
161 | + | case _: Unit => | |
162 | + | 0 | |
163 | + | case _ => | |
164 | + | throw("Match error") | |
165 | + | } | |
166 | + | if ((allowSizeLottery > countTokens)) | |
167 | + | then { | |
168 | + | let updateLotteryPool = WriteSet([DataEntry((token + lotteryamount), amount), DataEntry((token + lotteryprobability), probability), DataEntry((token + lotteryPrice), poolprice), DataEntry(lotteryPrices, storedTokensValues), DataEntry(countOfPrices, (countTokens + 1)), DataEntry((token + lotteryprobabilitydecimal), probDecimal), DataEntry((token + lotteryAssetId), assetId), DataEntry(lastTokenRandomHash, token)]) | |
169 | + | ScriptResult(updateLotteryPool, TransferSet(nil)) | |
170 | + | } | |
171 | + | else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery))) | |
172 | + | } | |
173 | + | } | |
174 | + | else { | |
175 | + | let tnBalance = if (lotteryAssetTN) | |
176 | + | then wavesBalance(this) | |
177 | + | else assetBalance(this, fromBase64String(assetId)) | |
178 | + | if ((totalRequiredAmount > tnBalance)) | |
179 | + | then throw("Not enough Asset Amount") | |
180 | + | else { | |
181 | + | let tempValue = match getString(this, lotteryPrices) { | |
182 | + | case a: String => | |
183 | + | a | |
184 | + | case _: Unit => | |
185 | + | "" | |
186 | + | case _ => | |
187 | + | throw("Match error") | |
188 | + | } | |
189 | + | let containKey = indexOf(tempValue, token) | |
190 | + | let storedTokensValues = match containKey { | |
191 | + | case _: Unit => | |
192 | + | ((tempValue + token) + ",") | |
193 | + | case x: Int => | |
194 | + | throw("Token is duplicated") | |
195 | + | case _ => | |
196 | + | throw("Match error") | |
197 | + | } | |
198 | + | let countTokens = match getInteger(this, countOfPrices) { | |
199 | + | case a: Int => | |
200 | + | a | |
201 | + | case _: Unit => | |
202 | + | 0 | |
203 | + | case _ => | |
204 | + | throw("Match error") | |
205 | + | } | |
206 | + | if ((allowSizeLottery > countTokens)) | |
207 | + | then { | |
208 | + | let updateLotteryPool = WriteSet([DataEntry((token + lotteryamount), amount), DataEntry((token + lotteryprobability), probability), DataEntry((token + lotteryPrice), poolprice), DataEntry(lotteryPrices, storedTokensValues), DataEntry(countOfPrices, (countTokens + 1)), DataEntry((token + lotteryprobabilitydecimal), probDecimal), DataEntry((token + lotteryAssetId), assetId), DataEntry(lastTokenRandomHash, token)]) | |
209 | + | ScriptResult(updateLotteryPool, TransferSet(nil)) | |
210 | + | } | |
211 | + | else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery))) | |
212 | + | } | |
213 | + | } | |
214 | + | } | |
215 | + | ||
216 | + | ||
217 | + | ||
218 | + | @Callable(i) | |
219 | + | func startlotto () = { | |
220 | + | let currentKey = toBase58String(i.caller.bytes) | |
221 | + | let randhash = randomizer(i) | |
222 | + | let countTokens = match getInteger(this, countOfPrices) { | |
223 | + | case a: Int => | |
224 | + | a | |
225 | + | case _: Unit => | |
226 | + | 0 | |
227 | + | case _ => | |
228 | + | throw("Match error") | |
229 | + | } | |
230 | + | let priceList = getPriceArray() | |
231 | + | let randNumber = toBase64String(randhash) | |
232 | + | let winningToken = { | |
233 | + | let $list87088755 = priceList | |
234 | + | let $size87088755 = size($list87088755) | |
235 | + | let $acc087088755 = [randNumber] | |
236 | + | if (($size87088755 == 0)) | |
237 | + | then $acc087088755 | |
238 | + | else { | |
239 | + | let $acc187088755 = procedLottery($acc087088755, $list87088755[0]) | |
240 | + | if (($size87088755 == 1)) | |
241 | + | then $acc187088755 | |
242 | + | else { | |
243 | + | let $acc287088755 = procedLottery($acc187088755, $list87088755[1]) | |
244 | + | if (($size87088755 == 2)) | |
245 | + | then $acc287088755 | |
246 | + | else { | |
247 | + | let $acc387088755 = procedLottery($acc287088755, $list87088755[2]) | |
248 | + | if (($size87088755 == 3)) | |
249 | + | then $acc387088755 | |
250 | + | else { | |
251 | + | let $acc487088755 = procedLottery($acc387088755, $list87088755[3]) | |
252 | + | if (($size87088755 == 4)) | |
253 | + | then $acc487088755 | |
254 | + | else { | |
255 | + | let $acc587088755 = procedLottery($acc487088755, $list87088755[4]) | |
256 | + | if (($size87088755 == 5)) | |
257 | + | then $acc587088755 | |
258 | + | else { | |
259 | + | let $acc687088755 = procedLottery($acc587088755, $list87088755[5]) | |
260 | + | throw("List size exceed 5") | |
261 | + | } | |
262 | + | } | |
263 | + | } | |
264 | + | } | |
265 | + | } | |
266 | + | } | |
267 | + | } | |
268 | + | let sizeOfWinPrices = size(winningToken) | |
269 | + | if ((sizeOfWinPrices == 1)) | |
270 | + | then { | |
271 | + | let writeSets = WriteSet([DataEntry("message", "Better luck next time!")]) | |
272 | + | ScriptResult(writeSets, TransferSet(nil)) | |
273 | + | } | |
274 | + | else { | |
275 | + | let token = winningToken[0] | |
276 | + | let currentAmount = getIntegerValue(this, (token + lotteryamount)) | |
277 | + | if ((currentAmount == 0)) | |
278 | + | then throw("Amount exceeded") | |
279 | + | else { | |
280 | + | let actualAmount = (currentAmount - 1) | |
281 | + | let tokenPrice = getIntegerValue(this, (token + lotteryPrice)) | |
282 | + | let tokenAssetId = getStringValue(this, (token + lotteryAssetId)) | |
283 | + | if ((actualAmount == 0)) | |
284 | + | then { | |
285 | + | let storedTokensValues = { | |
286 | + | let $list98609910 = priceList | |
287 | + | let $size98609910 = size($list98609910) | |
288 | + | let $acc098609910 = token | |
289 | + | if (($size98609910 == 0)) | |
290 | + | then $acc098609910 | |
291 | + | else { | |
292 | + | let $acc198609910 = generateNewListOfPrices($acc098609910, $list98609910[0]) | |
293 | + | if (($size98609910 == 1)) | |
294 | + | then $acc198609910 | |
295 | + | else { | |
296 | + | let $acc298609910 = generateNewListOfPrices($acc198609910, $list98609910[1]) | |
297 | + | if (($size98609910 == 2)) | |
298 | + | then $acc298609910 | |
299 | + | else { | |
300 | + | let $acc398609910 = generateNewListOfPrices($acc298609910, $list98609910[2]) | |
301 | + | if (($size98609910 == 3)) | |
302 | + | then $acc398609910 | |
303 | + | else { | |
304 | + | let $acc498609910 = generateNewListOfPrices($acc398609910, $list98609910[3]) | |
305 | + | if (($size98609910 == 4)) | |
306 | + | then $acc498609910 | |
307 | + | else { | |
308 | + | let $acc598609910 = generateNewListOfPrices($acc498609910, $list98609910[4]) | |
309 | + | if (($size98609910 == 5)) | |
310 | + | then $acc598609910 | |
311 | + | else { | |
312 | + | let $acc698609910 = generateNewListOfPrices($acc598609910, $list98609910[5]) | |
313 | + | throw("List size exceed 5") | |
314 | + | } | |
315 | + | } | |
316 | + | } | |
317 | + | } | |
318 | + | } | |
319 | + | } | |
320 | + | } | |
321 | + | throw(((storedTokensValues + " :: ") + token)) | |
322 | + | } | |
323 | + | else { | |
324 | + | let storedTokensValues = { | |
325 | + | let $list1133611386 = priceList | |
326 | + | let $size1133611386 = size($list1133611386) | |
327 | + | let $acc01133611386 = token | |
328 | + | if (($size1133611386 == 0)) | |
329 | + | then $acc01133611386 | |
330 | + | else { | |
331 | + | let $acc11133611386 = generateNewListOfPrices($acc01133611386, $list1133611386[0]) | |
332 | + | if (($size1133611386 == 1)) | |
333 | + | then $acc11133611386 | |
334 | + | else { | |
335 | + | let $acc21133611386 = generateNewListOfPrices($acc11133611386, $list1133611386[1]) | |
336 | + | if (($size1133611386 == 2)) | |
337 | + | then $acc21133611386 | |
338 | + | else { | |
339 | + | let $acc31133611386 = generateNewListOfPrices($acc21133611386, $list1133611386[2]) | |
340 | + | if (($size1133611386 == 3)) | |
341 | + | then $acc31133611386 | |
342 | + | else { | |
343 | + | let $acc41133611386 = generateNewListOfPrices($acc31133611386, $list1133611386[3]) | |
344 | + | if (($size1133611386 == 4)) | |
345 | + | then $acc41133611386 | |
346 | + | else { | |
347 | + | let $acc51133611386 = generateNewListOfPrices($acc41133611386, $list1133611386[4]) | |
348 | + | if (($size1133611386 == 5)) | |
349 | + | then $acc51133611386 | |
350 | + | else { | |
351 | + | let $acc61133611386 = generateNewListOfPrices($acc51133611386, $list1133611386[5]) | |
352 | + | throw("List size exceed 5") | |
353 | + | } | |
354 | + | } | |
355 | + | } | |
356 | + | } | |
357 | + | } | |
358 | + | } | |
359 | + | } | |
360 | + | throw(((storedTokensValues + " :: ") + token)) | |
361 | + | } | |
362 | + | } | |
363 | + | } | |
364 | + | } | |
365 | + | ||
366 | + | ||
367 | + | @Verifier(tx) | |
368 | + | func verify () = match tx { | |
369 | + | case _ => | |
370 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
371 | + | } | |
372 | + |
github/deemru/w8io/026f985 29.67 ms ◑