tx · CSaXmZpghGBcN9Hgs1qKRjR218ha53hyb4zQQGL7S1F4 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b: -0.01400000 Waves 2021.02.09 08:11 [1390210] smart account 3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b > SELF 0.00000000 Waves
{ "type": 13, "id": "CSaXmZpghGBcN9Hgs1qKRjR218ha53hyb4zQQGL7S1F4", "fee": 1400000, "feeAssetId": null, "timestamp": 1612847526900, "version": 2, "chainId": 84, "sender": "3Mt71RiSbWYENDmeyndvwjoJZwUsXfUkR6b", "senderPublicKey": "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV", "proofs": [ "5UL7PnqL4tU1mjRGspNsAk7DPv1BdRFEktA2tHkUmXeX22dnAsvGCxAy37d17A6GbPkVVrBZ5vNKEUJx8WubUgR9" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEAAAAAANbG90dGVyeWFtb3VudAIAAAAHX2Ftb3VudAAAAAASbG90dGVyeXByb2JhYmlsaXR5AgAAAAxfcHJvYmFiaWxpdHkAAAAAGWxvdHRlcnlwcm9iYWJpbGl0eWRlY2ltYWwCAAAAFF9wcm9iYWJpbGl0eV9kZWNpbWFsAAAAAAxsb3R0ZXJ5UHJpY2UCAAAABl9wcmljZQAAAAANbG90dGVyeVByaWNlcwIAAAAPX2xvdHRlcnlfcHJpY2VzAAAAAA5sb3R0ZXJ5QXNzZXRJZAIAAAARX2xvdHRlcnlfYXNzZXRfaWQAAAAADWNvdW50T2ZQcmljZXMCAAAADV9jb3VudF9wcmljZXMAAAAAFGxhc3RIYXNoUmFuZG9tTnVtYmVyAgAAABVsYXN0X3NwaW5fcmFuZG9tX2hhc2gAAAAAE2xhc3RUb2tlblJhbmRvbUhhc2gCAAAAFmxhc3RfdG9rZW5fcmFuZG9tX2hhc2gAAAAACmRBcHBBZGRyZXMCAAAALDNCS0ZRTGVvNUV4WjVZMXB0OUZ0enN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t3aW5UcmFuc2ZlcgkBAAAAC1RyYW5zZmVyU2V0AAAAAQkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADCAUAAAABaQAAAAZjYWxsZXIFAAAACnRva2VuUHJpY2UFAAAABHVuaXQFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIFAAAACXdyaXRlU2V0cwUAAAALd2luVHJhbnNmZXIEAAAAC3dpblRyYW5zZmVyCQEAAAALVHJhbnNmZXJTZXQAAAABCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgUAAAAKdG9rZW5QcmljZQUAAAAEdW5pdAUAAAADbmlsCQEAAAAMU2NyaXB0UmVzdWx0AAAAAgUAAAAJd3JpdGVTZXRzBQAAAAt3aW5UcmFuc2ZlcgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABRTZXRTY3JpcHRUcmFuc2FjdGlvbgYJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5eHKrLA==", "height": 1390210, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 8y1ydrBMV8EgZfFi2H9panSoiUHqKvw7cr4iyShFr6EC Next: 5TTLpQfq4oVm3uYuGPnrL1ftJjUiuBzjdjCshPcNLwF2 Diff:
Old | New | Differences | |
---|---|---|---|
19 | 19 | ||
20 | 20 | let lastTokenRandomHash = "last_token_random_hash" | |
21 | 21 | ||
22 | - | let dAppAddres = " | |
22 | + | let dAppAddres = "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV" | |
23 | 23 | ||
24 | 24 | func randomizer (inv) = { | |
25 | 25 | let lastPlay = match getBinary(this, lastHashRandomNumber) { | |
98 | 98 | func updateprobability (probability,amount,poolprice,probDecimal,assetId) = { | |
99 | 99 | let token = toBase64String(generatorRandomHash(i)) | |
100 | 100 | let currentKey = toBase58String(i.caller.bytes) | |
101 | - | let isCallerOwner = if ((currentKey == dAppAddres)) | |
101 | + | let isCallerOwner = if (if ((currentKey == dAppAddres)) | |
102 | + | then true | |
103 | + | else (currentKey == "")) | |
102 | 104 | then true | |
103 | 105 | else false | |
104 | 106 | let lotteryAssetTN = if ((assetId == "")) | |
107 | 109 | let compareAmount = if (if ((isCallerOwner == true)) | |
108 | 110 | then (lotteryAssetTN == true) | |
109 | 111 | else false) | |
110 | - | then wavesBalance( | |
112 | + | then wavesBalance(this) | |
111 | 113 | else if (if ((isCallerOwner == true)) | |
112 | 114 | then (lotteryAssetTN == false) | |
113 | 115 | else false) | |
114 | 116 | then { | |
115 | 117 | let callerAddress = addressFromStringValue(currentKey) | |
116 | 118 | let assetIdBytes = toBytes(assetId) | |
117 | - | | |
119 | + | 0 | |
118 | 120 | } | |
119 | 121 | else if (if ((isCallerOwner == false)) | |
120 | 122 | then (lotteryAssetTN == true) | |
169 | 171 | let priceList = getPriceArray() | |
170 | 172 | let randNumber = toInt(randhash) | |
171 | 173 | let winningToken = { | |
172 | - | let $ | |
173 | - | let $ | |
174 | - | let $ | |
175 | - | if (($ | |
176 | - | then $ | |
174 | + | let $list59575994 = priceList | |
175 | + | let $size59575994 = size($list59575994) | |
176 | + | let $acc059575994 = nil | |
177 | + | if (($size59575994 == 0)) | |
178 | + | then $acc059575994 | |
177 | 179 | else { | |
178 | - | let $ | |
179 | - | if (($ | |
180 | - | then $ | |
180 | + | let $acc159575994 = procedLottery($acc059575994, $list59575994[0]) | |
181 | + | if (($size59575994 == 1)) | |
182 | + | then $acc159575994 | |
181 | 183 | else { | |
182 | - | let $ | |
183 | - | if (($ | |
184 | - | then $ | |
184 | + | let $acc259575994 = procedLottery($acc159575994, $list59575994[1]) | |
185 | + | if (($size59575994 == 2)) | |
186 | + | then $acc259575994 | |
185 | 187 | else { | |
186 | - | let $ | |
187 | - | if (($ | |
188 | - | then $ | |
188 | + | let $acc359575994 = procedLottery($acc259575994, $list59575994[2]) | |
189 | + | if (($size59575994 == 3)) | |
190 | + | then $acc359575994 | |
189 | 191 | else { | |
190 | - | let $ | |
191 | - | if (($ | |
192 | - | then $ | |
192 | + | let $acc459575994 = procedLottery($acc359575994, $list59575994[3]) | |
193 | + | if (($size59575994 == 4)) | |
194 | + | then $acc459575994 | |
193 | 195 | else { | |
194 | - | let $ | |
195 | - | if (($ | |
196 | - | then $ | |
196 | + | let $acc559575994 = procedLottery($acc459575994, $list59575994[4]) | |
197 | + | if (($size59575994 == 5)) | |
198 | + | then $acc559575994 | |
197 | 199 | else { | |
198 | - | let $ | |
200 | + | let $acc659575994 = procedLottery($acc559575994, $list59575994[5]) | |
199 | 201 | throw("List size exceed 5") | |
200 | 202 | } | |
201 | 203 | } | |
222 | 224 | if ((actualAmount == 0)) | |
223 | 225 | then { | |
224 | 226 | let actualListPrices = { | |
225 | - | let $ | |
226 | - | let $ | |
227 | - | let $ | |
228 | - | if (($ | |
229 | - | then $ | |
227 | + | let $list68126862 = priceList | |
228 | + | let $size68126862 = size($list68126862) | |
229 | + | let $acc068126862 = token | |
230 | + | if (($size68126862 == 0)) | |
231 | + | then $acc068126862 | |
230 | 232 | else { | |
231 | - | let $ | |
232 | - | if (($ | |
233 | - | then $ | |
233 | + | let $acc168126862 = generateNewListOfPrices($acc068126862, $list68126862[0]) | |
234 | + | if (($size68126862 == 1)) | |
235 | + | then $acc168126862 | |
234 | 236 | else { | |
235 | - | let $ | |
236 | - | if (($ | |
237 | - | then $ | |
237 | + | let $acc268126862 = generateNewListOfPrices($acc168126862, $list68126862[1]) | |
238 | + | if (($size68126862 == 2)) | |
239 | + | then $acc268126862 | |
238 | 240 | else { | |
239 | - | let $ | |
240 | - | if (($ | |
241 | - | then $ | |
241 | + | let $acc368126862 = generateNewListOfPrices($acc268126862, $list68126862[2]) | |
242 | + | if (($size68126862 == 3)) | |
243 | + | then $acc368126862 | |
242 | 244 | else { | |
243 | - | let $ | |
244 | - | if (($ | |
245 | - | then $ | |
245 | + | let $acc468126862 = generateNewListOfPrices($acc368126862, $list68126862[3]) | |
246 | + | if (($size68126862 == 4)) | |
247 | + | then $acc468126862 | |
246 | 248 | else { | |
247 | - | let $ | |
248 | - | if (($ | |
249 | - | then $ | |
249 | + | let $acc568126862 = generateNewListOfPrices($acc468126862, $list68126862[4]) | |
250 | + | if (($size68126862 == 5)) | |
251 | + | then $acc568126862 | |
250 | 252 | else { | |
251 | - | let $ | |
253 | + | let $acc668126862 = generateNewListOfPrices($acc568126862, $list68126862[5]) | |
252 | 254 | throw("List size exceed 5") | |
253 | 255 | } | |
254 | 256 | } |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let lotteryamount = "_amount" | |
5 | 5 | ||
6 | 6 | let lotteryprobability = "_probability" | |
7 | 7 | ||
8 | 8 | let lotteryprobabilitydecimal = "_probability_decimal" | |
9 | 9 | ||
10 | 10 | let lotteryPrice = "_price" | |
11 | 11 | ||
12 | 12 | let lotteryPrices = "_lottery_prices" | |
13 | 13 | ||
14 | 14 | let lotteryAssetId = "_lottery_asset_id" | |
15 | 15 | ||
16 | 16 | let countOfPrices = "_count_prices" | |
17 | 17 | ||
18 | 18 | let lastHashRandomNumber = "last_spin_random_hash" | |
19 | 19 | ||
20 | 20 | let lastTokenRandomHash = "last_token_random_hash" | |
21 | 21 | ||
22 | - | let dAppAddres = " | |
22 | + | let dAppAddres = "3BKFQLeo5ExZ5Y1pt9Ftzsno7aRwzD96zoYVHP3tcLgV" | |
23 | 23 | ||
24 | 24 | func randomizer (inv) = { | |
25 | 25 | let lastPlay = match getBinary(this, lastHashRandomNumber) { | |
26 | 26 | case s: ByteVector => | |
27 | 27 | s | |
28 | 28 | case _: Unit => | |
29 | 29 | base58'2ee4oFDYriWJ9EMeR' | |
30 | 30 | case _ => | |
31 | 31 | throw("Match error") | |
32 | 32 | } | |
33 | 33 | let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
34 | 34 | sha256(rand) | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func generatorRandomHash (inv) = { | |
39 | 39 | let lastHashForToken = match getBinary(this, lastTokenRandomHash) { | |
40 | 40 | case s: ByteVector => | |
41 | 41 | s | |
42 | 42 | case _: Unit => | |
43 | 43 | base58'4dD7osCQzvuXJdTiGfKvTwnKT' | |
44 | 44 | case _ => | |
45 | 45 | throw("Match error") | |
46 | 46 | } | |
47 | 47 | let rand = (((((lastHashForToken + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height)) | |
48 | 48 | sha256(rand) | |
49 | 49 | } | |
50 | 50 | ||
51 | 51 | ||
52 | 52 | func getSizePriceArray () = { | |
53 | 53 | let tempPrices = getStringValue(this, lotteryPrices) | |
54 | 54 | let trimPrices = take(tempPrices, (size(tempPrices) - 1)) | |
55 | 55 | let pricesArray = split(trimPrices, ",") | |
56 | 56 | let listSize = size(pricesArray) | |
57 | 57 | listSize | |
58 | 58 | } | |
59 | 59 | ||
60 | 60 | ||
61 | 61 | func getPriceArray () = { | |
62 | 62 | let tempPrices = getStringValue(this, lotteryPrices) | |
63 | 63 | let trimPrices = take(tempPrices, (size(tempPrices) - 1)) | |
64 | 64 | let newArray = split(trimPrices, ",") | |
65 | 65 | newArray | |
66 | 66 | } | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func generateNewListOfPrices (token,val) = { | |
70 | 70 | let indexOfComma = indexOf(token, ",") | |
71 | 71 | if ((indexOfComma == unit)) | |
72 | 72 | then (val + ",") | |
73 | 73 | else ((token + val) + ",") | |
74 | 74 | } | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func procedLottery (win,token) = { | |
78 | 78 | let tokenProbability = getIntegerValue(this, (token + lotteryprobability)) | |
79 | 79 | let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal)) | |
80 | 80 | let probabilityValue = (tokenProbabilityDecimal * 1000) | |
81 | 81 | let hash = (tokenProbabilityDecimal % probabilityValue) | |
82 | 82 | let sizeOfWin = size(win) | |
83 | 83 | if ((sizeOfWin == 1)) | |
84 | 84 | then { | |
85 | 85 | let randomNumber = win[0] | |
86 | 86 | if ((probabilityValue > hash)) | |
87 | 87 | then { | |
88 | 88 | let newList = token :: win | |
89 | 89 | newList | |
90 | 90 | } | |
91 | 91 | else win | |
92 | 92 | } | |
93 | 93 | else win | |
94 | 94 | } | |
95 | 95 | ||
96 | 96 | ||
97 | 97 | @Callable(i) | |
98 | 98 | func updateprobability (probability,amount,poolprice,probDecimal,assetId) = { | |
99 | 99 | let token = toBase64String(generatorRandomHash(i)) | |
100 | 100 | let currentKey = toBase58String(i.caller.bytes) | |
101 | - | let isCallerOwner = if ((currentKey == dAppAddres)) | |
101 | + | let isCallerOwner = if (if ((currentKey == dAppAddres)) | |
102 | + | then true | |
103 | + | else (currentKey == "")) | |
102 | 104 | then true | |
103 | 105 | else false | |
104 | 106 | let lotteryAssetTN = if ((assetId == "")) | |
105 | 107 | then true | |
106 | 108 | else false | |
107 | 109 | let compareAmount = if (if ((isCallerOwner == true)) | |
108 | 110 | then (lotteryAssetTN == true) | |
109 | 111 | else false) | |
110 | - | then wavesBalance( | |
112 | + | then wavesBalance(this) | |
111 | 113 | else if (if ((isCallerOwner == true)) | |
112 | 114 | then (lotteryAssetTN == false) | |
113 | 115 | else false) | |
114 | 116 | then { | |
115 | 117 | let callerAddress = addressFromStringValue(currentKey) | |
116 | 118 | let assetIdBytes = toBytes(assetId) | |
117 | - | | |
119 | + | 0 | |
118 | 120 | } | |
119 | 121 | else if (if ((isCallerOwner == false)) | |
120 | 122 | then (lotteryAssetTN == true) | |
121 | 123 | else false) | |
122 | 124 | then { | |
123 | 125 | let payment = extract(i.payment) | |
124 | 126 | payment.amount | |
125 | 127 | } | |
126 | 128 | else if (if ((isCallerOwner == false)) | |
127 | 129 | then (lotteryAssetTN == false) | |
128 | 130 | else false) | |
129 | 131 | then { | |
130 | 132 | let payment = extract(i.payment) | |
131 | 133 | let tempAssetId = fromBase64String(assetId) | |
132 | 134 | if ((payment.assetId == tempAssetId)) | |
133 | 135 | then payment.amount | |
134 | 136 | else throw("Payment Asset Id not matching with lottery Asset Id") | |
135 | 137 | } | |
136 | 138 | else 0 | |
137 | 139 | let totalRequiredAmount = (amount * poolprice) | |
138 | 140 | if ((totalRequiredAmount > compareAmount)) | |
139 | 141 | then throw("Payment Balance is not equal price") | |
140 | 142 | else { | |
141 | 143 | let tempValue = match getString(this, lotteryPrices) { | |
142 | 144 | case a: String => | |
143 | 145 | a | |
144 | 146 | case _ => | |
145 | 147 | "" | |
146 | 148 | } | |
147 | 149 | let containKey = indexOf(tempValue, token) | |
148 | 150 | let storedTokensValues = match containKey { | |
149 | 151 | case _: Unit => | |
150 | 152 | ((tempValue + token) + ",") | |
151 | 153 | case x: Int => | |
152 | 154 | throw("Token is duplicated") | |
153 | 155 | case _ => | |
154 | 156 | throw("Match error") | |
155 | 157 | } | |
156 | 158 | let countTokens = getSizePriceArray() | |
157 | 159 | let updateLotteryPool = WriteSet([DataEntry((token + lotteryamount), amount), DataEntry((token + lotteryprobability), probability), DataEntry((token + lotteryPrice), poolprice), DataEntry((token + lotteryPrices), storedTokensValues), DataEntry((token + countOfPrices), countTokens), DataEntry((token + lotteryprobabilitydecimal), probDecimal), DataEntry((token + lotteryAssetId), assetId), DataEntry((token + lastTokenRandomHash), token)]) | |
158 | 160 | ScriptResult(updateLotteryPool, TransferSet(nil)) | |
159 | 161 | } | |
160 | 162 | } | |
161 | 163 | ||
162 | 164 | ||
163 | 165 | ||
164 | 166 | @Callable(i) | |
165 | 167 | func startlotto () = { | |
166 | 168 | let currentKey = toBase58String(i.caller.bytes) | |
167 | 169 | let randhash = randomizer(i) | |
168 | 170 | let sizeTempPrice = getSizePriceArray() | |
169 | 171 | let priceList = getPriceArray() | |
170 | 172 | let randNumber = toInt(randhash) | |
171 | 173 | let winningToken = { | |
172 | - | let $ | |
173 | - | let $ | |
174 | - | let $ | |
175 | - | if (($ | |
176 | - | then $ | |
174 | + | let $list59575994 = priceList | |
175 | + | let $size59575994 = size($list59575994) | |
176 | + | let $acc059575994 = nil | |
177 | + | if (($size59575994 == 0)) | |
178 | + | then $acc059575994 | |
177 | 179 | else { | |
178 | - | let $ | |
179 | - | if (($ | |
180 | - | then $ | |
180 | + | let $acc159575994 = procedLottery($acc059575994, $list59575994[0]) | |
181 | + | if (($size59575994 == 1)) | |
182 | + | then $acc159575994 | |
181 | 183 | else { | |
182 | - | let $ | |
183 | - | if (($ | |
184 | - | then $ | |
184 | + | let $acc259575994 = procedLottery($acc159575994, $list59575994[1]) | |
185 | + | if (($size59575994 == 2)) | |
186 | + | then $acc259575994 | |
185 | 187 | else { | |
186 | - | let $ | |
187 | - | if (($ | |
188 | - | then $ | |
188 | + | let $acc359575994 = procedLottery($acc259575994, $list59575994[2]) | |
189 | + | if (($size59575994 == 3)) | |
190 | + | then $acc359575994 | |
189 | 191 | else { | |
190 | - | let $ | |
191 | - | if (($ | |
192 | - | then $ | |
192 | + | let $acc459575994 = procedLottery($acc359575994, $list59575994[3]) | |
193 | + | if (($size59575994 == 4)) | |
194 | + | then $acc459575994 | |
193 | 195 | else { | |
194 | - | let $ | |
195 | - | if (($ | |
196 | - | then $ | |
196 | + | let $acc559575994 = procedLottery($acc459575994, $list59575994[4]) | |
197 | + | if (($size59575994 == 5)) | |
198 | + | then $acc559575994 | |
197 | 199 | else { | |
198 | - | let $ | |
200 | + | let $acc659575994 = procedLottery($acc559575994, $list59575994[5]) | |
199 | 201 | throw("List size exceed 5") | |
200 | 202 | } | |
201 | 203 | } | |
202 | 204 | } | |
203 | 205 | } | |
204 | 206 | } | |
205 | 207 | } | |
206 | 208 | } | |
207 | 209 | let sizeOfWinPrices = size(winningToken) | |
208 | 210 | if ((sizeOfWinPrices == 1)) | |
209 | 211 | then { | |
210 | 212 | let writeSets = WriteSet(nil) | |
211 | 213 | ScriptResult(writeSets, TransferSet(nil)) | |
212 | 214 | } | |
213 | 215 | else { | |
214 | 216 | let token = winningToken[1] | |
215 | 217 | let currentAmount = getIntegerValue(this, (token + lotteryamount)) | |
216 | 218 | if ((currentAmount == 0)) | |
217 | 219 | then throw("Amount exceeded") | |
218 | 220 | else { | |
219 | 221 | let actualAmount = (currentAmount - 1) | |
220 | 222 | let tokenPrice = getIntegerValue(this, (token + lotteryPrice)) | |
221 | 223 | let tokenAssetId = getStringValue(this, (token + lotteryAssetId)) | |
222 | 224 | if ((actualAmount == 0)) | |
223 | 225 | then { | |
224 | 226 | let actualListPrices = { | |
225 | - | let $ | |
226 | - | let $ | |
227 | - | let $ | |
228 | - | if (($ | |
229 | - | then $ | |
227 | + | let $list68126862 = priceList | |
228 | + | let $size68126862 = size($list68126862) | |
229 | + | let $acc068126862 = token | |
230 | + | if (($size68126862 == 0)) | |
231 | + | then $acc068126862 | |
230 | 232 | else { | |
231 | - | let $ | |
232 | - | if (($ | |
233 | - | then $ | |
233 | + | let $acc168126862 = generateNewListOfPrices($acc068126862, $list68126862[0]) | |
234 | + | if (($size68126862 == 1)) | |
235 | + | then $acc168126862 | |
234 | 236 | else { | |
235 | - | let $ | |
236 | - | if (($ | |
237 | - | then $ | |
237 | + | let $acc268126862 = generateNewListOfPrices($acc168126862, $list68126862[1]) | |
238 | + | if (($size68126862 == 2)) | |
239 | + | then $acc268126862 | |
238 | 240 | else { | |
239 | - | let $ | |
240 | - | if (($ | |
241 | - | then $ | |
241 | + | let $acc368126862 = generateNewListOfPrices($acc268126862, $list68126862[2]) | |
242 | + | if (($size68126862 == 3)) | |
243 | + | then $acc368126862 | |
242 | 244 | else { | |
243 | - | let $ | |
244 | - | if (($ | |
245 | - | then $ | |
245 | + | let $acc468126862 = generateNewListOfPrices($acc368126862, $list68126862[3]) | |
246 | + | if (($size68126862 == 4)) | |
247 | + | then $acc468126862 | |
246 | 248 | else { | |
247 | - | let $ | |
248 | - | if (($ | |
249 | - | then $ | |
249 | + | let $acc568126862 = generateNewListOfPrices($acc468126862, $list68126862[4]) | |
250 | + | if (($size68126862 == 5)) | |
251 | + | then $acc568126862 | |
250 | 252 | else { | |
251 | - | let $ | |
253 | + | let $acc668126862 = generateNewListOfPrices($acc568126862, $list68126862[5]) | |
252 | 254 | throw("List size exceed 5") | |
253 | 255 | } | |
254 | 256 | } | |
255 | 257 | } | |
256 | 258 | } | |
257 | 259 | } | |
258 | 260 | } | |
259 | 261 | } | |
260 | 262 | let writeSets = WriteSet([DataEntry((currentKey + "_winning_token_"), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry((token + lotteryamount), actualAmount), DataEntry((token + lotteryPrices), actualListPrices), DataEntry(lastHashRandomNumber, randNumber)]) | |
261 | 263 | if ((tokenAssetId == "")) | |
262 | 264 | then { | |
263 | 265 | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)]) | |
264 | 266 | ScriptResult(writeSets, winTransfer) | |
265 | 267 | } | |
266 | 268 | else { | |
267 | 269 | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)]) | |
268 | 270 | ScriptResult(writeSets, winTransfer) | |
269 | 271 | } | |
270 | 272 | } | |
271 | 273 | else { | |
272 | 274 | let writeSets = WriteSet([DataEntry((currentKey + "_winning_token_"), token), DataEntry((currentKey + "_wininning_address_"), currentKey), DataEntry((token + lotteryamount), actualAmount), DataEntry(lastHashRandomNumber, randNumber)]) | |
273 | 275 | if ((tokenAssetId == "")) | |
274 | 276 | then { | |
275 | 277 | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)]) | |
276 | 278 | ScriptResult(writeSets, winTransfer) | |
277 | 279 | } | |
278 | 280 | else { | |
279 | 281 | let winTransfer = TransferSet([ScriptTransfer(i.caller, tokenPrice, unit)]) | |
280 | 282 | ScriptResult(writeSets, winTransfer) | |
281 | 283 | } | |
282 | 284 | } | |
283 | 285 | } | |
284 | 286 | } | |
285 | 287 | } | |
286 | 288 | ||
287 | 289 | ||
288 | 290 | @Verifier(tx) | |
289 | 291 | func verify () = match tx { | |
290 | 292 | case _: DataTransaction => | |
291 | 293 | true | |
292 | 294 | case _: SetScriptTransaction => | |
293 | 295 | true | |
294 | 296 | case _ => | |
295 | 297 | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
296 | 298 | } | |
297 | 299 |
github/deemru/w8io/026f985 79.24 ms ◑