tx · 6GVtNLeyQmwGpGpnDe7UXydebtigszZP2JUBfhBpmYPz 3MsyGaUAKDfEV8oeS4axL1FqyC2LQAPRjVe: -0.01500000 Waves 2021.02.10 12:17 [1391885] smart account 3MsyGaUAKDfEV8oeS4axL1FqyC2LQAPRjVe > SELF 0.00000000 Waves
{ "type": 13, "id": "6GVtNLeyQmwGpGpnDe7UXydebtigszZP2JUBfhBpmYPz", "fee": 1500000, "feeAssetId": null, "timestamp": 1612948672736, "version": 2, "chainId": 84, "sender": "3MsyGaUAKDfEV8oeS4axL1FqyC2LQAPRjVe", "senderPublicKey": "9uKfiYrKqTDAkP8RfH7c5yw4R8FAT7WiMPcDRw4SngCY", "proofs": [ "vPpXaBZ7bnq8vGWRkRjZRq4aoz4GFEcwAuUVZ9qVWV3gVLvx3vhiimkkC8UzQUSePanU5T9dhKjZ6abYczpdw9t" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEgAAAAAKZEFwcEFkZHJlcwIAAAArRjlEQ0dpWWdUOHl2QnExQVFGY1NwR0c0cDhzZHpOejltWmN6RHZKNDVMTAAAAAALdGlja2V0QXNzZXQBAAAAIEYc9ZUgYtXiRrToDJgiMgFmnQRu3R1NoyARqb9irygsAAAAAA10b2tlbnNQZXJQbGF5AAAAAAAF9eEAAAAAAA1sb3R0ZXJ5YW1vdW50AgAAAAdfYW1vdW50AAAAABJsb3R0ZXJ5cHJvYmFiaWxpdHkCAAAADF9wcm9iYWJpbGl0eQAAAAAZbG90dGVyeXByb2JhYmlsaXR5ZGVjaW1hbAIAAAAUX3Byb2JhYmlsaXR5X2RlY2ltYWwAAAAADGxvdHRlcnlQcmljZQIAAAAGX3ByaWNlAAAAAA1sb3R0ZXJ5UHJpY2VzAgAAAA9fbG90dGVyeV9wcmljZXMAAAAADmxvdHRlcnlBc3NldElkAgAAABFfbG90dGVyeV9hc3NldF9pZAAAAAANY291bnRPZlByaWNlcwIAAAANX2NvdW50X3ByaWNlcwAAAAAUb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": "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 | + | if (isDefined(indexOfComma)) | |
69 | + | then ((token + val) + ",") | |
70 | + | else (val + ",") | |
71 | + | } | |
72 | + | ||
73 | + | ||
74 | + | func procedLottery (win,token) = if (if (isDefined(token)) | |
75 | + | then true | |
76 | + | else (token != "")) | |
77 | + | then { | |
78 | + | let tokenProbability = getIntegerValue(this, (token + lotteryprobability)) | |
79 | + | let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal)) | |
80 | + | let probabilityValue = (tokenProbabilityDecimal * 1000) | |
81 | + | let probCompare = (tokenProbabilityDecimal % probabilityValue) | |
82 | + | let sizeOfWin = size(win) | |
83 | + | if ((sizeOfWin == 1)) | |
84 | + | then { | |
85 | + | let randomNumber = win[0] | |
86 | + | let comp = toInt(fromBase64String(randomNumber)) | |
87 | + | if ((probCompare > comp)) | |
88 | + | then token :: win | |
89 | + | else win | |
90 | + | } | |
91 | + | else win | |
92 | + | } | |
93 | + | else win | |
94 | + | ||
95 | + | ||
96 | + | @Callable(i) | |
97 | + | func updateprobability (probability,amount,poolprice,probDecimal,assetId) = { | |
98 | + | let token = toBase64String(generatorRandomHash(i)) | |
99 | + | let paymentIsDefined = if (!(isDefined(i.payment))) | |
100 | + | then false | |
101 | + | else true | |
102 | + | let lotteryAssetTN = if ((assetId == "")) | |
103 | + | then true | |
104 | + | else false | |
105 | + | let totalRequiredAmount = (amount * poolprice) | |
106 | + | if ((paymentIsDefined == true)) | |
107 | + | then { | |
108 | + | let payment = extract(i.payment) | |
109 | + | let paymentAssetId = match payment.assetId { | |
110 | + | case a: ByteVector => | |
111 | + | toBase58String(a) | |
112 | + | case _: Unit => | |
113 | + | "" | |
114 | + | case _ => | |
115 | + | throw("Match error") | |
116 | + | } | |
117 | + | let paymentAmount = payment.amount | |
118 | + | if ((paymentAssetId != assetId)) | |
119 | + | then throw("Asset Id not matching with Payment Asset Id") | |
120 | + | else if ((totalRequiredAmount > paymentAmount)) | |
121 | + | then throw("Not enough Asset Amount") | |
122 | + | else { | |
123 | + | let tempValue = match getString(this, lotteryPrices) { | |
124 | + | case a: String => | |
125 | + | a | |
126 | + | case _: Unit => | |
127 | + | "" | |
128 | + | case _ => | |
129 | + | throw("Match error") | |
130 | + | } | |
131 | + | let containKey = indexOf(tempValue, token) | |
132 | + | let storedTokensValues = match containKey { | |
133 | + | case _: Unit => | |
134 | + | ((tempValue + token) + ",") | |
135 | + | case x: Int => | |
136 | + | throw("Token is duplicated") | |
137 | + | case _ => | |
138 | + | throw("Match error") | |
139 | + | } | |
140 | + | let countTokens = match getInteger(this, countOfPrices) { | |
141 | + | case a: Int => | |
142 | + | a | |
143 | + | case _: Unit => | |
144 | + | 0 | |
145 | + | case _ => | |
146 | + | throw("Match error") | |
147 | + | } | |
148 | + | if ((allowSizeLottery > countTokens)) | |
149 | + | then { | |
150 | + | 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)]) | |
151 | + | ScriptResult(updateLotteryPool, TransferSet(nil)) | |
152 | + | } | |
153 | + | else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery))) | |
154 | + | } | |
155 | + | } | |
156 | + | else { | |
157 | + | let tnBalance = if (lotteryAssetTN) | |
158 | + | then wavesBalance(this) | |
159 | + | else assetBalance(this, fromBase64String(assetId)) | |
160 | + | if ((totalRequiredAmount > tnBalance)) | |
161 | + | then throw("Not enough Asset Amount") | |
162 | + | else { | |
163 | + | let tempValue = match getString(this, lotteryPrices) { | |
164 | + | case a: String => | |
165 | + | a | |
166 | + | case _: Unit => | |
167 | + | "" | |
168 | + | case _ => | |
169 | + | throw("Match error") | |
170 | + | } | |
171 | + | let containKey = indexOf(tempValue, token) | |
172 | + | let storedTokensValues = match containKey { | |
173 | + | case _: Unit => | |
174 | + | ((tempValue + token) + ",") | |
175 | + | case x: Int => | |
176 | + | throw("Token is duplicated") | |
177 | + | case _ => | |
178 | + | throw("Match error") | |
179 | + | } | |
180 | + | let countTokens = match getInteger(this, countOfPrices) { | |
181 | + | case a: Int => | |
182 | + | a | |
183 | + | case _: Unit => | |
184 | + | 0 | |
185 | + | case _ => | |
186 | + | throw("Match error") | |
187 | + | } | |
188 | + | if ((allowSizeLottery > countTokens)) | |
189 | + | then { | |
190 | + | 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)]) | |
191 | + | ScriptResult(updateLotteryPool, TransferSet(nil)) | |
192 | + | } | |
193 | + | else throw(("Lottery prices has reached maximum " + toString(allowSizeLottery))) | |
194 | + | } | |
195 | + | } | |
196 | + | } | |
197 | + | ||
198 | + | ||
199 | + | ||
200 | + | @Callable(i) | |
201 | + | func startlotto () = { | |
202 | + | let currentKey = toBase58String(i.caller.bytes) | |
203 | + | let randhash = randomizer(i) | |
204 | + | let countTokens = match getInteger(this, countOfPrices) { | |
205 | + | case a: Int => | |
206 | + | a | |
207 | + | case _: Unit => | |
208 | + | 0 | |
209 | + | case _ => | |
210 | + | throw("Match error") | |
211 | + | } | |
212 | + | let priceList = getPriceArray() | |
213 | + | let randNumber = toBase64String(randhash) | |
214 | + | let winningToken = { | |
215 | + | let $list82118258 = priceList | |
216 | + | let $size82118258 = size($list82118258) | |
217 | + | let $acc082118258 = [randNumber] | |
218 | + | if (($size82118258 == 0)) | |
219 | + | then $acc082118258 | |
220 | + | else { | |
221 | + | let $acc182118258 = procedLottery($acc082118258, $list82118258[0]) | |
222 | + | if (($size82118258 == 1)) | |
223 | + | then $acc182118258 | |
224 | + | else { | |
225 | + | let $acc282118258 = procedLottery($acc182118258, $list82118258[1]) | |
226 | + | if (($size82118258 == 2)) | |
227 | + | then $acc282118258 | |
228 | + | else { | |
229 | + | let $acc382118258 = procedLottery($acc282118258, $list82118258[2]) | |
230 | + | if (($size82118258 == 3)) | |
231 | + | then $acc382118258 | |
232 | + | else { | |
233 | + | let $acc482118258 = procedLottery($acc382118258, $list82118258[3]) | |
234 | + | if (($size82118258 == 4)) | |
235 | + | then $acc482118258 | |
236 | + | else { | |
237 | + | let $acc582118258 = procedLottery($acc482118258, $list82118258[4]) | |
238 | + | if (($size82118258 == 5)) | |
239 | + | then $acc582118258 | |
240 | + | else { | |
241 | + | let $acc682118258 = procedLottery($acc582118258, $list82118258[5]) | |
242 | + | throw("List size exceed 5") | |
243 | + | } | |
244 | + | } | |
245 | + | } | |
246 | + | } | |
247 | + | } | |
248 | + | } | |
249 | + | } | |
250 | + | let sizeOfWinPrices = size(winningToken) | |
251 | + | if ((sizeOfWinPrices == 1)) | |
252 | + | then { | |
253 | + | let writeSets = WriteSet([DataEntry("message", "Better luck next time!")]) | |
254 | + | ScriptResult(writeSets, TransferSet(nil)) | |
255 | + | } | |
256 | + | else { | |
257 | + | let token = winningToken[0] | |
258 | + | let currentAmount = getIntegerValue(this, (token + lotteryamount)) | |
259 | + | if ((currentAmount == 0)) | |
260 | + | then throw("Amount exceeded") | |
261 | + | else { | |
262 | + | let actualAmount = (currentAmount - 1) | |
263 | + | let tokenPrice = getIntegerValue(this, (token + lotteryPrice)) | |
264 | + | let tokenAssetId = getStringValue(this, (token + lotteryAssetId)) | |
265 | + | if ((actualAmount == 0)) | |
266 | + | then { | |
267 | + | let storedTokensValues = { | |
268 | + | let $list93639413 = priceList | |
269 | + | let $size93639413 = size($list93639413) | |
270 | + | let $acc093639413 = token | |
271 | + | if (($size93639413 == 0)) | |
272 | + | then $acc093639413 | |
273 | + | else { | |
274 | + | let $acc193639413 = generateNewListOfPrices($acc093639413, $list93639413[0]) | |
275 | + | if (($size93639413 == 1)) | |
276 | + | then $acc193639413 | |
277 | + | else { | |
278 | + | let $acc293639413 = generateNewListOfPrices($acc193639413, $list93639413[1]) | |
279 | + | if (($size93639413 == 2)) | |
280 | + | then $acc293639413 | |
281 | + | else { | |
282 | + | let $acc393639413 = generateNewListOfPrices($acc293639413, $list93639413[2]) | |
283 | + | if (($size93639413 == 3)) | |
284 | + | then $acc393639413 | |
285 | + | else { | |
286 | + | let $acc493639413 = generateNewListOfPrices($acc393639413, $list93639413[3]) | |
287 | + | if (($size93639413 == 4)) | |
288 | + | then $acc493639413 | |
289 | + | else { | |
290 | + | let $acc593639413 = generateNewListOfPrices($acc493639413, $list93639413[4]) | |
291 | + | if (($size93639413 == 5)) | |
292 | + | then $acc593639413 | |
293 | + | else { | |
294 | + | let $acc693639413 = generateNewListOfPrices($acc593639413, $list93639413[5]) | |
295 | + | throw("List size exceed 5") | |
296 | + | } | |
297 | + | } | |
298 | + | } | |
299 | + | } | |
300 | + | } | |
301 | + | } | |
302 | + | } | |
303 | + | throw(((storedTokensValues + " :: ") + token)) | |
304 | + | } | |
305 | + | else { | |
306 | + | let writeSets = WriteSet([DataEntry((currentKey + "_winning_token_"), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry((token + lotteryamount), actualAmount), DataEntry(lastHashRandomNumber, randNumber), DataEntry("message", "Congratulations you won!")]) | |
307 | + | if ((tokenAssetId == "")) | |
308 | + | then { | |
309 | + | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)]) | |
310 | + | ScriptResult(writeSets, winTransfer) | |
311 | + | } | |
312 | + | else { | |
313 | + | let actualAssetId = fromBase58String(tokenAssetId) | |
314 | + | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, actualAssetId)]) | |
315 | + | ScriptResult(writeSets, winTransfer) | |
316 | + | } | |
317 | + | } | |
318 | + | } | |
319 | + | } | |
320 | + | } | |
321 | + | ||
322 | + | ||
323 | + | @Verifier(tx) | |
324 | + | func verify () = match tx { | |
325 | + | case _ => | |
326 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
327 | + | } | |
328 | + |
github/deemru/w8io/169f3d6 28.13 ms ◑