tx · FPAPNS2d8JSmG2EiAkfiDR55HDHugSZCSNpjdw6pbR18 3NBLCDfrwWn6JhQhjYBCBv37aaYajvxM97c: -0.01500000 Waves 2021.02.09 16:50 [1390737] smart account 3NBLCDfrwWn6JhQhjYBCBv37aaYajvxM97c > SELF 0.00000000 Waves
{ "type": 13, "id": "FPAPNS2d8JSmG2EiAkfiDR55HDHugSZCSNpjdw6pbR18", "fee": 1500000, "feeAssetId": null, "timestamp": 1612878615080, "version": 2, "chainId": 84, "sender": "3NBLCDfrwWn6JhQhjYBCBv37aaYajvxM97c", "senderPublicKey": "7BSg9XUirUhwkWQMXdtvveMi7RYmKcNR2banQyTvRsGq", "proofs": [ "2MuSBTVnRx2b8WjmSXYUwaUcR2bXZx8CU8485fi39wHHS2TnsXXQtcJG2iThGh4BVELScHvxPwRzSKcJw5eRfpXN" ], "script": "base64:AAIDAAAAAAAAAA0IARIHCgUBAQEBCBIAAAAAEAAAAAANbG90dGVyeWFtb3VudAIAAAAHX2Ftb3VudAAAAAASbG90dGVyeXByb2JhYmlsaXR5AgAAAAxfcHJvYmFiaWxpdHkAAAAAGWxvdHRlcnlwcm9iYWJpbGl0eWRlY2ltYWwCAAAAFF9wcm9iYWJpbGl0eV9kZWNpbWFsAAAAAAxsb3R0ZXJ5UHJpY2UCAAAABl9wcmljZQAAAAANbG90dGVyeVByaWNlcwIAAAAPX2xvdHRlcnlfcHJpY2VzAAAAAA5sb3R0ZXJ5QXNzZXRJZAIAAAARX2xvdHRlcnlfYXNzZXRfaWQAAAAADWNvdW50T2ZQcmljZXMCAAAADV9jb3VudF9wcmljZXMAAAAAFGxhc3RIYXNoUmFuZG9tTnVtYmVyAgAAABVsYXN0X3NwaW5fcmFuZG9tX2hhc2gAAAAAE2xhc3RUb2tlblJhbmRvbUhhc2gCAAAAFmxhc3RfdG9rZW5fcmFuZG9tX2hhc2gAAAAACmRBcHBBZGRyZXMCAAAALDNCS0ZRTGVvNUV4WjVZMXB0OUZ0enNubzdhUnd6R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AAAAAAAAAAAEAwkAAAAAAAACBQAAAA0kc2l6ZTc1MDc3NTU0AAAAAAAAAAAFBQAAAA0kYWNjNTc1MDc3NTU0BAAAAA0kYWNjNjc1MDc3NTU0CQEAAAANcHJvY2VkTG90dGVyeQAAAAIFAAAADSRhY2M1NzUwNzc1NTQJAAGRAAAAAgUAAAANJGxpc3Q3NTA3NzU1NAAAAAAAAAAABQkAAAIAAAABAgAAABJMaXN0IHNpemUgZXhjZWVkIDUEAAAAD3NpemVPZldpblByaWNlcwkAAZAAAAABBQAAAAx3aW5uaW5nVG9rZW4DCQAAAAAAAAIFAAAAD3NpemVPZldpblByaWNlcwAAAAAAAAAAAAQAAAAJd3JpdGVTZXRzCQEAAAAIV3JpdGVTZXQAAAABBQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAl3cml0ZVNldHMJAQAAAAtUcmFuc2ZlclNldAAAAAEFAAAAA25pbAQAAAAFdG9rZW4JAAGRAAAAAgUAAAAMd2lubmluZ1Rva2VuAAAAAAAAAAABCQAAAgAAAAEFAAAABXRva2VuAAAAAQAAAAJ0eAEAAAAGdmVyaWZ5AAAAAAQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBgkAAfQAAAADCAUAAAACdHgAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAJ0eAAAAA9zZW5kZXJQdWJsaWNLZXk1I9dG", "height": 1390737, "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[1] | |
252 | + | throw(token) | |
253 | + | } | |
254 | + | } | |
255 | + | ||
256 | + | ||
257 | + | @Verifier(tx) | |
258 | + | func verify () = match tx { | |
259 | + | case _: DataTransaction => | |
260 | + | true | |
261 | + | case _: SetScriptTransaction => | |
262 | + | true | |
263 | + | case _ => | |
264 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
265 | + | } | |
266 | + |
github/deemru/w8io/026f985 17.72 ms ◑