tx · DGg8hPuy1PRYd9GfUibtiWupgatE9QQDchaf2CMaVQDj 3Mye5M9KfeoHfWNZtWk5gXe3DJiWD1Wgps3: -0.01500000 Waves 2021.02.09 16:45 [1390734] smart account 3Mye5M9KfeoHfWNZtWk5gXe3DJiWD1Wgps3 > SELF 0.00000000 Waves
{ "type": 13, "id": "DGg8hPuy1PRYd9GfUibtiWupgatE9QQDchaf2CMaVQDj", "fee": 1500000, "feeAssetId": null, "timestamp": 1612878370834, "version": 2, "chainId": 84, "sender": "3Mye5M9KfeoHfWNZtWk5gXe3DJiWD1Wgps3", "senderPublicKey": "Crax6jGgWtQYaBaDSjijPf7hNdS2UMdZAmmtrdXqGE4x", "proofs": [ "4zZoDnKExqQrb8hmtWJWF7YV3hLQWzbzoCuLgGJ6FsJgX2KjBi2W45rXvRkDYnSHNCSZcchbNZZgKyiocwXmf5vE" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEAAAAAANbG90dGVyeWFtb3VudAIAAAAHX2Ftb3VudAAAAAASbG90dGVyeXByb2JhYmlsaXR5AgAAAAxfcHJvYmFiaWxpdHkAAAAAGWxvdHRlcnlwcm9iYWJpbGl0eWRlY2ltYWwCAAAAFF9wcm9iYWJpbGl0eV9kZWNpbWFsAAAAAAxsb3R0ZXJ5UHJpY2UCAAAABl9wcmljZQAAAAANbG90dGVyeVByaWNlcwIAAAAPX2xvdHRlcnlfcHJpY2VzAAAAAA5sb3R0ZXJ5QXNzZXRJZAIAAAARX2xvdHRlcnlfYXNzZXRfaWQAAAAADWNvdW50T2ZQcmljZXMCAAAADV9jb3VudF9wcmljZXMAAAAAFGxhc3RIYXNoUmFuZG9tTnVtYmVyAgAAABVsYXN0X3NwaW5fcmFuZG9tX2hhc2gAAAAAE2xhc3RUb2tlblJhbmRvbUhhc2gCAAAAFmxhc3RfdG9rZW5fcmFuZG9tX2hhc2gAAAAACmRBcHBBZGRyZXMCAAAALDNCS0ZRTGVvNUV4WjVZMXB0OUZ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lclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAp0b2tlblByaWNlBQAAAAR1bml0BQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAl3cml0ZVNldHMFAAAAC3dpblRyYW5zZmVyBAAAAA1hY3R1YWxBc3NldElkCQACWwAAAAEFAAAADHRva2VuQXNzZXRJZAQAAAALd2luVHJhbnNmZXIJAQAAAAtUcmFuc2ZlclNldAAAAAEJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwgFAAAAAWkAAAAGY2FsbGVyBQAAAAp0b2tlblByaWNlBQAAAA1hY3R1YWxBc3NldElkBQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAl3cml0ZVNldHMFAAAAC3dpblRyYW5zZmVyAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXleVVl6", "height": 1390734, "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 lotteryamount = "_amount" | |
5 | + | ||
6 | + | let lotteryprobability = "_probability" | |
7 | + | ||
8 | + | let lotteryprobabilitydecimal = "_probability_decimal" | |
9 | + | ||
10 | + | let lotteryPrice = "_price" | |
11 | + | ||
12 | + | let lotteryPrices = "_lottery_prices" | |
13 | + | ||
14 | + | let lotteryAssetId = "_lottery_asset_id" | |
15 | + | ||
16 | + | let countOfPrices = "_count_prices" | |
17 | + | ||
18 | + | let lastHashRandomNumber = "last_spin_random_hash" | |
19 | + | ||
20 | + | let lastTokenRandomHash = "last_token_random_hash" | |
21 | + | ||
22 | + | let dAppAddres = "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV" | |
23 | + | ||
24 | + | let allowSizeLottery = 5 | |
25 | + | ||
26 | + | func randomizer (inv) = { | |
27 | + | let lastPlay = match getBinary(this, lastHashRandomNumber) { | |
28 | + | case s: ByteVector => | |
29 | + | s | |
30 | + | case _: Unit => | |
31 | + | base58'2ee4oFDYriWJ9EMeR' | |
32 | + | case _ => | |
33 | + | throw("Match error") | |
34 | + | } | |
35 | + | let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
36 | + | sha256(rand) | |
37 | + | } | |
38 | + | ||
39 | + | ||
40 | + | func generatorRandomHash (inv) = { | |
41 | + | let lastHashForToken = match getBinary(this, lastTokenRandomHash) { | |
42 | + | case s: ByteVector => | |
43 | + | s | |
44 | + | case _: Unit => | |
45 | + | base58'4dD7osCQzvuXJdTiGfKvTwnKT' | |
46 | + | case _ => | |
47 | + | throw("Match error") | |
48 | + | } | |
49 | + | let rand = (((((lastHashForToken + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
50 | + | sha256(rand) | |
51 | + | } | |
52 | + | ||
53 | + | ||
54 | + | func getPriceArray () = { | |
55 | + | let tempPrices = getStringValue(this, lotteryPrices) | |
56 | + | let trimPrices = take(tempPrices, (size(tempPrices) - 1)) | |
57 | + | let newArray = split(trimPrices, ",") | |
58 | + | newArray | |
59 | + | } | |
60 | + | ||
61 | + | ||
62 | + | func generateNewListOfPrices (token,val) = { | |
63 | + | let indexOfComma = indexOf(token, ",") | |
64 | + | if ((indexOfComma == unit)) | |
65 | + | then (val + ",") | |
66 | + | else ((token + val) + ",") | |
67 | + | } | |
68 | + | ||
69 | + | ||
70 | + | func procedLottery (win,token) = if (isDefined(token)) | |
71 | + | then { | |
72 | + | let tokenProbability = getIntegerValue(this, (token + lotteryprobability)) | |
73 | + | let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal)) | |
74 | + | let probabilityValue = (tokenProbabilityDecimal * 1000) | |
75 | + | let probCompare = (tokenProbabilityDecimal % probabilityValue) | |
76 | + | let sizeOfWin = size(win) | |
77 | + | if ((sizeOfWin == 1)) | |
78 | + | then { | |
79 | + | let randomNumber = win[0] | |
80 | + | let comp = toInt(fromBase64String(randomNumber)) | |
81 | + | if ((probCompare > comp)) | |
82 | + | then token :: win | |
83 | + | else win | |
84 | + | } | |
85 | + | else win | |
86 | + | } | |
87 | + | else win | |
88 | + | ||
89 | + | ||
90 | + | @Callable(i) | |
91 | + | func updateprobability (probability,amount,poolprice,probDecimal,assetId) = { | |
92 | + | let token = toBase64String(generatorRandomHash(i)) | |
93 | + | let paymentIsDefined = if (!(isDefined(i.payment))) | |
94 | + | then false | |
95 | + | else true | |
96 | + | let lotteryAssetTN = if ((assetId == "")) | |
97 | + | then true | |
98 | + | else false | |
99 | + | let totalRequiredAmount = (amount * poolprice) | |
100 | + | if ((paymentIsDefined == true)) | |
101 | + | then { | |
102 | + | let payment = extract(i.payment) | |
103 | + | let paymentAssetId = match payment.assetId { | |
104 | + | case a: ByteVector => | |
105 | + | toBase64String(a) | |
106 | + | case _: Unit => | |
107 | + | "" | |
108 | + | case _ => | |
109 | + | throw("Match error") | |
110 | + | } | |
111 | + | let paymentAmount = payment.amount | |
112 | + | if ((paymentAssetId != assetId)) | |
113 | + | then throw("Asset Id not matching with Payment Asset Id") | |
114 | + | else if ((totalRequiredAmount > paymentAmount)) | |
115 | + | then throw("Not enough Asset Amount") | |
116 | + | else { | |
117 | + | let tempValue = match getString(this, lotteryPrices) { | |
118 | + | case a: String => | |
119 | + | a | |
120 | + | case _: Unit => | |
121 | + | "" | |
122 | + | case _ => | |
123 | + | throw("Match error") | |
124 | + | } | |
125 | + | let containKey = indexOf(tempValue, token) | |
126 | + | let storedTokensValues = match containKey { | |
127 | + | case _: Unit => | |
128 | + | ((tempValue + token) + ",") | |
129 | + | case x: Int => | |
130 | + | throw("Token is duplicated") | |
131 | + | case _ => | |
132 | + | throw("Match error") | |
133 | + | } | |
134 | + | let countTokens = match getInteger(this, countOfPrices) { | |
135 | + | case a: Int => | |
136 | + | a | |
137 | + | case _: Unit => | |
138 | + | 0 | |
139 | + | case _ => | |
140 | + | throw("Match error") | |
141 | + | } | |
142 | + | if ((allowSizeLottery > countTokens)) | |
143 | + | then { | |
144 | + | 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)]) | |
145 | + | ScriptResult(updateLotteryPool, TransferSet(nil)) | |
146 | + | } | |
147 | + | else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery))) | |
148 | + | } | |
149 | + | } | |
150 | + | else { | |
151 | + | let tnBalance = if (lotteryAssetTN) | |
152 | + | then wavesBalance(this) | |
153 | + | else assetBalance(this, fromBase64String(assetId)) | |
154 | + | if ((totalRequiredAmount > tnBalance)) | |
155 | + | then throw("Not enough Asset Amount") | |
156 | + | else { | |
157 | + | let tempValue = match getString(this, lotteryPrices) { | |
158 | + | case a: String => | |
159 | + | a | |
160 | + | case _: Unit => | |
161 | + | "" | |
162 | + | case _ => | |
163 | + | throw("Match error") | |
164 | + | } | |
165 | + | let containKey = indexOf(tempValue, token) | |
166 | + | let storedTokensValues = match containKey { | |
167 | + | case _: Unit => | |
168 | + | ((tempValue + token) + ",") | |
169 | + | case x: Int => | |
170 | + | throw("Token is duplicated") | |
171 | + | case _ => | |
172 | + | throw("Match error") | |
173 | + | } | |
174 | + | let countTokens = match getInteger(this, countOfPrices) { | |
175 | + | case a: Int => | |
176 | + | a | |
177 | + | case _: Unit => | |
178 | + | 0 | |
179 | + | case _ => | |
180 | + | throw("Match error") | |
181 | + | } | |
182 | + | if ((allowSizeLottery > countTokens)) | |
183 | + | then { | |
184 | + | 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)]) | |
185 | + | ScriptResult(updateLotteryPool, TransferSet(nil)) | |
186 | + | } | |
187 | + | else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery))) | |
188 | + | } | |
189 | + | } | |
190 | + | } | |
191 | + | ||
192 | + | ||
193 | + | ||
194 | + | @Callable(i) | |
195 | + | func startlotto () = { | |
196 | + | let currentKey = toBase58String(i.caller.bytes) | |
197 | + | let randhash = randomizer(i) | |
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 | + | let priceList = getPriceArray() | |
207 | + | let randNumber = toBase64String(randhash) | |
208 | + | let winningToken = { | |
209 | + | let $list75077554 = priceList | |
210 | + | let $size75077554 = size($list75077554) | |
211 | + | let $acc075077554 = [randNumber] | |
212 | + | if (($size75077554 == 0)) | |
213 | + | then $acc075077554 | |
214 | + | else { | |
215 | + | let $acc175077554 = procedLottery($acc075077554, $list75077554[0]) | |
216 | + | if (($size75077554 == 1)) | |
217 | + | then $acc175077554 | |
218 | + | else { | |
219 | + | let $acc275077554 = procedLottery($acc175077554, $list75077554[1]) | |
220 | + | if (($size75077554 == 2)) | |
221 | + | then $acc275077554 | |
222 | + | else { | |
223 | + | let $acc375077554 = procedLottery($acc275077554, $list75077554[2]) | |
224 | + | if (($size75077554 == 3)) | |
225 | + | then $acc375077554 | |
226 | + | else { | |
227 | + | let $acc475077554 = procedLottery($acc375077554, $list75077554[3]) | |
228 | + | if (($size75077554 == 4)) | |
229 | + | then $acc475077554 | |
230 | + | else { | |
231 | + | let $acc575077554 = procedLottery($acc475077554, $list75077554[4]) | |
232 | + | if (($size75077554 == 5)) | |
233 | + | then $acc575077554 | |
234 | + | else { | |
235 | + | let $acc675077554 = procedLottery($acc575077554, $list75077554[5]) | |
236 | + | throw("List size exceed 5") | |
237 | + | } | |
238 | + | } | |
239 | + | } | |
240 | + | } | |
241 | + | } | |
242 | + | } | |
243 | + | } | |
244 | + | let sizeOfWinPrices = size(winningToken) | |
245 | + | if ((sizeOfWinPrices == 0)) | |
246 | + | then { | |
247 | + | let writeSets = WriteSet(nil) | |
248 | + | ScriptResult(writeSets, TransferSet(nil)) | |
249 | + | } | |
250 | + | else { | |
251 | + | let token = winningToken[0] | |
252 | + | let currentAmount = getIntegerValue(this, (token + lotteryamount)) | |
253 | + | if ((currentAmount == 1)) | |
254 | + | then throw("Amount exceeded") | |
255 | + | else { | |
256 | + | let actualAmount = -(1) | |
257 | + | let tokenPrice = getIntegerValue(this, (token + lotteryPrice)) | |
258 | + | let tokenAssetId = getStringValue(this, (token + lotteryAssetId)) | |
259 | + | if ((actualAmount == 0)) | |
260 | + | then { | |
261 | + | let storedTokensValues = { | |
262 | + | let $list83778427 = priceList | |
263 | + | let $size83778427 = size($list83778427) | |
264 | + | let $acc083778427 = token | |
265 | + | if (($size83778427 == 0)) | |
266 | + | then $acc083778427 | |
267 | + | else { | |
268 | + | let $acc183778427 = generateNewListOfPrices($acc083778427, $list83778427[0]) | |
269 | + | if (($size83778427 == 1)) | |
270 | + | then $acc183778427 | |
271 | + | else { | |
272 | + | let $acc283778427 = generateNewListOfPrices($acc183778427, $list83778427[1]) | |
273 | + | if (($size83778427 == 2)) | |
274 | + | then $acc283778427 | |
275 | + | else { | |
276 | + | let $acc383778427 = generateNewListOfPrices($acc283778427, $list83778427[2]) | |
277 | + | if (($size83778427 == 3)) | |
278 | + | then $acc383778427 | |
279 | + | else { | |
280 | + | let $acc483778427 = generateNewListOfPrices($acc383778427, $list83778427[3]) | |
281 | + | if (($size83778427 == 4)) | |
282 | + | then $acc483778427 | |
283 | + | else { | |
284 | + | let $acc583778427 = generateNewListOfPrices($acc483778427, $list83778427[4]) | |
285 | + | if (($size83778427 == 5)) | |
286 | + | then $acc583778427 | |
287 | + | else { | |
288 | + | let $acc683778427 = generateNewListOfPrices($acc583778427, $list83778427[5]) | |
289 | + | throw("List size exceed 5") | |
290 | + | } | |
291 | + | } | |
292 | + | } | |
293 | + | } | |
294 | + | } | |
295 | + | } | |
296 | + | } | |
297 | + | let writeSets = WriteSet([DataEntry(("winning_token_" + token), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry(countOfPrices, (countTokens - 1)), DataEntry(lotteryPrices, storedTokensValues), DataEntry(lastHashRandomNumber, randNumber)]) | |
298 | + | if ((tokenAssetId == "")) | |
299 | + | then { | |
300 | + | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)]) | |
301 | + | ScriptResult(writeSets, winTransfer) | |
302 | + | } | |
303 | + | else { | |
304 | + | let actualAssetId = fromBase64String(tokenAssetId) | |
305 | + | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, actualAssetId)]) | |
306 | + | ScriptResult(writeSets, winTransfer) | |
307 | + | } | |
308 | + | } | |
309 | + | else { | |
310 | + | let writeSets = WriteSet([DataEntry((currentKey + "_winning_token_"), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry((token + lotteryamount), actualAmount), DataEntry(lastHashRandomNumber, randNumber)]) | |
311 | + | if ((tokenAssetId == "")) | |
312 | + | then { | |
313 | + | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)]) | |
314 | + | ScriptResult(writeSets, winTransfer) | |
315 | + | } | |
316 | + | else { | |
317 | + | let actualAssetId = fromBase64String(tokenAssetId) | |
318 | + | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, actualAssetId)]) | |
319 | + | ScriptResult(writeSets, winTransfer) | |
320 | + | } | |
321 | + | } | |
322 | + | } | |
323 | + | } | |
324 | + | } | |
325 | + | ||
326 | + | ||
327 | + | @Verifier(tx) | |
328 | + | func verify () = match tx { | |
329 | + | case _: DataTransaction => | |
330 | + | true | |
331 | + | case _: SetScriptTransaction => | |
332 | + | true | |
333 | + | case _ => | |
334 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
335 | + | } | |
336 | + |
github/deemru/w8io/169f3d6 45.36 ms ◑