tx · CEcxzuQg3aMx5QKiTiX1Guj6kD4pcE2D1EXJ676UznS2

3N54JoRXk5QW3xx9xDpxUpUkoDzriibARu1:  -0.01400000 Waves

2021.02.09 11:23 [1390398] smart account 3N54JoRXk5QW3xx9xDpxUpUkoDzriibARu1 > SELF 0.00000000 Waves

{ "type": 13, "id": "CEcxzuQg3aMx5QKiTiX1Guj6kD4pcE2D1EXJ676UznS2", "fee": 1400000, "feeAssetId": null, "timestamp": 1612859087273, "version": 2, "chainId": 84, "sender": "3N54JoRXk5QW3xx9xDpxUpUkoDzriibARu1", "senderPublicKey": "4ZSmQKKSEVi7FUZVartg8PJgDtovcTaKW3HWpdXKkjx2", "proofs": [ "KkAHgTre4wLryw27UX1LMiEQPzKAkEyS4d15veVSFHcwk2oP7HvrWJjrJ8xbMn43z1Jeuk9ZFKjUQrovCFbUCzy" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEAAAAAANbG90dGVyeWFtb3VudAIAAAAHX2Ftb3VudAAAAAASbG90dGVyeXByb2JhYmlsaXR5AgAAAAxfcHJvYmFiaWxpdHkAAAAAGWxvdHRlcnlwcm9iYWJpbGl0eWRlY2ltYWwCAAAAFF9wcm9iYWJpbGl0eV9kZWNpbWFsAAAAAAxsb3R0ZXJ5UHJpY2UCAAAABl9wcmljZQAAAAANbG90dGVyeVByaWNlcwIAAAAPX2xvdHRlcnlfcHJpY2VzAAAAAA5sb3R0ZXJ5QXNzZXRJZAIAAAARX2xvdHRlcnlfYXNzZXRfaWQAAAAADWNvdW50T2ZQcmljZXMCAAAADV9jb3VudF9wcmljZXMAAAAAFGxhc3RIYXNoUmFuZG9tTnVtYmVyAgAAABVsYXN0X3NwaW5fcmFuZG9tX2hhc2gAAAAAE2xhc3RUb2tlblJhbmRvbUhhc2gCAAAAFmxhc3RfdG9rZW5fcmFuZG9tX2hhc2gAAAAACmRBcHBBZGRyZXMCAAAALDNCS0ZRTGVvNUV4WjVZMXB0OUZ0enNubzdhU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VHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V57iJwtw==", "height": 1390398, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: E9YJtjBZG5Wzm8G7om317X6MNFGwfce6Fu2C64C6Mhnr Next: BA9xgHpouw6c5GPaAP2tRqW6uVswqqgXLgbishavfcMt Diff:
OldNewDifferences
289289 }
290290 }
291291 let sizeOfWinPrices = size(winningToken)
292- if ((sizeOfWinPrices == 1))
292+ if ((sizeOfWinPrices == 0))
293293 then {
294294 let writeSets = WriteSet(nil)
295295 ScriptResult(writeSets, TransferSet(nil))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let lotteryamount = "_amount"
55
66 let lotteryprobability = "_probability"
77
88 let lotteryprobabilitydecimal = "_probability_decimal"
99
1010 let lotteryPrice = "_price"
1111
1212 let lotteryPrices = "_lottery_prices"
1313
1414 let lotteryAssetId = "_lottery_asset_id"
1515
1616 let countOfPrices = "_count_prices"
1717
1818 let lastHashRandomNumber = "last_spin_random_hash"
1919
2020 let lastTokenRandomHash = "last_token_random_hash"
2121
2222 let dAppAddres = "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV"
2323
2424 let allowSizeLottery = 14
2525
2626 func randomizer (inv) = {
2727 let lastPlay = match getBinary(this, lastHashRandomNumber) {
2828 case s: ByteVector =>
2929 s
3030 case _: Unit =>
3131 base58'2ee4oFDYriWJ9EMeR'
3232 case _ =>
3333 throw("Match error")
3434 }
3535 let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
3636 sha256(rand)
3737 }
3838
3939
4040 func generatorRandomHash (inv) = {
4141 let lastHashForToken = match getBinary(this, lastTokenRandomHash) {
4242 case s: ByteVector =>
4343 s
4444 case _: Unit =>
4545 base58'4dD7osCQzvuXJdTiGfKvTwnKT'
4646 case _ =>
4747 throw("Match error")
4848 }
4949 let rand = (((((lastHashForToken + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
5050 sha256(rand)
5151 }
5252
5353
5454 func getPriceArray () = {
5555 let tempPrices = getStringValue(this, lotteryPrices)
5656 let trimPrices = take(tempPrices, (size(tempPrices) - 1))
5757 let newArray = split(trimPrices, ",")
5858 newArray
5959 }
6060
6161
6262 func generateNewListOfPrices (token,val) = {
6363 let indexOfComma = indexOf(token, ",")
6464 if ((indexOfComma == unit))
6565 then (val + ",")
6666 else ((token + val) + ",")
6767 }
6868
6969
7070 func procedLottery (win,token) = if (isDefined(token))
7171 then {
7272 let tokenProbability = getIntegerValue(this, (token + lotteryprobability))
7373 let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal))
7474 let probabilityValue = (tokenProbabilityDecimal * 1000)
7575 let hash = (tokenProbabilityDecimal % probabilityValue)
7676 let sizeOfWin = size(win)
7777 if ((sizeOfWin == 1))
7878 then {
7979 let randomNumber = win[0]
8080 if ((probabilityValue > hash))
8181 then {
8282 let newList = token :: win
8383 newList
8484 }
8585 else win
8686 }
8787 else win
8888 }
8989 else win
9090
9191
9292 @Callable(i)
9393 func updateprobability (probability,amount,poolprice,probDecimal,assetId) = {
9494 let token = toBase64String(generatorRandomHash(i))
9595 let paymentIsDefined = if (!(isDefined(i.payment)))
9696 then false
9797 else true
9898 let lotteryAssetTN = if ((assetId == ""))
9999 then true
100100 else false
101101 let totalRequiredAmount = (amount * poolprice)
102102 if ((paymentIsDefined == true))
103103 then {
104104 let payment = extract(i.payment)
105105 let paymentAssetId = match payment.assetId {
106106 case a: ByteVector =>
107107 toBase64String(a)
108108 case _: Unit =>
109109 ""
110110 case _ =>
111111 throw("Match error")
112112 }
113113 let paymentAmount = payment.amount
114114 if ((paymentAssetId != assetId))
115115 then throw("Asset Id not matching with Payment Asset Id")
116116 else if ((totalRequiredAmount > paymentAmount))
117117 then throw("Not enough Asset Amount")
118118 else {
119119 let tempValue = match getString(this, lotteryPrices) {
120120 case a: String =>
121121 a
122122 case _: Unit =>
123123 ""
124124 case _ =>
125125 throw("Match error")
126126 }
127127 let containKey = indexOf(tempValue, token)
128128 let storedTokensValues = match containKey {
129129 case _: Unit =>
130130 ((tempValue + token) + ",")
131131 case x: Int =>
132132 throw("Token is duplicated")
133133 case _ =>
134134 throw("Match error")
135135 }
136136 let countTokens = match getInteger(this, countOfPrices) {
137137 case a: Int =>
138138 a
139139 case _: Unit =>
140140 0
141141 case _ =>
142142 throw("Match error")
143143 }
144144 if ((allowSizeLottery > countTokens))
145145 then {
146146 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)])
147147 ScriptResult(updateLotteryPool, TransferSet(nil))
148148 }
149149 else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery)))
150150 }
151151 }
152152 else {
153153 let tnBalance = if (lotteryAssetTN)
154154 then wavesBalance(this)
155155 else assetBalance(this, fromBase64String(assetId))
156156 if ((totalRequiredAmount > tnBalance))
157157 then throw("Not enough Asset Amount")
158158 else {
159159 let tempValue = match getString(this, lotteryPrices) {
160160 case a: String =>
161161 a
162162 case _: Unit =>
163163 ""
164164 case _ =>
165165 throw("Match error")
166166 }
167167 let containKey = indexOf(tempValue, token)
168168 let storedTokensValues = match containKey {
169169 case _: Unit =>
170170 ((tempValue + token) + ",")
171171 case x: Int =>
172172 throw("Token is duplicated")
173173 case _ =>
174174 throw("Match error")
175175 }
176176 let countTokens = match getInteger(this, countOfPrices) {
177177 case a: Int =>
178178 a
179179 case _: Unit =>
180180 0
181181 case _ =>
182182 throw("Match error")
183183 }
184184 if ((allowSizeLottery >= countTokens))
185185 then {
186186 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)])
187187 ScriptResult(updateLotteryPool, TransferSet(nil))
188188 }
189189 else throw("Lottery prices has reached maximum 15")
190190 }
191191 }
192192 }
193193
194194
195195
196196 @Callable(i)
197197 func startlotto () = {
198198 let currentKey = toBase58String(i.caller.bytes)
199199 let randhash = randomizer(i)
200200 let countTokens = match getInteger(this, countOfPrices) {
201201 case a: Int =>
202202 a
203203 case _: Unit =>
204204 0
205205 case _ =>
206206 throw("Match error")
207207 }
208208 let priceList = getPriceArray()
209209 let randNumber = toInt(randhash)
210210 let winningToken = {
211211 let $list73937431 = priceList
212212 let $size73937431 = size($list73937431)
213213 let $acc073937431 = nil
214214 if (($size73937431 == 0))
215215 then $acc073937431
216216 else {
217217 let $acc173937431 = procedLottery($acc073937431, $list73937431[0])
218218 if (($size73937431 == 1))
219219 then $acc173937431
220220 else {
221221 let $acc273937431 = procedLottery($acc173937431, $list73937431[1])
222222 if (($size73937431 == 2))
223223 then $acc273937431
224224 else {
225225 let $acc373937431 = procedLottery($acc273937431, $list73937431[2])
226226 if (($size73937431 == 3))
227227 then $acc373937431
228228 else {
229229 let $acc473937431 = procedLottery($acc373937431, $list73937431[3])
230230 if (($size73937431 == 4))
231231 then $acc473937431
232232 else {
233233 let $acc573937431 = procedLottery($acc473937431, $list73937431[4])
234234 if (($size73937431 == 5))
235235 then $acc573937431
236236 else {
237237 let $acc673937431 = procedLottery($acc573937431, $list73937431[5])
238238 if (($size73937431 == 6))
239239 then $acc673937431
240240 else {
241241 let $acc773937431 = procedLottery($acc673937431, $list73937431[6])
242242 if (($size73937431 == 7))
243243 then $acc773937431
244244 else {
245245 let $acc873937431 = procedLottery($acc773937431, $list73937431[7])
246246 if (($size73937431 == 8))
247247 then $acc873937431
248248 else {
249249 let $acc973937431 = procedLottery($acc873937431, $list73937431[8])
250250 if (($size73937431 == 9))
251251 then $acc973937431
252252 else {
253253 let $acc1073937431 = procedLottery($acc973937431, $list73937431[9])
254254 if (($size73937431 == 10))
255255 then $acc1073937431
256256 else {
257257 let $acc1173937431 = procedLottery($acc1073937431, $list73937431[10])
258258 if (($size73937431 == 11))
259259 then $acc1173937431
260260 else {
261261 let $acc1273937431 = procedLottery($acc1173937431, $list73937431[11])
262262 if (($size73937431 == 12))
263263 then $acc1273937431
264264 else {
265265 let $acc1373937431 = procedLottery($acc1273937431, $list73937431[12])
266266 if (($size73937431 == 13))
267267 then $acc1373937431
268268 else {
269269 let $acc1473937431 = procedLottery($acc1373937431, $list73937431[13])
270270 if (($size73937431 == 14))
271271 then $acc1473937431
272272 else {
273273 let $acc1573937431 = procedLottery($acc1473937431, $list73937431[14])
274274 throw("List size exceed 14")
275275 }
276276 }
277277 }
278278 }
279279 }
280280 }
281281 }
282282 }
283283 }
284284 }
285285 }
286286 }
287287 }
288288 }
289289 }
290290 }
291291 let sizeOfWinPrices = size(winningToken)
292- if ((sizeOfWinPrices == 1))
292+ if ((sizeOfWinPrices == 0))
293293 then {
294294 let writeSets = WriteSet(nil)
295295 ScriptResult(writeSets, TransferSet(nil))
296296 }
297297 else {
298298 let token = winningToken[1]
299299 let currentAmount = getIntegerValue(this, (token + lotteryamount))
300300 if ((currentAmount == 0))
301301 then throw("Amount exceeded")
302302 else {
303303 let actualAmount = (currentAmount - 1)
304304 let tokenPrice = getIntegerValue(this, (token + lotteryPrice))
305305 let tokenAssetId = getStringValue(this, (token + lotteryAssetId))
306306 if ((actualAmount == 0))
307307 then {
308308 let storedTokensValues = {
309309 let $list82668317 = priceList
310310 let $size82668317 = size($list82668317)
311311 let $acc082668317 = token
312312 if (($size82668317 == 0))
313313 then $acc082668317
314314 else {
315315 let $acc182668317 = generateNewListOfPrices($acc082668317, $list82668317[0])
316316 if (($size82668317 == 1))
317317 then $acc182668317
318318 else {
319319 let $acc282668317 = generateNewListOfPrices($acc182668317, $list82668317[1])
320320 if (($size82668317 == 2))
321321 then $acc282668317
322322 else {
323323 let $acc382668317 = generateNewListOfPrices($acc282668317, $list82668317[2])
324324 if (($size82668317 == 3))
325325 then $acc382668317
326326 else {
327327 let $acc482668317 = generateNewListOfPrices($acc382668317, $list82668317[3])
328328 if (($size82668317 == 4))
329329 then $acc482668317
330330 else {
331331 let $acc582668317 = generateNewListOfPrices($acc482668317, $list82668317[4])
332332 if (($size82668317 == 5))
333333 then $acc582668317
334334 else {
335335 let $acc682668317 = generateNewListOfPrices($acc582668317, $list82668317[5])
336336 if (($size82668317 == 6))
337337 then $acc682668317
338338 else {
339339 let $acc782668317 = generateNewListOfPrices($acc682668317, $list82668317[6])
340340 if (($size82668317 == 7))
341341 then $acc782668317
342342 else {
343343 let $acc882668317 = generateNewListOfPrices($acc782668317, $list82668317[7])
344344 if (($size82668317 == 8))
345345 then $acc882668317
346346 else {
347347 let $acc982668317 = generateNewListOfPrices($acc882668317, $list82668317[8])
348348 if (($size82668317 == 9))
349349 then $acc982668317
350350 else {
351351 let $acc1082668317 = generateNewListOfPrices($acc982668317, $list82668317[9])
352352 if (($size82668317 == 10))
353353 then $acc1082668317
354354 else {
355355 let $acc1182668317 = generateNewListOfPrices($acc1082668317, $list82668317[10])
356356 if (($size82668317 == 11))
357357 then $acc1182668317
358358 else {
359359 let $acc1282668317 = generateNewListOfPrices($acc1182668317, $list82668317[11])
360360 if (($size82668317 == 12))
361361 then $acc1282668317
362362 else {
363363 let $acc1382668317 = generateNewListOfPrices($acc1282668317, $list82668317[12])
364364 if (($size82668317 == 13))
365365 then $acc1382668317
366366 else {
367367 let $acc1482668317 = generateNewListOfPrices($acc1382668317, $list82668317[13])
368368 if (($size82668317 == 14))
369369 then $acc1482668317
370370 else {
371371 let $acc1582668317 = generateNewListOfPrices($acc1482668317, $list82668317[14])
372372 throw("List size exceed 14")
373373 }
374374 }
375375 }
376376 }
377377 }
378378 }
379379 }
380380 }
381381 }
382382 }
383383 }
384384 }
385385 }
386386 }
387387 }
388388 }
389389 let writeSets = WriteSet([DataEntry(("winning_token_" + token), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry(countOfPrices, (countTokens - 1)), DataEntry(lotteryPrices, storedTokensValues), DataEntry(lastHashRandomNumber, randNumber)])
390390 if ((tokenAssetId == ""))
391391 then {
392392 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
393393 ScriptResult(writeSets, winTransfer)
394394 }
395395 else {
396396 let actualAssetId = fromBase64String(tokenAssetId)
397397 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, actualAssetId)])
398398 ScriptResult(writeSets, winTransfer)
399399 }
400400 }
401401 else {
402402 let writeSets = WriteSet([DataEntry((currentKey + "_winning_token_"), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry((token + lotteryamount), actualAmount), DataEntry(lastHashRandomNumber, randNumber)])
403403 if ((tokenAssetId == ""))
404404 then {
405405 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
406406 ScriptResult(writeSets, winTransfer)
407407 }
408408 else {
409409 let actualAssetId = fromBase64String(tokenAssetId)
410410 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, actualAssetId)])
411411 ScriptResult(writeSets, winTransfer)
412412 }
413413 }
414414 }
415415 }
416416 }
417417
418418
419419 @Verifier(tx)
420420 func verify () = match tx {
421421 case _: DataTransaction =>
422422 true
423423 case _: SetScriptTransaction =>
424424 true
425425 case _ =>
426426 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
427427 }
428428

github/deemru/w8io/169f3d6 
60.76 ms