tx · 4yLMeuyAKdxM6saKsTQpVddYmJAVyHvPFi1ktCcAWZBk

3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b:  -0.01400000 Waves

2021.02.09 10:53 [1390370] smart account 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b > SELF 0.00000000 Waves

{ "type": 13, "id": "4yLMeuyAKdxM6saKsTQpVddYmJAVyHvPFi1ktCcAWZBk", "fee": 1400000, "feeAssetId": null, "timestamp": 1612857291486, "version": 2, "chainId": 84, "sender": "3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b", "senderPublicKey": "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV", "proofs": [ "3WBtdcXdxg515bwUpPTZVTHHdgjuHwGBgkrBpt3MUpQa9napuuSgdKabkTcZnek6Vy2CGzyf5JzbypFidAXL3Uvu" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEAAAAAANbG90dGVyeWFtb3VudAIAAAAHX2Ftb3VudAAAAAASbG90dGVyeXByb2JhYmlsaXR5AgAAAAxfcHJvYmFiaWxpdHkAAAAAGWxvdHRlcnlwcm9iYWJpbGl0eWRlY2ltYWwCAAAAFF9wcm9iYWJpbGl0eV9kZWNpbWFsAAAAAAxsb3R0ZXJ5UHJpY2UCAAAABl9wcmljZQAAAAANbG90dGVyeVByaWNlcwIAAAAPX2xvdHRlcnlfcHJpY2VzAAAAAA5sb3R0ZXJ5QXNzZXRJZAIAAAARX2xvdHRlcnlfYXNzZXRfaWQAAAAADWNvdW50T2ZQcmljZXMCAAAADV9jb3VudF9wcmljZXMAAAAAFGxhc3RIYXNoUmFuZG9tTnVtYmVyAgAAABVsYXN0X3NwaW5fcmFuZG9tX2hhc2gAAAAAE2xhc3RUb2tlblJhbmRvbUhhc2gCAAAAFmxhc3RfdG9rZW5fcmFuZG9tX2hhc2gAAAAACmRBcHBBZGRyZXMCAAAALDNCS0ZRTGVvNUV4WjVZMXB0OUZ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FgYqX", "height": 1390370, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: EY2chYmDhjCb4LEzpoZ2bVx1mjftDWb8jgo9McAZA99A Next: none 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) = {
7171 let tokenProbability = getIntegerValue(this, (token + lotteryprobability))
7272 let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal))
7373 let probabilityValue = (tokenProbabilityDecimal * 1000)
7474 let hash = (tokenProbabilityDecimal % probabilityValue)
7575 let sizeOfWin = size(win)
7676 if ((sizeOfWin == 1))
7777 then {
7878 let randomNumber = win[0]
7979 if ((probabilityValue > hash))
8080 then {
8181 let newList = token :: win
8282 newList
8383 }
8484 else win
8585 }
8686 else win
8787 }
8888
8989
9090 @Callable(i)
9191 func updateprobability (probability,amount,poolprice,probDecimal,assetId) = {
9292 let token = toBase64String(generatorRandomHash(i))
9393 let paymentIsDefined = if (!(isDefined(i.payment)))
9494 then false
9595 else true
9696 let lotteryAssetTN = if ((assetId == ""))
9797 then true
9898 else false
9999 let totalRequiredAmount = (amount * poolprice)
100100 if ((paymentIsDefined == true))
101101 then {
102102 let payment = extract(i.payment)
103103 let paymentAssetId = match payment.assetId {
104104 case a: ByteVector =>
105105 toBase64String(a)
106106 case _: Unit =>
107107 ""
108108 case _ =>
109109 throw("Match error")
110110 }
111111 let paymentAmount = payment.amount
112112 if ((paymentAssetId != assetId))
113113 then throw("Asset Id not matching with Payment Asset Id")
114114 else if ((totalRequiredAmount > paymentAmount))
115115 then throw("Not enough Asset Amount")
116116 else {
117117 let tempValue = match getString(this, lotteryPrices) {
118118 case a: String =>
119119 a
120120 case _: Unit =>
121121 ""
122122 case _ =>
123123 throw("Match error")
124124 }
125125 let containKey = indexOf(tempValue, token)
126126 let storedTokensValues = match containKey {
127127 case _: Unit =>
128128 ((tempValue + token) + ",")
129129 case x: Int =>
130130 throw("Token is duplicated")
131131 case _ =>
132132 throw("Match error")
133133 }
134134 let countTokens = match getInteger(this, countOfPrices) {
135135 case a: Int =>
136136 a
137137 case _: Unit =>
138138 0
139139 case _ =>
140140 throw("Match error")
141141 }
142142 if ((allowSizeLottery >= countTokens))
143143 then {
144144 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)])
145145 ScriptResult(updateLotteryPool, TransferSet(nil))
146146 }
147147 else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery)))
148148 }
149149 }
150150 else {
151151 let tnBalance = if (lotteryAssetTN)
152152 then wavesBalance(this)
153153 else assetBalance(this, fromBase64String(assetId))
154154 if ((totalRequiredAmount > tnBalance))
155155 then throw("Not enough Asset Amount")
156156 else {
157157 let tempValue = match getString(this, lotteryPrices) {
158158 case a: String =>
159159 a
160160 case _: Unit =>
161161 ""
162162 case _ =>
163163 throw("Match error")
164164 }
165165 let containKey = indexOf(tempValue, token)
166166 let storedTokensValues = match containKey {
167167 case _: Unit =>
168168 ((tempValue + token) + ",")
169169 case x: Int =>
170170 throw("Token is duplicated")
171171 case _ =>
172172 throw("Match error")
173173 }
174174 let countTokens = match getInteger(this, countOfPrices) {
175175 case a: Int =>
176176 a
177177 case _: Unit =>
178178 0
179179 case _ =>
180180 throw("Match error")
181181 }
182182 if ((allowSizeLottery >= countTokens))
183183 then {
184184 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)])
185185 ScriptResult(updateLotteryPool, TransferSet(nil))
186186 }
187187 else throw("Lottery prices has reached maximum 15")
188188 }
189189 }
190190 }
191191
192192
193193
194194 @Callable(i)
195195 func startlotto () = {
196196 let currentKey = toBase58String(i.caller.bytes)
197197 let randhash = randomizer(i)
198198 let countTokens = match getInteger(this, countOfPrices) {
199199 case a: Int =>
200200 a
201201 case _: Unit =>
202202 0
203203 case _ =>
204204 throw("Match error")
205205 }
206206 let priceList = getPriceArray()
207207 let randNumber = toInt(randhash)
208208 let winningToken = {
209209 let $list72517289 = priceList
210210 let $size72517289 = size($list72517289)
211211 let $acc072517289 = nil
212212 if (($size72517289 == 0))
213213 then $acc072517289
214214 else {
215215 let $acc172517289 = procedLottery($acc072517289, $list72517289[0])
216216 if (($size72517289 == 1))
217217 then $acc172517289
218218 else {
219219 let $acc272517289 = procedLottery($acc172517289, $list72517289[1])
220220 if (($size72517289 == 2))
221221 then $acc272517289
222222 else {
223223 let $acc372517289 = procedLottery($acc272517289, $list72517289[2])
224224 if (($size72517289 == 3))
225225 then $acc372517289
226226 else {
227227 let $acc472517289 = procedLottery($acc372517289, $list72517289[3])
228228 if (($size72517289 == 4))
229229 then $acc472517289
230230 else {
231231 let $acc572517289 = procedLottery($acc472517289, $list72517289[4])
232232 if (($size72517289 == 5))
233233 then $acc572517289
234234 else {
235235 let $acc672517289 = procedLottery($acc572517289, $list72517289[5])
236236 if (($size72517289 == 6))
237237 then $acc672517289
238238 else {
239239 let $acc772517289 = procedLottery($acc672517289, $list72517289[6])
240240 if (($size72517289 == 7))
241241 then $acc772517289
242242 else {
243243 let $acc872517289 = procedLottery($acc772517289, $list72517289[7])
244244 if (($size72517289 == 8))
245245 then $acc872517289
246246 else {
247247 let $acc972517289 = procedLottery($acc872517289, $list72517289[8])
248248 if (($size72517289 == 9))
249249 then $acc972517289
250250 else {
251251 let $acc1072517289 = procedLottery($acc972517289, $list72517289[9])
252252 if (($size72517289 == 10))
253253 then $acc1072517289
254254 else {
255255 let $acc1172517289 = procedLottery($acc1072517289, $list72517289[10])
256256 if (($size72517289 == 11))
257257 then $acc1172517289
258258 else {
259259 let $acc1272517289 = procedLottery($acc1172517289, $list72517289[11])
260260 if (($size72517289 == 12))
261261 then $acc1272517289
262262 else {
263263 let $acc1372517289 = procedLottery($acc1272517289, $list72517289[12])
264264 if (($size72517289 == 13))
265265 then $acc1372517289
266266 else {
267267 let $acc1472517289 = procedLottery($acc1372517289, $list72517289[13])
268268 if (($size72517289 == 14))
269269 then $acc1472517289
270270 else {
271271 let $acc1572517289 = procedLottery($acc1472517289, $list72517289[14])
272272 throw("List size exceed 14")
273273 }
274274 }
275275 }
276276 }
277277 }
278278 }
279279 }
280280 }
281281 }
282282 }
283283 }
284284 }
285285 }
286286 }
287287 }
288288 }
289289 let sizeOfWinPrices = size(winningToken)
290290 if ((sizeOfWinPrices == 1))
291291 then {
292292 let writeSets = WriteSet(nil)
293293 ScriptResult(writeSets, TransferSet(nil))
294294 }
295295 else {
296296 let token = winningToken[1]
297297 let currentAmount = getIntegerValue(this, (token + lotteryamount))
298298 if ((currentAmount == 0))
299299 then throw("Amount exceeded")
300300 else {
301301 let actualAmount = (currentAmount - 1)
302302 let tokenPrice = getIntegerValue(this, (token + lotteryPrice))
303303 let tokenAssetId = getStringValue(this, (token + lotteryAssetId))
304304 if ((actualAmount == 0))
305305 then {
306306 let storedTokensValues = {
307307 let $list81098160 = priceList
308308 let $size81098160 = size($list81098160)
309309 let $acc081098160 = token
310310 if (($size81098160 == 0))
311311 then $acc081098160
312312 else {
313313 let $acc181098160 = generateNewListOfPrices($acc081098160, $list81098160[0])
314314 if (($size81098160 == 1))
315315 then $acc181098160
316316 else {
317317 let $acc281098160 = generateNewListOfPrices($acc181098160, $list81098160[1])
318318 if (($size81098160 == 2))
319319 then $acc281098160
320320 else {
321321 let $acc381098160 = generateNewListOfPrices($acc281098160, $list81098160[2])
322322 if (($size81098160 == 3))
323323 then $acc381098160
324324 else {
325325 let $acc481098160 = generateNewListOfPrices($acc381098160, $list81098160[3])
326326 if (($size81098160 == 4))
327327 then $acc481098160
328328 else {
329329 let $acc581098160 = generateNewListOfPrices($acc481098160, $list81098160[4])
330330 if (($size81098160 == 5))
331331 then $acc581098160
332332 else {
333333 let $acc681098160 = generateNewListOfPrices($acc581098160, $list81098160[5])
334334 if (($size81098160 == 6))
335335 then $acc681098160
336336 else {
337337 let $acc781098160 = generateNewListOfPrices($acc681098160, $list81098160[6])
338338 if (($size81098160 == 7))
339339 then $acc781098160
340340 else {
341341 let $acc881098160 = generateNewListOfPrices($acc781098160, $list81098160[7])
342342 if (($size81098160 == 8))
343343 then $acc881098160
344344 else {
345345 let $acc981098160 = generateNewListOfPrices($acc881098160, $list81098160[8])
346346 if (($size81098160 == 9))
347347 then $acc981098160
348348 else {
349349 let $acc1081098160 = generateNewListOfPrices($acc981098160, $list81098160[9])
350350 if (($size81098160 == 10))
351351 then $acc1081098160
352352 else {
353353 let $acc1181098160 = generateNewListOfPrices($acc1081098160, $list81098160[10])
354354 if (($size81098160 == 11))
355355 then $acc1181098160
356356 else {
357357 let $acc1281098160 = generateNewListOfPrices($acc1181098160, $list81098160[11])
358358 if (($size81098160 == 12))
359359 then $acc1281098160
360360 else {
361361 let $acc1381098160 = generateNewListOfPrices($acc1281098160, $list81098160[12])
362362 if (($size81098160 == 13))
363363 then $acc1381098160
364364 else {
365365 let $acc1481098160 = generateNewListOfPrices($acc1381098160, $list81098160[13])
366366 if (($size81098160 == 14))
367367 then $acc1481098160
368368 else {
369369 let $acc1581098160 = generateNewListOfPrices($acc1481098160, $list81098160[14])
370370 throw("List size exceed 14")
371371 }
372372 }
373373 }
374374 }
375375 }
376376 }
377377 }
378378 }
379379 }
380380 }
381381 }
382382 }
383383 }
384384 }
385385 }
386386 }
387387 let writeSets = WriteSet([DataEntry(("winning_token_" + token), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry(countOfPrices, (countTokens - 1)), DataEntry(lotteryPrices, storedTokensValues), DataEntry(lastHashRandomNumber, randNumber)])
388388 if ((tokenAssetId == ""))
389389 then {
390390 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
391391 ScriptResult(writeSets, winTransfer)
392392 }
393393 else {
394394 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
395395 ScriptResult(writeSets, winTransfer)
396396 }
397397 }
398398 else {
399399 let writeSets = WriteSet([DataEntry((currentKey + "_winning_token_"), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry((token + lotteryamount), actualAmount), DataEntry(lastHashRandomNumber, randNumber)])
400400 if ((tokenAssetId == ""))
401401 then {
402402 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
403403 ScriptResult(writeSets, winTransfer)
404404 }
405405 else {
406406 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
407407 ScriptResult(writeSets, winTransfer)
408408 }
409409 }
410410 }
411411 }
412412 }
413413
414414
415415 @Verifier(tx)
416416 func verify () = match tx {
417417 case _: DataTransaction =>
418418 true
419419 case _: SetScriptTransaction =>
420420 true
421421 case _ =>
422422 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
423423 }
424424

github/deemru/w8io/026f985 
63.86 ms