tx · HAdZhQHXcBuMTHcxmdENfNqj7mCTa62UsPb7xTBDSExr

3MrfLFw1uz3BDr45RQLvrRnAwT2nHpB4KiX:  -0.01000000 Waves

2023.06.09 12:10 [2614936] smart account 3MrfLFw1uz3BDr45RQLvrRnAwT2nHpB4KiX > SELF 0.00000000 Waves

{ "type": 13, "id": "HAdZhQHXcBuMTHcxmdENfNqj7mCTa62UsPb7xTBDSExr", "fee": 1000000, "feeAssetId": null, "timestamp": 1686301874552, "version": 2, "chainId": 84, "sender": "3MrfLFw1uz3BDr45RQLvrRnAwT2nHpB4KiX", "senderPublicKey": "5iiNX4Sz3qZzcerumQLc1y7u9TH2X46jDV4f9Xivtmtv", "proofs": [ "37NJXTB8sujXYm41qAxyTmwwp4ReByuTu8vRxzcYPWSx8K5w55nZr9UXUBGGKJHXw28XwCJiJLb6cYLuMpqQLra4" ], "script": "base64:BgIPCAISBQoDAREIEgASABIAGAEKbnVtVG9XYXZlcwEDbnVtCQBoAgUDbnVtAIDC1y8BC2lzUGF5bWVudE9rAgFpA3N1bQQRYWNjZXB0YWJsZUFzc2V0SWQBBBOr2TMEAXAJAJEDAggFAWkIcGF5bWVudHMAAAMJAGcCCAUBcAZhbW91bnQJAQpudW1Ub1dhdmVzAQUDc3VtCQAAAggFAXAHYXNzZXRJZAUEdW5pdAcBC21hcEludFRvU3RyAgVhY2N1bQRuZXh0CQDMCAIJAKQDAQUEbmV4dAUFYWNjdW0BC21hcFN0clRvSW50AgVhY2N1bQRuZXh0CQDMCAIJAQ1wYXJzZUludFZhbHVlAQUEbmV4dAUFYWNjdW0BC21hcEludFRvU3VtAgVhY2N1bQRuZXh0CQBkAgUFYWNjdW0FBG5leHQBDGxpc3RJbnRUb1N1bQEDYXJyCgACJGwFA2FycgoAAiRzCQCQAwEFAiRsCgAFJGFjYzAAAAoBBSRmMF8xAgIkYQIkaQMJAGcCBQIkaQUCJHMFAiRhCQELbWFwSW50VG9TdW0CBQIkYQkAkQMCBQIkbAUCJGkKAQU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aWwAeN5wPA==", "height": 2614936, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 7X3s7MCHqwL7NQ9qUZGLnHDksg4TpvCWJig9o9qma95A Next: GjcSFpQG3FCdCnCL8Avd5k5jxkLcW2nVKmYPSbgT5eQG Diff:
OldNewDifferences
197197 then throw((("Wait " + toString((commitHeight - height))) + " blocks to reveal this id"))
198198 else {
199199 let revealBlock = valueOrErrorMessage(blockInfoByHeight(commitHeight), "unexcpected error")
200+ let revealBlockMin1 = valueOrErrorMessage(blockInfoByHeight((commitHeight - 10)), "unexcpected error")
200201 let vrf = valueOrErrorMessage(revealBlock.vrf, "unexcpected error")
202+ let vrfMin1 = valueOrErrorMessage(revealBlockMin1.vrf, "unexcpected error")
201203 let randomHash = sha256(value(vrf))
202- let randomNumber = (toInt(randomHash, 16) % 37)
204+ let randomHashMin1 = sha256(value(vrfMin1))
205+ let hash = (toInt(randomHash, 16) - (toInt(randomHashMin1, 16) * toInt(randomHash, 16)))
206+ let randomNumber = (hash % 37)
203207 let winningAmount = numToWaves(R_WinCalculator(randomNumber, betAmount, selectedNumbers, direction))
204208 let logStr = ((((((((("| commitHeight: " + toString(commitHeight)) + " | betAmount: ") + toString(betAmount)) + " | winningAmount: ") + toString(winningAmount)) + " | selectedNumbers: ") + listIntCompressToString(selectedNumbers)) + " | randomNumber: ") + toString(randomNumber))
205209 let statusStr = ((((((((("| status: reveal | winningAmount: " + toString(winningAmount)) + " | selectedNumbers: ") + listIntCompressToString(selectedNumbers)) + " | randomNumber: ") + toString(randomNumber)) + " | betAmount: ") + toString(betAmount)) + " | selectedNumbers: ") + listIntCompressToString(selectedNumbers))
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 6 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44 func numToWaves (num) = (num * 100000000)
55
66
77 func isPaymentOk (i,sum) = {
88 let acceptableAssetId = base58'WAVES'
99 let p = i.payments[0]
1010 if ((p.amount >= numToWaves(sum)))
1111 then (p.assetId == unit)
1212 else false
1313 }
1414
1515
1616 func mapIntToStr (accum,next) = toString(next) :: accum
1717
1818
1919 func mapStrToInt (accum,next) = parseIntValue(next) :: accum
2020
2121
2222 func mapIntToSum (accum,next) = (accum + next)
2323
2424
2525 func listIntToSum (arr) = {
2626 let $l = arr
2727 let $s = size($l)
2828 let $acc0 = 0
2929 func $f0_1 ($a,$i) = if (($i >= $s))
3030 then $a
3131 else mapIntToSum($a, $l[$i])
3232
3333 func $f0_2 ($a,$i) = if (($i >= $s))
3434 then $a
3535 else throw("List size exceeds 50")
3636
3737 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
3838 }
3939
4040
4141 func listIntToListString (arr) = {
4242 let $l = arr
4343 let $s = size($l)
4444 let $acc0 = nil
4545 func $f0_1 ($a,$i) = if (($i >= $s))
4646 then $a
4747 else mapIntToStr($a, $l[$i])
4848
4949 func $f0_2 ($a,$i) = if (($i >= $s))
5050 then $a
5151 else throw("List size exceeds 50")
5252
5353 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
5454 }
5555
5656
5757 func listStringToListIng (arr) = {
5858 let $l = arr
5959 let $s = size($l)
6060 let $acc0 = nil
6161 func $f0_1 ($a,$i) = if (($i >= $s))
6262 then $a
6363 else mapStrToInt($a, $l[$i])
6464
6565 func $f0_2 ($a,$i) = if (($i >= $s))
6666 then $a
6767 else throw("List size exceeds 50")
6868
6969 $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15), 16), 17), 18), 19), 20), 21), 22), 23), 24), 25), 26), 27), 28), 29), 30), 31), 32), 33), 34), 35), 36), 37), 38), 39), 40), 41), 42), 43), 44), 45), 46), 47), 48), 49), 50)
7070 }
7171
7272
7373 func listStringCompressToString (arr) = makeString(arr, "|")
7474
7575
7676 func stringDecompressToListString (str) = split(str, "|")
7777
7878
7979 func listIntCompressToString (arr) = makeString(listIntToListString(arr), "|")
8080
8181
8282 func stringDecompressToListInt (arrStr) = listStringToListIng(split(arrStr, "|"))
8383
8484
8585 func LW_getBetKey (i) = ("bet_LuckyWheel_" + toString(i.caller))
8686
8787
8888 func LW_getWonKey (i) = ("won_LuckyWheel_" + toString(i.caller))
8989
9090
9191 func LW_getRandomNumberKey (i) = ("randomNumber_LuckyWheel_" + toString(i.caller))
9292
9393
9494 func LW_getLogKey (i) = ((("log_LuckyWheel_" + toString(i.caller)) + "_") + toBase58String(i.transactionId))
9595
9696
9797 func LW_whatUserWon (value) = match value {
9898 case _ =>
9999 if ((1 == $match0))
100100 then numToWaves(2)
101101 else if ((3 == $match0))
102102 then numToWaves(1)
103103 else if ((7 == $match0))
104104 then numToWaves(6)
105105 else if ((9 == $match0))
106106 then numToWaves(1)
107107 else 0
108108 }
109109
110110
111111 func R_WinCalculator (randomNumber,betAmount,selectedNumberBets,betDirection) = {
112112 let RED_SECTORS = [32, 19, 21, 25, 34, 27, 36, 30, 23, 5, 16, 1, 14, 9, 18, 7, 12, 3]
113113 if (if ((size(selectedNumberBets) == 1))
114114 then (betDirection == "num")
115115 else false)
116116 then if ((selectedNumberBets[0] == randomNumber))
117117 then (betAmount * 36)
118118 else 0
119119 else if ((size(selectedNumberBets) == 2))
120120 then if (containsElement(selectedNumberBets, randomNumber))
121121 then (betAmount * 18)
122122 else 0
123123 else if ((size(selectedNumberBets) == 3))
124124 then if (containsElement(selectedNumberBets, randomNumber))
125125 then (betAmount * 12)
126126 else 0
127127 else if ((size(selectedNumberBets) == 4))
128128 then if (containsElement(selectedNumberBets, randomNumber))
129129 then (betAmount * 9)
130130 else 0
131131 else if ((size(selectedNumberBets) == 12))
132132 then if (containsElement(selectedNumberBets, randomNumber))
133133 then (betAmount * 3)
134134 else 0
135135 else if ((betDirection == "red"))
136136 then if (containsElement(RED_SECTORS, randomNumber))
137137 then (betAmount * 2)
138138 else 0
139139 else if ((betDirection == "black"))
140140 then if (if (!(containsElement(RED_SECTORS, randomNumber)))
141141 then (randomNumber != 0)
142142 else false)
143143 then (betAmount * 2)
144144 else 0
145145 else if ((betDirection == "odd"))
146146 then if (((randomNumber % 2) != 0))
147147 then (betAmount * 2)
148148 else 0
149149 else if ((betDirection == "even"))
150150 then if (((randomNumber % 2) == 0))
151151 then (betAmount * 2)
152152 else 0
153153 else if ((size(selectedNumberBets) == 18))
154154 then if (containsElement(selectedNumberBets, randomNumber))
155155 then (betAmount * 2)
156156 else 0
157157 else 0
158158 }
159159
160160
161161 func R_getBetKey (i) = ("bet_Roulette_" + toString(i.caller))
162162
163163
164164 func R_getBetAmountKey (i) = ("betAmount_Roulette_" + toString(i.caller))
165165
166166
167167 func R_getSelectedNumbersKey (i) = ("selectedNumbers_Roulette_" + toString(i.caller))
168168
169169
170170 func R_getDirectionKey (i) = ("direction_Roulette_" + toString(i.caller))
171171
172172
173173 func R_getLogKey (i) = ((("log_Roulette_" + toString(i.caller)) + "_") + toBase58String(i.transactionId))
174174
175175
176176 func R_getStatusKey (i) = ("status_Roulette_" + toString(i.caller))
177177
178178
179179 @Callable(i)
180180 func Roulette_commit (betAmount,selectedNumberBets,betDirection) = {
181181 let p = i.payments[0]
182182 if (!(isPaymentOk(i, betAmount)))
183183 then throw("Wrong payment amount or asset!")
184184 else [IntegerEntry(R_getBetKey(i), (height + 1)), IntegerEntry(R_getBetAmountKey(i), betAmount), StringEntry(R_getSelectedNumbersKey(i), listIntCompressToString(selectedNumberBets)), StringEntry(R_getDirectionKey(i), betDirection), StringEntry(R_getStatusKey(i), ((((("| status: commit | revealBlock: " + toString((height + 1))) + " | betAmount: ") + toString(betAmount)) + " | selectedNumbers: ") + listIntCompressToString(selectedNumberBets)))]
185185 }
186186
187187
188188
189189 @Callable(i)
190190 func Roulette_reveal () = {
191191 let commitHeight = valueOrErrorMessage(getIntegerValue(R_getBetKey(i)), "Bet not found")
192192 let betAmount = valueOrErrorMessage(getIntegerValue(R_getBetAmountKey(i)), "Bet amount not found")
193193 let selectedNumbersStr = valueOrErrorMessage(getStringValue(R_getSelectedNumbersKey(i)), "Selected numbers not found")
194194 let direction = valueOrErrorMessage(getStringValue(R_getDirectionKey(i)), "Direction not found")
195195 let selectedNumbers = stringDecompressToListInt(selectedNumbersStr)
196196 if ((commitHeight > height))
197197 then throw((("Wait " + toString((commitHeight - height))) + " blocks to reveal this id"))
198198 else {
199199 let revealBlock = valueOrErrorMessage(blockInfoByHeight(commitHeight), "unexcpected error")
200+ let revealBlockMin1 = valueOrErrorMessage(blockInfoByHeight((commitHeight - 10)), "unexcpected error")
200201 let vrf = valueOrErrorMessage(revealBlock.vrf, "unexcpected error")
202+ let vrfMin1 = valueOrErrorMessage(revealBlockMin1.vrf, "unexcpected error")
201203 let randomHash = sha256(value(vrf))
202- let randomNumber = (toInt(randomHash, 16) % 37)
204+ let randomHashMin1 = sha256(value(vrfMin1))
205+ let hash = (toInt(randomHash, 16) - (toInt(randomHashMin1, 16) * toInt(randomHash, 16)))
206+ let randomNumber = (hash % 37)
203207 let winningAmount = numToWaves(R_WinCalculator(randomNumber, betAmount, selectedNumbers, direction))
204208 let logStr = ((((((((("| commitHeight: " + toString(commitHeight)) + " | betAmount: ") + toString(betAmount)) + " | winningAmount: ") + toString(winningAmount)) + " | selectedNumbers: ") + listIntCompressToString(selectedNumbers)) + " | randomNumber: ") + toString(randomNumber))
205209 let statusStr = ((((((((("| status: reveal | winningAmount: " + toString(winningAmount)) + " | selectedNumbers: ") + listIntCompressToString(selectedNumbers)) + " | randomNumber: ") + toString(randomNumber)) + " | betAmount: ") + toString(betAmount)) + " | selectedNumbers: ") + listIntCompressToString(selectedNumbers))
206210 if ((winningAmount > 0))
207211 then [DeleteEntry(R_getBetKey(i)), DeleteEntry(R_getBetAmountKey(i)), DeleteEntry(R_getSelectedNumbersKey(i)), DeleteEntry(R_getDirectionKey(i)), ScriptTransfer(i.caller, winningAmount, unit), StringEntry(R_getLogKey(i), logStr), StringEntry(R_getStatusKey(i), statusStr)]
208212 else [DeleteEntry(R_getBetKey(i)), DeleteEntry(R_getBetAmountKey(i)), DeleteEntry(R_getSelectedNumbersKey(i)), DeleteEntry(R_getDirectionKey(i)), IntegerEntry(R_getLogKey(i), winningAmount), StringEntry(R_getLogKey(i), logStr), StringEntry(R_getStatusKey(i), statusStr)]
209213 }
210214 }
211215
212216
213217
214218 @Callable(i)
215219 func LuckyWheel_commit () = if (!(isPaymentOk(i, 1)))
216220 then throw("Wrong payment amount or asset")
217221 else [IntegerEntry(LW_getBetKey(i), (height + 1)), DeleteEntry(LW_getRandomNumberKey(i)), DeleteEntry(LW_getWonKey(i))]
218222
219223
220224
221225 @Callable(i)
222226 func LuckyWheel_reveal () = {
223227 let commitHeight = valueOrErrorMessage(getIntegerValue(LW_getBetKey(i)), "Bet not found")
224228 if ((commitHeight > height))
225229 then throw((("Wait " + toString((commitHeight - height))) + " blocks to reveal this id"))
226230 else {
227231 let revealBlock = valueOrErrorMessage(blockInfoByHeight(commitHeight), "unexcpected error")
228232 let vrf = valueOrErrorMessage(revealBlock.vrf, "unexcpected error")
229233 let randomHash = sha256(value(vrf))
230234 let randomNumber = (toInt(randomHash, 16) % 12)
231235 let winningAmount = LW_whatUserWon(randomNumber)
232236 let logStr = ((((((("| caller: " + toString(i.caller)) + " | winningAmount: ") + toString(winningAmount)) + " | randomNumber: ") + toString(randomNumber)) + " | commitHeight: ") + toString(commitHeight))
233237 if ((winningAmount > 0))
234238 then [DeleteEntry(LW_getBetKey(i)), ScriptTransfer(i.caller, winningAmount, unit), IntegerEntry(LW_getWonKey(i), winningAmount), IntegerEntry(LW_getRandomNumberKey(i), randomNumber), StringEntry(LW_getLogKey(i), logStr)]
235239 else [DeleteEntry(LW_getBetKey(i)), IntegerEntry(LW_getWonKey(i), winningAmount), IntegerEntry(LW_getRandomNumberKey(i), randomNumber), StringEntry(LW_getLogKey(i), logStr)]
236240 }
237241 }
238242
239243

github/deemru/w8io/026f985 
61.21 ms