tx · 7gwUZWnPYwsx6fhsXHjGPH6RnzAiYV3NhKHb5C6tBDVt

3NAJB2szuJxcM3SGfPsh3EgUCeTs8gCyCBD:  -0.01500000 Waves

2021.03.12 14:08 [1434391] smart account 3NAJB2szuJxcM3SGfPsh3EgUCeTs8gCyCBD > SELF 0.00000000 Waves

{ "type": 13, "id": "7gwUZWnPYwsx6fhsXHjGPH6RnzAiYV3NhKHb5C6tBDVt", "fee": 1500000, "feeAssetId": null, "timestamp": 1615547372154, "version": 2, "chainId": 84, "sender": "3NAJB2szuJxcM3SGfPsh3EgUCeTs8gCyCBD", "senderPublicKey": "74ZB758ZK2aSVfA8W8phVinVrtNhBzXvpV3azTACMt2z", "proofs": [ "5v9L3cTDucq2xMYMf2cZP5M1LADNVfeAxJNY8psqbXrqDwZHyNeMD2biKp4tZpdcjUGoMewaNy6CP2BfPBiamQfY" ], "script": "base64:AAIDAAAAAAAAAAYIARIAEgAAAAAWAAAAAApkQXBwQWRkcmVzAgAAACtGOURDR2lZZ1Q4eXZCcTFBUUZjU3BHRzRwOHNkek56OW1aY3pEdko0NUxMAAAAAAx0b2tlbkFzc2V0SWQCAAAALDVpaDlqZDRLVjlrU2V5NTV5dktNZ0xTSGN3c1lZa1E0cFJESnRSTm94VWh5AAAAAA11c2VHYXJsaWNDb2luBwAAAAANdG9rZW5zUGVyUGxheQAAAAAAAJiWgAAAAAANbG90dGVyeWFtb3VudAIAAAAHX2Ftb3VudAAAAAASbG90dGVyeXByb2JhYmlsaXR5AgAAAAxfcHJvYmFiaWxpdHkAAAAAGWxvdHRlcnlwcm9iYWJpbGl0eWRlY2ltYWwCAAAAFF9wcm9iYWJpbGl0eV9kZWNpbWFsAAAAABVsb3R0ZXJ5V2lubmluZ0FkZHJlc3MCAAAAEF93aW5uaW5nX2FkZHJlc3MAAAAADGxvdHRlcnlQcmljZQIAAAAGX3ByaWNlAAAAAA1sb3R0ZXJ5UHJpY2VzAgAAAA9fbG90dGVyeV9wcmljZXMAAAAADmxv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BQAAAAFpAAAABmNhbGxlcgUAAAASbG90dGVyeVByaWNlVG9rZW5CBQAAAAR1bml0BQAAAANuaWwJAQAAAAxTY3JpcHRSZXN1bHQAAAACBQAAAAl3cml0ZVNldHMFAAAAC3dpblRyYW5zZmVyCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAAAlZb3UgbmVlZCAFAAAADHRva2VuQXNzZXRJZAIAAAATIHRvIHBsYXkgdGhpcyBnYW1lLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlefzt6Y8=", "height": 1434391, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
OldNewDifferences
1-# no script
1+{-# STDLIB_VERSION 3 #-}
2+{-# SCRIPT_TYPE ACCOUNT #-}
3+{-# CONTENT_TYPE DAPP #-}
4+let dAppAddres = "F9DCGiYgT8yvBq1AQFcSpGG4p8sdzNz9mZczDvJ45LL"
5+
6+let tokenAssetId = "5ih9jd4KV9kSey55yvKMgLSHcwsYYkQ4pRDJtRNoxUhy"
7+
8+let useGarlicCoin = false
9+
10+let tokensPerPlay = 10000000
11+
12+let lotteryamount = "_amount"
13+
14+let lotteryprobability = "_probability"
15+
16+let lotteryprobabilitydecimal = "_probability_decimal"
17+
18+let lotteryWinningAddress = "_winning_address"
19+
20+let lotteryPrice = "_price"
21+
22+let lotteryPrices = "_lottery_prices"
23+
24+let lotteryAssetId = "_lottery_asset_id"
25+
26+let countOfPrices = "_count_prices"
27+
28+let lastHashRandomNumber = "last_spin_random_hash"
29+
30+let allowSizeLottery = 3
31+
32+let totalPricesInPool = "total_prizes_pool"
33+
34+let tokenAId = "f2MzwrmN5wiMn5DwbBL33247fdsf432FV9kSe"
35+
36+let tokenBId = "f1MzwrmN4wiMn4DwbBL43242fsdf434Ffsdfs"
37+
38+let tokenCId = "f3MzwrmN4wiMn5DsdBL436542fsdf434Ffsdw"
39+
40+func randomizer (inv) = {
41+ let lastPlay = match getBinary(this, lastHashRandomNumber) {
42+ case s: ByteVector =>
43+ s
44+ case _: Unit =>
45+ base58'2ee4oFDYriWJ9EMeR'
46+ case _ =>
47+ throw("Match error")
48+ }
49+ let rand = (((((lastPlay + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
50+ sha256(rand)
51+ }
52+
53+
54+func getPriceArray () = {
55+ let currentPrices = match getString(this, lotteryPrices) {
56+ case a: String =>
57+ a
58+ case _: Unit =>
59+ ""
60+ case _ =>
61+ throw("Match error")
62+ }
63+ let sizePrices = size(currentPrices)
64+ if ((sizePrices == 0))
65+ then nil
66+ else {
67+ let trimPrices = take(currentPrices, (size(currentPrices) - 1))
68+ let newArray = split(trimPrices, ",")
69+ newArray
70+ }
71+ }
72+
73+
74+func getCurrentBalance () = if ((useGarlicCoin == true))
75+ then assetBalance(this, fromBase58String(tokenAssetId))
76+ else wavesBalance(this)
77+
78+
79+func procedLottery (win,token) = if (if (isDefined(token))
80+ then true
81+ else (token != ""))
82+ then {
83+ let tokenProbability = getIntegerValue(this, (token + lotteryprobability))
84+ let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal))
85+ let sizeOfWin = size(win)
86+ if ((sizeOfWin == 1))
87+ then {
88+ let randomNumber = win[0]
89+ let convertedRandomNumber = fromBase64String(randomNumber)
90+ let convertedDecimalNumber = (tokenProbabilityDecimal * 1000)
91+ let comparisonNumber = (toInt(convertedRandomNumber) % convertedDecimalNumber)
92+ if ((tokenProbability > comparisonNumber))
93+ then token :: win
94+ else win
95+ }
96+ else win
97+ }
98+ else win
99+
100+
101+@Callable(i)
102+func setGarlicCoinLottery () = {
103+ let balance = getCurrentBalance()
104+ if ((69 > balance))
105+ then throw("Not enought Amount")
106+ else {
107+ let storedTokensValues = (((((tokenAId + ",") + tokenBId) + ",") + tokenCId) + ",")
108+ if (useGarlicCoin)
109+ then {
110+ let updateLotteryPool = WriteSet([DataEntry((tokenAId + lotteryprobability), 69), DataEntry((tokenAId + lotteryPrice), 69), DataEntry((tokenAId + lotteryprobabilitydecimal), 100000), DataEntry((tokenAId + lotteryAssetId), tokenAssetId), DataEntry((tokenBId + lotteryprobability), 69), DataEntry((tokenBId + lotteryPrice), 6900000000), DataEntry((tokenBId + lotteryprobabilitydecimal), 10000), DataEntry((tokenBId + lotteryAssetId), tokenAssetId), DataEntry((tokenCId + lotteryprobability), 69), DataEntry((tokenCId + lotteryPrice), 690000000), DataEntry((tokenCId + lotteryprobabilitydecimal), 1000), DataEntry((tokenCId + lotteryAssetId), tokenAssetId), DataEntry(lotteryPrices, storedTokensValues), DataEntry(countOfPrices, 3)])
111+ ScriptResult(updateLotteryPool, TransferSet(nil))
112+ }
113+ else {
114+ let updateLotteryPool = WriteSet([DataEntry((tokenAId + lotteryprobability), 69), DataEntry((tokenAId + lotteryPrice), 69), DataEntry((tokenAId + lotteryprobabilitydecimal), 100000), DataEntry((tokenAId + lotteryAssetId), ""), DataEntry((tokenBId + lotteryamount), 6900000000), DataEntry((tokenBId + lotteryprobability), 69), DataEntry((tokenBId + lotteryPrice), 6900000000), DataEntry((tokenBId + lotteryprobabilitydecimal), 10000), DataEntry((tokenBId + lotteryAssetId), ""), DataEntry((tokenCId + lotteryprobability), 69), DataEntry((tokenCId + lotteryPrice), 690000000), DataEntry((tokenCId + lotteryprobabilitydecimal), 1), DataEntry((tokenCId + lotteryAssetId), ""), DataEntry(lotteryPrices, storedTokensValues), DataEntry(countOfPrices, 3)])
115+ ScriptResult(updateLotteryPool, TransferSet(nil))
116+ }
117+ }
118+ }
119+
120+
121+
122+@Callable(i)
123+func startlotto () = {
124+ let paymentIsDefined = if (!(isDefined(i.payment)))
125+ then false
126+ else true
127+ if ((paymentIsDefined == true))
128+ then {
129+ let pmt = extract(i.payment)
130+ if (isDefined(pmt.assetId))
131+ then if ((pmt.amount != tokensPerPlay))
132+ then throw("Incorrect asset passed or incorrect quantity passed")
133+ else if ((fromBase58String(tokenAssetId) != pmt.assetId))
134+ then throw("Incorrect asset passed or incorrect quantity passed")
135+ else {
136+ let currentKey = toBase58String(i.caller.bytes)
137+ let randhash = randomizer(i)
138+ let priceList = getPriceArray()
139+ let randNumber = toBase64String(randhash)
140+ let listWinningPrices = [randNumber]
141+ let winningToken = {
142+ let $list67446796 = priceList
143+ let $size67446796 = size($list67446796)
144+ let $acc067446796 = listWinningPrices
145+ if (($size67446796 == 0))
146+ then $acc067446796
147+ else {
148+ let $acc167446796 = procedLottery($acc067446796, $list67446796[0])
149+ if (($size67446796 == 1))
150+ then $acc167446796
151+ else {
152+ let $acc267446796 = procedLottery($acc167446796, $list67446796[1])
153+ if (($size67446796 == 2))
154+ then $acc267446796
155+ else {
156+ let $acc367446796 = procedLottery($acc267446796, $list67446796[2])
157+ if (($size67446796 == 3))
158+ then $acc367446796
159+ else {
160+ let $acc467446796 = procedLottery($acc367446796, $list67446796[3])
161+ throw("List size exceed 3")
162+ }
163+ }
164+ }
165+ }
166+ }
167+ let sizeOfWinPrices = size(winningToken)
168+ if ((sizeOfWinPrices == 1))
169+ then {
170+ let writeSets = WriteSet([DataEntry("message", "<h1>Better luck next time!</h1><br><p>Invite more friends to keep playing!<p>"), DataEntry(lastHashRandomNumber, randNumber)])
171+ ScriptResult(writeSets, TransferSet(nil))
172+ }
173+ else {
174+ let token = winningToken[0]
175+ let callerAddress = toBase58String(i.caller.bytes)
176+ let addressBalance = getCurrentBalance()
177+ if ((addressBalance == 0))
178+ then throw("Not Enough Garlic Coin")
179+ else if ((token == tokenAId))
180+ then {
181+ let lotteryPriceTokenA = match getInteger(this, (tokenAId + lotteryPrice)) {
182+ case t: Int =>
183+ t
184+ case _: Unit =>
185+ 0
186+ case _ =>
187+ throw("Match error")
188+ }
189+ let winningAmount = (lotteryPriceTokenA * addressBalance)
190+ let writeSets = WriteSet([DataEntry((token + lotteryamount), winningAmount), DataEntry((token + lotteryWinningAddress), callerAddress), DataEntry(lastHashRandomNumber, randNumber), DataEntry("message", (((("<h1>Congratulations you won!</h1><br><p>You have won " + toString(winningAmount)) + " ") + token) + "!<p>"))])
191+ if (useGarlicCoin)
192+ then {
193+ let winTransfer = TransferSet([ScriptTransfer(i.caller, winningAmount, fromBase58String(tokenAssetId))])
194+ ScriptResult(writeSets, winTransfer)
195+ }
196+ else {
197+ let winTransfer = TransferSet([ScriptTransfer(i.caller, winningAmount, unit)])
198+ ScriptResult(writeSets, winTransfer)
199+ }
200+ }
201+ else {
202+ let lotteryPriceTokenB = match getInteger(this, (token + lotteryprobability)) {
203+ case t: Int =>
204+ t
205+ case _: Unit =>
206+ 0
207+ case _ =>
208+ throw("Match error")
209+ }
210+ let writeSets = WriteSet([DataEntry((token + lotteryamount), lotteryPriceTokenB), DataEntry(lastHashRandomNumber, randNumber), DataEntry((token + lotteryWinningAddress), callerAddress), DataEntry("message", (((("<h1>Congratulations you won!</h1><br><p>You have won " + toString(lotteryPriceTokenB)) + " ") + token) + "!<p>"))])
211+ if (useGarlicCoin)
212+ then {
213+ let winTransfer = TransferSet([ScriptTransfer(i.caller, lotteryPriceTokenB, fromBase58String(tokenAssetId))])
214+ ScriptResult(writeSets, winTransfer)
215+ }
216+ else {
217+ let winTransfer = TransferSet([ScriptTransfer(i.caller, lotteryPriceTokenB, unit)])
218+ ScriptResult(writeSets, winTransfer)
219+ }
220+ }
221+ }
222+ }
223+ else if ((pmt.amount != tokensPerPlay))
224+ then throw("Incorrect asset passed or incorrect quantity passed")
225+ else {
226+ let currentKey = toBase58String(i.caller.bytes)
227+ let randhash = randomizer(i)
228+ let priceList = getPriceArray()
229+ let randNumber = toBase64String(randhash)
230+ let listWinningPrices = [randNumber]
231+ let winningToken = {
232+ let $list1188111933 = priceList
233+ let $size1188111933 = size($list1188111933)
234+ let $acc01188111933 = listWinningPrices
235+ if (($size1188111933 == 0))
236+ then $acc01188111933
237+ else {
238+ let $acc11188111933 = procedLottery($acc01188111933, $list1188111933[0])
239+ if (($size1188111933 == 1))
240+ then $acc11188111933
241+ else {
242+ let $acc21188111933 = procedLottery($acc11188111933, $list1188111933[1])
243+ if (($size1188111933 == 2))
244+ then $acc21188111933
245+ else {
246+ let $acc31188111933 = procedLottery($acc21188111933, $list1188111933[2])
247+ if (($size1188111933 == 3))
248+ then $acc31188111933
249+ else {
250+ let $acc41188111933 = procedLottery($acc31188111933, $list1188111933[3])
251+ throw("List size exceed 3")
252+ }
253+ }
254+ }
255+ }
256+ }
257+ let sizeOfWinPrices = size(winningToken)
258+ if ((sizeOfWinPrices == 1))
259+ then {
260+ let writeSets = WriteSet([DataEntry("message", "<h1>Better luck next time!</h1><br><p>Invite more friends to keep playing!<p>"), DataEntry(lastHashRandomNumber, randNumber)])
261+ ScriptResult(writeSets, TransferSet(nil))
262+ }
263+ else {
264+ let token = winningToken[0]
265+ let callerAddress = toBase58String(i.caller.bytes)
266+ let addressBalance = getCurrentBalance()
267+ if ((addressBalance == 0))
268+ then throw("Not Enough Garlic Coin")
269+ else if ((token == tokenAId))
270+ then {
271+ let lotteryPriceTokenA = match getInteger(this, (tokenAId + lotteryPrice)) {
272+ case t: Int =>
273+ t
274+ case _: Unit =>
275+ 0
276+ case _ =>
277+ throw("Match error")
278+ }
279+ let winningAmount = (lotteryPriceTokenA * addressBalance)
280+ let writeSets = WriteSet([DataEntry((token + lotteryamount), winningAmount), DataEntry((token + lotteryWinningAddress), callerAddress), DataEntry(lastHashRandomNumber, randNumber), DataEntry("message", (((("<h1>Congratulations you won!</h1><br><p>You have won " + toString(winningAmount)) + " ") + token) + "!<p>"))])
281+ if (useGarlicCoin)
282+ then {
283+ let winTransfer = TransferSet([ScriptTransfer(i.caller, winningAmount, fromBase58String(tokenAssetId))])
284+ ScriptResult(writeSets, winTransfer)
285+ }
286+ else {
287+ let winTransfer = TransferSet([ScriptTransfer(i.caller, winningAmount, unit)])
288+ ScriptResult(writeSets, winTransfer)
289+ }
290+ }
291+ else {
292+ let lotteryPriceTokenB = match getInteger(this, (token + lotteryprobability)) {
293+ case t: Int =>
294+ t
295+ case _: Unit =>
296+ 0
297+ case _ =>
298+ throw("Match error")
299+ }
300+ let writeSets = WriteSet([DataEntry((token + lotteryamount), lotteryPriceTokenB), DataEntry(lastHashRandomNumber, randNumber), DataEntry((token + lotteryWinningAddress), callerAddress), DataEntry("message", (((("<h1>Congratulations you won!</h1><br><p>You have won " + toString(lotteryPriceTokenB)) + " ") + token) + "!<p>"))])
301+ if (useGarlicCoin)
302+ then {
303+ let winTransfer = TransferSet([ScriptTransfer(i.caller, lotteryPriceTokenB, fromBase58String(tokenAssetId))])
304+ ScriptResult(writeSets, winTransfer)
305+ }
306+ else {
307+ let winTransfer = TransferSet([ScriptTransfer(i.caller, lotteryPriceTokenB, unit)])
308+ ScriptResult(writeSets, winTransfer)
309+ }
310+ }
311+ }
312+ }
313+ }
314+ else throw((("You need " + tokenAssetId) + " to play this game."))
315+ }
316+
317+
318+@Verifier(tx)
319+func verify () = match tx {
320+ case _ =>
321+ sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
322+}
323+

github/deemru/w8io/169f3d6 
25.53 ms