tx · Hnu8oHffJWW7njZPaUm6bNXFpF6BFTThy8oTWg63Gyww

3N54JoRXk5QW3xx9xDpxUpUkoDzriibARu1:  -0.01400000 Waves

2021.02.09 15:07 [1390632] smart account 3N54JoRXk5QW3xx9xDpxUpUkoDzriibARu1 > SELF 0.00000000 Waves

{ "type": 13, "id": "Hnu8oHffJWW7njZPaUm6bNXFpF6BFTThy8oTWg63Gyww", "fee": 1400000, "feeAssetId": null, "timestamp": 1612872513352, "version": 2, "chainId": 84, "sender": "3N54JoRXk5QW3xx9xDpxUpUkoDzriibARu1", "senderPublicKey": "4ZSmQKKSEVi7FUZVartg8PJgDtovcTaKW3HWpdXKkjx2", "proofs": [ "5Mg7VvBp9Rr6GQRPTr9BLDd9BpMk5fuTq2xq7N45qQSBZSFv25TbkRFabSmeNVQYSKxFiPCHt5A7xtUezcXYVBBJ" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEAAAAAANbG90dGVyeWFtb3VudAIAAAAHX2Ftb3VudAAAAAASbG90dGVyeXByb2JhYmlsaXR5AgAAAAxfcHJvYmFiaWxpdHkAAAAAGWxvdHRlcnlwcm9iYWJpbGl0eWRlY2ltYWwCAAAAFF9wcm9iYWJpbGl0eV9kZWNpbWFsAAAAAAxsb3R0ZXJ5UHJpY2UCAAAABl9wcmljZQAAAAANbG90dGVyeVByaWNlcwIAAAAPX2xvdHRlcnlfcHJpY2VzAAAAAA5sb3R0ZXJ5QXNzZXRJZAIAAAARX2xvdHRlcnlfYXNzZXRfaWQAAAAADWNvdW50T2ZQcmljZXMCAAAADV9jb3VudF9wcmljZXMAAAAAFGxhc3RIYXNoUmFuZG9tTnVtYmVyAgAAABVsYXN0X3NwaW5fcmFuZG9tX2hhc2gAAAAAE2xhc3RUb2tlblJhbmRvbUhhc2gCAAAAFmxhc3RfdG9rZW5fcmFuZG9tX2hhc2gAAAAACmRBcHBBZGRyZXMCAAAALDNCS0ZRTGVvNUV4WjVZMXB0OUZ0enNubzd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AAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAACnRva2VuUHJpY2UFAAAADWFjdHVhbEFzc2V0SWQFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAACXdyaXRlU2V0cwUAAAALd2luVHJhbnNmZXIAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPRGF0YVRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAUU2V0U2NyaXB0VHJhbnNhY3Rpb24GCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQiRZYw=", "height": 1390632, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CvCaZEzJpiktem6nrsv2CX1mkkQcsJCh8BDR1aGvbF91 Next: 31bjaN1YfGZPDNYwMk5LS453WySmxRiNfZFT9TirEvzp 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 = 5
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 probCompare = (tokenProbabilityDecimal % probabilityValue)
7676 let sizeOfWin = size(win)
7777 if ((sizeOfWin == 1))
7878 then {
7979 let randomNumber = win[1]
8080 let comp = toInt(fromBase64String(randomNumber))
8181 if ((probCompare > comp))
8282 then {
8383 let newList = token :: win
8484 newList
8585 }
8686 else win
8787 }
8888 else win
8989 }
9090 else win
9191
9292
9393 @Callable(i)
9494 func updateprobability (probability,amount,poolprice,probDecimal,assetId) = {
9595 let token = toBase64String(generatorRandomHash(i))
9696 let paymentIsDefined = if (!(isDefined(i.payment)))
9797 then false
9898 else true
9999 let lotteryAssetTN = if ((assetId == ""))
100100 then true
101101 else false
102102 let totalRequiredAmount = (amount * poolprice)
103103 if ((paymentIsDefined == true))
104104 then {
105105 let payment = extract(i.payment)
106106 let paymentAssetId = match payment.assetId {
107107 case a: ByteVector =>
108108 toBase64String(a)
109109 case _: Unit =>
110110 ""
111111 case _ =>
112112 throw("Match error")
113113 }
114114 let paymentAmount = payment.amount
115115 if ((paymentAssetId != assetId))
116116 then throw("Asset Id not matching with Payment Asset Id")
117117 else if ((totalRequiredAmount > paymentAmount))
118118 then throw("Not enough Asset Amount")
119119 else {
120120 let tempValue = match getString(this, lotteryPrices) {
121121 case a: String =>
122122 a
123123 case _: Unit =>
124124 ""
125125 case _ =>
126126 throw("Match error")
127127 }
128128 let containKey = indexOf(tempValue, token)
129129 let storedTokensValues = match containKey {
130130 case _: Unit =>
131131 ((tempValue + token) + ",")
132132 case x: Int =>
133133 throw("Token is duplicated")
134134 case _ =>
135135 throw("Match error")
136136 }
137137 let countTokens = match getInteger(this, countOfPrices) {
138138 case a: Int =>
139139 a
140140 case _: Unit =>
141141 0
142142 case _ =>
143143 throw("Match error")
144144 }
145145 if ((allowSizeLottery > countTokens))
146146 then {
147147 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)])
148148 ScriptResult(updateLotteryPool, TransferSet(nil))
149149 }
150150 else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery)))
151151 }
152152 }
153153 else {
154154 let tnBalance = if (lotteryAssetTN)
155155 then wavesBalance(this)
156156 else assetBalance(this, fromBase64String(assetId))
157157 if ((totalRequiredAmount > tnBalance))
158158 then throw("Not enough Asset Amount")
159159 else {
160160 let tempValue = match getString(this, lotteryPrices) {
161161 case a: String =>
162162 a
163163 case _: Unit =>
164164 ""
165165 case _ =>
166166 throw("Match error")
167167 }
168168 let containKey = indexOf(tempValue, token)
169169 let storedTokensValues = match containKey {
170170 case _: Unit =>
171171 ((tempValue + token) + ",")
172172 case x: Int =>
173173 throw("Token is duplicated")
174174 case _ =>
175175 throw("Match error")
176176 }
177177 let countTokens = match getInteger(this, countOfPrices) {
178178 case a: Int =>
179179 a
180180 case _: Unit =>
181181 0
182182 case _ =>
183183 throw("Match error")
184184 }
185185 if ((allowSizeLottery >= countTokens))
186186 then {
187187 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)])
188188 ScriptResult(updateLotteryPool, TransferSet(nil))
189189 }
190190 else throw("Lottery prices has reached maximum 15")
191191 }
192192 }
193193 }
194194
195195
196196
197197 @Callable(i)
198198 func startlotto () = {
199199 let currentKey = toBase58String(i.caller.bytes)
200200 let randhash = randomizer(i)
201201 let countTokens = match getInteger(this, countOfPrices) {
202202 case a: Int =>
203203 a
204204 case _: Unit =>
205205 0
206206 case _ =>
207207 throw("Match error")
208208 }
209209 let priceList = getPriceArray()
210210 let randNumber = toInt(randhash)
211211 let winningToken = {
212212 let $list74687527 = priceList
213213 let $size74687527 = size($list74687527)
214214 let $acc074687527 = [toString(randNumber)]
215215 if (($size74687527 == 0))
216216 then $acc074687527
217217 else {
218218 let $acc174687527 = procedLottery($acc074687527, $list74687527[0])
219219 if (($size74687527 == 1))
220220 then $acc174687527
221221 else {
222222 let $acc274687527 = procedLottery($acc174687527, $list74687527[1])
223223 if (($size74687527 == 2))
224224 then $acc274687527
225225 else {
226226 let $acc374687527 = procedLottery($acc274687527, $list74687527[2])
227227 if (($size74687527 == 3))
228228 then $acc374687527
229229 else {
230230 let $acc474687527 = procedLottery($acc374687527, $list74687527[3])
231231 if (($size74687527 == 4))
232232 then $acc474687527
233233 else {
234234 let $acc574687527 = procedLottery($acc474687527, $list74687527[4])
235235 if (($size74687527 == 5))
236236 then $acc574687527
237237 else {
238238 let $acc674687527 = procedLottery($acc574687527, $list74687527[5])
239239 if (($size74687527 == 6))
240240 then $acc674687527
241241 else {
242242 let $acc774687527 = procedLottery($acc674687527, $list74687527[6])
243243 if (($size74687527 == 7))
244244 then $acc774687527
245245 else {
246246 let $acc874687527 = procedLottery($acc774687527, $list74687527[7])
247247 if (($size74687527 == 8))
248248 then $acc874687527
249249 else {
250250 let $acc974687527 = procedLottery($acc874687527, $list74687527[8])
251251 if (($size74687527 == 9))
252252 then $acc974687527
253253 else {
254254 let $acc1074687527 = procedLottery($acc974687527, $list74687527[9])
255255 if (($size74687527 == 10))
256256 then $acc1074687527
257257 else {
258258 let $acc1174687527 = procedLottery($acc1074687527, $list74687527[10])
259259 if (($size74687527 == 11))
260260 then $acc1174687527
261261 else {
262262 let $acc1274687527 = procedLottery($acc1174687527, $list74687527[11])
263263 if (($size74687527 == 12))
264264 then $acc1274687527
265265 else {
266266 let $acc1374687527 = procedLottery($acc1274687527, $list74687527[12])
267267 if (($size74687527 == 13))
268268 then $acc1374687527
269269 else {
270270 let $acc1474687527 = procedLottery($acc1374687527, $list74687527[13])
271271 if (($size74687527 == 14))
272272 then $acc1474687527
273273 else {
274274 let $acc1574687527 = procedLottery($acc1474687527, $list74687527[14])
275275 throw("List size exceed 14")
276276 }
277277 }
278278 }
279279 }
280280 }
281281 }
282282 }
283283 }
284284 }
285285 }
286286 }
287287 }
288288 }
289289 }
290290 }
291291 }
292292 let sizeOfWinPrices = size(winningToken)
293293 if ((sizeOfWinPrices == 0))
294294 then {
295295 let writeSets = WriteSet(nil)
296296 ScriptResult(writeSets, TransferSet(nil))
297297 }
298298 else {
299299 let token = winningToken[1]
300300 let currentAmount = getIntegerValue(this, (token + lotteryamount))
301301 if ((currentAmount == 0))
302302 then throw("Amount exceeded")
303303 else {
304304 let actualAmount = -(1)
305305 let tokenPrice = getIntegerValue(this, (token + lotteryPrice))
306306 let tokenAssetId = getStringValue(this, (token + lotteryAssetId))
307307 if ((actualAmount == 0))
308308 then {
309309 let storedTokensValues = {
310310 let $list83488398 = priceList
311311 let $size83488398 = size($list83488398)
312312 let $acc083488398 = token
313313 if (($size83488398 == 0))
314314 then $acc083488398
315315 else {
316316 let $acc183488398 = generateNewListOfPrices($acc083488398, $list83488398[0])
317317 if (($size83488398 == 1))
318318 then $acc183488398
319319 else {
320320 let $acc283488398 = generateNewListOfPrices($acc183488398, $list83488398[1])
321321 if (($size83488398 == 2))
322322 then $acc283488398
323323 else {
324324 let $acc383488398 = generateNewListOfPrices($acc283488398, $list83488398[2])
325325 if (($size83488398 == 3))
326326 then $acc383488398
327327 else {
328328 let $acc483488398 = generateNewListOfPrices($acc383488398, $list83488398[3])
329329 if (($size83488398 == 4))
330330 then $acc483488398
331331 else {
332332 let $acc583488398 = generateNewListOfPrices($acc483488398, $list83488398[4])
333333 if (($size83488398 == 5))
334334 then $acc583488398
335335 else {
336336 let $acc683488398 = generateNewListOfPrices($acc583488398, $list83488398[5])
337337 throw("List size exceed 5")
338338 }
339339 }
340340 }
341341 }
342342 }
343343 }
344344 }
345345 let writeSets = WriteSet([DataEntry(("winning_token_" + token), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry(countOfPrices, (countTokens - 1)), DataEntry(lotteryPrices, storedTokensValues), DataEntry(lastHashRandomNumber, randNumber)])
346346 if ((tokenAssetId == ""))
347347 then {
348348 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
349349 ScriptResult(writeSets, winTransfer)
350350 }
351351 else {
352352 let actualAssetId = fromBase64String(tokenAssetId)
353353 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, actualAssetId)])
354354 ScriptResult(writeSets, winTransfer)
355355 }
356356 }
357357 else {
358358 let writeSets = WriteSet([DataEntry((currentKey + "_winning_token_"), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry((token + lotteryamount), actualAmount), DataEntry(lastHashRandomNumber, randNumber)])
359359 if ((tokenAssetId == ""))
360360 then {
361361 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)])
362362 ScriptResult(writeSets, winTransfer)
363363 }
364364 else {
365365 let actualAssetId = fromBase64String(tokenAssetId)
366366 let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, actualAssetId)])
367367 ScriptResult(writeSets, winTransfer)
368368 }
369369 }
370370 }
371371 }
372372 }
373373
374374
375375 @Verifier(tx)
376376 func verify () = match tx {
377377 case _: DataTransaction =>
378378 true
379379 case _: SetScriptTransaction =>
380380 true
381381 case _ =>
382382 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
383383 }
384384

github/deemru/w8io/169f3d6 
64.66 ms