tx · 53KeKKBTbngaqKrG5jMUk3dpMp6wm6MiPBGCXKi6G4uf

3MuMTmGoACSiyXJzcioMw4sYoXk2Ui4aanJ:  -0.01700000 Waves

2022.08.31 00:15 [2207709] smart account 3MuMTmGoACSiyXJzcioMw4sYoXk2Ui4aanJ > SELF 0.00000000 Waves

{ "type": 13, "id": "53KeKKBTbngaqKrG5jMUk3dpMp6wm6MiPBGCXKi6G4uf", "fee": 1700000, "feeAssetId": null, "timestamp": 1661894217046, "version": 2, "chainId": 84, "sender": "3MuMTmGoACSiyXJzcioMw4sYoXk2Ui4aanJ", "senderPublicKey": "7opDBgjwGmchRaJn7irNojWPe6uCjvWZc3JGS9FGsd9p", "proofs": [ "WKcdTqxoQxqivUd31JAzbHoPGgZprUuWoTA8erSvR2VPkKeqxFcRocaQjtM33mqAYX8w76Xo3E1QE5zRp1Vxcgp" ], "script": "base64:AAIEAAAAAAAAAAYIAhIAEgAAAAAeAAAAAAlnYW1lVG9rZW4BAAAAIJeJnkMy+NLP5OT6k3WKNNG/oDTmgYr0XJzGEku3CrKZAAAAABNnYW1lTWFzdGVyUHVibGljS2V5AQAAACBlJDgo+Fq7PRSc0ciebD/XFlx5Eoi6BjIFEFF4VxVLDwAAAAAXZ2FtZU1hc3RlclB1YmxpY0tleVRlc3QBAAAAIGUkOCj4Wrs9FJzRyJ5sP9cWXHkSiLoGMgUQUXhXFUsPAAAAAAx0b2tlbkFzc2V0SWQCAAAALEJDWUdwM3VmQVk2WVdHektZbWl0ckpTY0FDTjdKWmQzZnBmbWYyZmNYN3EyAAAAAAlnYW1lSW5kZXgCAAAABkdBUkxJQwAAAAAIdG9rZW5BSWQJAAEsAAAAAgkAASwAAAACBQAAAAlnYW1lSW5kZXgCAAAAAV8CAAAAFWYyTXdybU40ZmRzZjQzMkZWOWtTZQAAAAAIdG9rZW5CSWQJAAEsAAAAAgkAASwAAAACBQAAAAlnYW1lSW5kZXgCAAAAAV8CAAAAFWYxTXp3cm1OZGY0MzRGZnNkZ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mNhbGxlcgUAAAASbG90dGVyeVByaWNlVG9rZW5CCQACWQAAAAEFAAAADHRva2VuQXNzZXRJZAUAAAADbmlsCQAAAgAAAAECAAAAGkxhc3QgYmxvY2sgZG9lcyBub3QgZXhpc3QuCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAACJwYXltZW50IGlzIG5vdCBpbiBjb3JyZWN0IGFzc2V0SWQgCQACWAAAAAEFAAAACWdhbWVUb2tlbgIAAAABLgAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAEAAAAByRtYXRjaDAFAAAAAnR4CQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tlebTrxRo=", "height": 2207709, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: DjFXPaQdrcPYN4gz6aNTTiLZe19kFBaUUZBsPB7Ht2Nm Next: 2xgxCjwNKtkAC2PyYgMKVAw84dt8WW6oZk2G3GYgy5Ve Diff:
OldNewDifferences
158158 @Callable(i)
159159 func startGarlicLotto () = {
160160 let balance = getCurrentBalance()
161- let p = i.payments[0]
162- if ((10000000000 > balance))
161+ if ((1000000000000000 > balance))
163162 then throw("Amount is less than 100 GRLC, not enough Amount.")
164- else if (if ((size(i.payments) != 1))
165- then (100000000 > p.amount)
166- else false)
167- then throw((("Payment not attached or there is more then 1 payment attached with minimum 1 GRLC.[" + toString(tokensPerPlay)) + "-Int]"))
163+ else if ((size(i.payments) != 1))
164+ then throw("Payment not attached or there is more then 1 payment attached.")
168165 else {
166+ let p = i.payments[0]
169167 let totalBet = (p.amount + i.fee)
170168 if ((i.payments[0].assetId == gameToken))
171169 then match blockInfoByHeight((lastBlock.height - 1)) {
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 4 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 let gameToken = base58'BCYGp3ufAY6YWGzKYmitrJScACN7JZd3fpfmf2fcX7q2'
55
66 let gameMasterPublicKey = base58'7opDBgjwGmchRaJn7irNojWPe6uCjvWZc3JGS9FGsd9p'
77
88 let gameMasterPublicKeyTest = base58'7opDBgjwGmchRaJn7irNojWPe6uCjvWZc3JGS9FGsd9p'
99
1010 let tokenAssetId = "BCYGp3ufAY6YWGzKYmitrJScACN7JZd3fpfmf2fcX7q2"
1111
1212 let gameIndex = "GARLIC"
1313
1414 let tokenAId = ((gameIndex + "_") + "f2MwrmN4fdsf432FV9kSe")
1515
1616 let tokenBId = ((gameIndex + "_") + "f1MzwrmNdf434Ffsdfs-0")
1717
1818 let tokenCId = ((gameIndex + "_") + "f3MzwrmN4widf434Ffsdw")
1919
2020 let tokensPerPlay = 100000000
2121
2222 let lotteryprobability = "_probability"
2323
2424 let lotteryprobabilitydecimal = "_probability_decimal"
2525
2626 let lotteryWinningAddress = (gameIndex + "_winning_address")
2727
2828 let lotteryPrice = "_price"
2929
3030 let lotteryPrices = ((gameIndex + "_") + "lottery_prices")
3131
3232 let lotteryAssetId = ((gameIndex + "_") + "lottery_asset_id")
3333
3434 let countOfPrices = ((gameIndex + "_") + "garlic_count_prices")
3535
3636 let gameSpinLabel = ((gameIndex + "_") + "SPIN_COUNTER")
3737
3838 let allowSizeLottery = 3
3939
4040 let totalPricesInPool = ((gameIndex + "_") + "total_prizes_pool")
4141
4242 func checkPermission (callerPublicKey) = (callerPublicKey != gameMasterPublicKey)
4343
4444
4545 func gameSumShaLabel (spin) = (((gameIndex + "_") + toString(spin)) + "_SPIN_RANDOM_HASH")
4646
4747
4848 func gameGetSumSha (spin) = getString(this, gameSumShaLabel(spin))
4949
5050
5151 func gameSpinNumber () = getInteger(this, gameSpinLabel)
5252
5353
5454 let listRandomHash = ["V2F2ZXNMb3R0b1Yy", "V2F2ZXNMb3R0b1Yy", "V2F2ZXNMb3R0b1Yy", "pdHlFeGNoYW5nZVYy", "pdHlFeGNoY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1Yy", "V2F2ZXNUZWFtVjI", "V2F2ZXNUZWFtVjI", "TWF2ZXNNb3Nzb1Yy", "TWF2ZXNNb3Nzb1Yy", "TWF2ZXNNb3Nzb1Yy", "V2F2ZXNUZWFtVjI", "V2F2ZXNUZWFtVjI"]
5555
5656 func randomizer (inv,lastPlayHash) = {
5757 let rand = (((((lastPlayHash + inv.transactionId) + inv.callerPublicKey) + lastBlock.generationSignature) + toBytes(lastBlock.timestamp)) + toBytes(lastBlock.height))
5858 sha256(rand)
5959 }
6060
6161
6262 func getNumberDecimal (number) = if ((number == 1))
6363 then "0.0"
6464 else if ((number == 2))
6565 then "0.00"
6666 else if ((number == 3))
6767 then "0.000"
6868 else if ((number == 4))
6969 then "0.0000"
7070 else if ((number == 5))
7171 then "0.00000"
7272 else if ((number == 6))
7373 then "0.000000"
7474 else if ((number == 7))
7575 then "0.0000000"
7676 else throw("exceed number")
7777
7878
7979 func getPriceArray () = {
8080 let currentPrices = match getString(this, lotteryPrices) {
8181 case a: String =>
8282 a
8383 case _: Unit =>
8484 ""
8585 case _ =>
8686 throw("Match error")
8787 }
8888 let sizePrices = size(currentPrices)
8989 if ((sizePrices == 0))
9090 then nil
9191 else {
9292 let trimPrices = take(currentPrices, (size(currentPrices) - 1))
9393 let newArray = split(trimPrices, ",")
9494 newArray
9595 }
9696 }
9797
9898
9999 func getCurrentBalance () = assetBalance(this, fromBase58String(tokenAssetId))
100100
101101
102102 func procedLottery (win,token) = if (if (isDefined(token))
103103 then true
104104 else (token != ""))
105105 then {
106106 let tokenProbability = getIntegerValue(this, (token + lotteryprobability))
107107 let tokenProbabilityDecimal = getIntegerValue(this, (token + lotteryprobabilitydecimal))
108108 let sizeOfWin = size(win)
109109 if ((sizeOfWin == 1))
110110 then {
111111 let randomNumber = win[0]
112112 let convertedRandomNumber = fromBase64String(randomNumber)
113113 let convertedDecimalNumber = (tokenProbabilityDecimal * 500)
114114 let comparisonNumber = (toInt(convertedRandomNumber) % convertedDecimalNumber)
115115 if ((tokenProbability > comparisonNumber))
116116 then token :: win
117117 else win
118118 }
119119 else win
120120 }
121121 else win
122122
123123
124124 func convertAmountToDecimalString (tokenAmount,decimalVal) = {
125125 let tokenAmountSize = size(toString(tokenAmount))
126126 if ((tokenAmountSize > decimalVal))
127127 then {
128128 let sufixAmount = takeRight(toString(tokenAmount), decimalVal)
129129 let prefixNumber = take(toString(tokenAmount), (size(toString(tokenAmount)) - decimalVal))
130130 let finaResult = ((prefixNumber + ".") + sufixAmount)
131131 finaResult
132132 }
133133 else if ((tokenAmountSize == decimalVal))
134134 then {
135135 let valTemp = (decimalVal - tokenAmountSize)
136136 let finalResult = ("0." + toString(tokenAmount))
137137 finalResult
138138 }
139139 else {
140140 let diffPriceAndDecimal = (decimalVal - tokenAmountSize)
141141 let prefixAmount = getNumberDecimal(diffPriceAndDecimal)
142142 let finalResult = (prefixAmount + toString(tokenAmount))
143143 finalResult
144144 }
145145 }
146146
147147
148148 @Callable(i)
149149 func setGarlicCoinLottery () = if (checkPermission(i.callerPublicKey))
150150 then throw((("initGame_FORBBIDEN, Only owner of Pubkey [" + toBase58String(gameMasterPublicKey)) + "] is allowded to Set Factors."))
151151 else {
152152 let storedTokensValues = (((((tokenAId + ",") + tokenBId) + ",") + tokenCId) + ",")
153153 [IntegerEntry((tokenAId + lotteryprobability), 69), IntegerEntry((tokenAId + lotteryPrice), 69), IntegerEntry((tokenAId + lotteryprobabilitydecimal), 100), StringEntry((tokenAId + lotteryAssetId), tokenAssetId), IntegerEntry((tokenBId + lotteryprobability), 69), IntegerEntry((tokenBId + lotteryPrice), 6900000000), IntegerEntry((tokenBId + lotteryprobabilitydecimal), 10), StringEntry((tokenBId + lotteryAssetId), tokenAssetId), IntegerEntry((tokenCId + lotteryprobability), 69), IntegerEntry((tokenCId + lotteryPrice), 500000000), IntegerEntry((tokenCId + lotteryprobabilitydecimal), 1), StringEntry((tokenCId + lotteryAssetId), tokenAssetId), StringEntry(lotteryPrices, storedTokensValues), IntegerEntry(countOfPrices, 3), IntegerEntry(gameSpinLabel, 0)]
154154 }
155155
156156
157157
158158 @Callable(i)
159159 func startGarlicLotto () = {
160160 let balance = getCurrentBalance()
161- let p = i.payments[0]
162- if ((10000000000 > balance))
161+ if ((1000000000000000 > balance))
163162 then throw("Amount is less than 100 GRLC, not enough Amount.")
164- else if (if ((size(i.payments) != 1))
165- then (100000000 > p.amount)
166- else false)
167- then throw((("Payment not attached or there is more then 1 payment attached with minimum 1 GRLC.[" + toString(tokensPerPlay)) + "-Int]"))
163+ else if ((size(i.payments) != 1))
164+ then throw("Payment not attached or there is more then 1 payment attached.")
168165 else {
166+ let p = i.payments[0]
169167 let totalBet = (p.amount + i.fee)
170168 if ((i.payments[0].assetId == gameToken))
171169 then match blockInfoByHeight((lastBlock.height - 1)) {
172170 case previousBlock: BlockInfo =>
173171 let lastSpin = match gameSpinNumber() {
174172 case sp: Int =>
175173 sp
176174 case _: Unit =>
177175 throw("Garlic lottery has not been initialed yet- missing spin")
178176 case _ =>
179177 throw("Match error")
180178 }
181179 let randomNumberToPickup = (toInt(sha256((take(i.transactionId, 16) + take(lastBlock.generationSignature, 16)))) % 17728)
182180 let numberToPick = ((toInt(toBytes(pow(randomNumberToPickup, 0, 2, 0, 0, UP))) + lastSpin) % 64)
183181 let priceList = getPriceArray()
184182 let randomHashToSelect = match gameGetSumSha(randomNumberToPickup) {
185183 case hash: String =>
186184 hash
187185 case _ =>
188186 listRandomHash[numberToPick]
189187 }
190188 let randomHash = randomizer(i, toBytes(randomHashToSelect))
191189 let randNumber = toBase64String(randomHash)
192190 let tes = fromBase64String(randNumber)
193191 let listWinningPrices = [randNumber]
194192 let winningToken = {
195193 let $l = priceList
196194 let $s = size($l)
197195 let $acc0 = listWinningPrices
198196 func $f0_1 ($a,$i) = if (($i >= $s))
199197 then $a
200198 else procedLottery($a, $l[$i])
201199
202200 func $f0_2 ($a,$i) = if (($i >= $s))
203201 then $a
204202 else throw("List size exceeds 3")
205203
206204 $f0_2($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3)
207205 }
208206 let sizeOfWinPrices = size(winningToken)
209207 let divider = (500 * 1)
210208 let tas = (toInt(tes) % divider)
211209 if ((sizeOfWinPrices == 1))
212210 then [StringEntry("message", "<h1>Better luck next time!</h1><br><p>Invite more friends to keep playing!<p>"), StringEntry(gameSumShaLabel(numberToPick), toBase64String(randomHash)), IntegerEntry((toString((lastSpin + 1)) + "_last_hash_number"), tas), IntegerEntry((toString((lastSpin + 1)) + "_last_selected_number"), numberToPick), IntegerEntry(gameSpinLabel, (lastSpin + 1))]
213211 else {
214212 let token = winningToken[0]
215213 let callerAddress = toBase58String(i.caller.bytes)
216214 let addressBalance = getCurrentBalance()
217215 if ((addressBalance == 0))
218216 then throw("Not Enough Garlic Coin")
219217 else if ((token == tokenAId))
220218 then {
221219 let lotteryPriceTokenA = match getInteger(this, (tokenAId + lotteryPrice)) {
222220 case t: Int =>
223221 t
224222 case _: Unit =>
225223 0
226224 case _ =>
227225 throw("Match error")
228226 }
229227 let winningAmount = ((lotteryPriceTokenA * addressBalance) / 100)
230228 let tokenDecimal = match assetInfo(fromBase58String(tokenAssetId)) {
231229 case asset: Asset =>
232230 asset.decimals
233231 case _: Unit =>
234232 throw("Can't find asset")
235233 case _ =>
236234 throw("Match error")
237235 }
238236 let convertedPrice = convertAmountToDecimalString(winningAmount, tokenDecimal)
239237 [StringEntry((token + lotteryWinningAddress), callerAddress), StringEntry(gameSumShaLabel(numberToPick), toBase64String(randomHash)), IntegerEntry(gameSpinLabel, (lastSpin + 1)), StringEntry("message", (((("<h1>Congratulations you won!</h1><br><p>You have won " + convertedPrice) + " ") + tokenAssetId) + "!<p>")), ScriptTransfer(i.caller, winningAmount, fromBase58String(tokenAssetId))]
240238 }
241239 else {
242240 let lotteryPriceTokenB = match getInteger(this, (token + lotteryPrice)) {
243241 case t: Int =>
244242 t
245243 case _: Unit =>
246244 0
247245 case _ =>
248246 throw("Match error")
249247 }
250248 let tokenDecimal = match assetInfo(fromBase58String(tokenAssetId)) {
251249 case asset: Asset =>
252250 asset.decimals
253251 case _: Unit =>
254252 throw("Can't find asset")
255253 case _ =>
256254 throw("Match error")
257255 }
258256 let convertedPrice = convertAmountToDecimalString(lotteryPriceTokenB, tokenDecimal)
259257 [StringEntry((token + lotteryWinningAddress), callerAddress), StringEntry(gameSumShaLabel(numberToPick), toBase64String(randomHash)), IntegerEntry(gameSpinLabel, (lastSpin + 1)), StringEntry("message", (((("<h1>Congratulations you won!</h1><br><p>You have won " + convertedPrice) + " ") + tokenAssetId) + "!<p>")), ScriptTransfer(i.caller, lotteryPriceTokenB, fromBase58String(tokenAssetId))]
260258 }
261259 }
262260 case _ =>
263261 throw("Last block does not exist.")
264262 }
265263 else throw((("payment is not in correct assetId " + toBase58String(gameToken)) + "."))
266264 }
267265 }
268266
269267
270268 @Verifier(tx)
271269 func verify () = match tx {
272270 case _ =>
273271 sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)
274272 }
275273

github/deemru/w8io/169f3d6 
67.10 ms