tx · Ezhozijervr4gJUuVviNqWRa8CRFv84pvmfTspwe13uf 3MqQ9ihYKGehfUnXYf5WmkYSZUD71ByeCQe: -0.01500000 Waves 2019.07.17 09:54 [589505] smart account 3MqQ9ihYKGehfUnXYf5WmkYSZUD71ByeCQe > SELF 0.00000000 Waves
{ "type": 13, "id": "Ezhozijervr4gJUuVviNqWRa8CRFv84pvmfTspwe13uf", "fee": 1500000, "feeAssetId": null, "timestamp": 1563346518403, "version": 1, "sender": "3MqQ9ihYKGehfUnXYf5WmkYSZUD71ByeCQe", "senderPublicKey": "HcUXEkA9JTGp78LcTKsu4FmEpbDmnqntL4aMNLx1BHMB", "proofs": [ "3XoEsdNFcL4u63H9VN7gQxgyjRbwbfoKS9RgVBzLFRGTa1omaQoBEkicX2kb49C9q3zcY4kzvmvM8SozEha1Lwg7" ], "script": "base64:AAIDAAAAAAAAAAAAAABBAAAAAAlSU0FQVUJMSUMJAAJbAAAAAQIAAAGPYmFzZTY0Ok1JSUJJakFOQmdrcWhraUc5dzBCQVFFRkFBT0NBUThBTUlJQkNnS0NBUUVBbXB1WGNJL280cElCNXl3djlET09HYXBUQlV3UlZsTS82K0g2aEZlbE9YdGtyd1kvWUl0bVB4RURwejdyQWVyUVBRZTl0RFBFYUF2L0dubEV6dHliT0ZYZ3U5RHpEZThZb01SRDF2YWtnb0Fjb2dtYlk1OFFENktNajVIa29Wai95VE5JYzlzemo1cWhJbHJBZG1iM0tMTDZoUVU3eTgrSmo2OUJXVlBzYVFna3NwU2RlWXRiMXRIUWM3dDk1bjdPWjU2cjJBN0czK2JRZjZuU01rUGtBaElyRXBiQ201OG9pR0JjemRUZC9McUZTVm90WnNiTDdZaDZTSExmbkhlRCtRZ2NmSnJuYW04T0hNR0pFSlRSWGpJTGVIR2psUkNQOG9WcGlvSHJ5MVMyeFB4NXNWekltMk1NK0N6WWVuQUdsbzBqMjZhdEJoaVVMb1R1bHdEM3BRSURBUUFCAAAAAAZTRVJWRVIJAQAAABxAZXh0clVz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0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABmdhbWVJZAUAAAAObmV3R2FtZURhdGFTdHIJAARMAAAAAgUAAAARZGVjcmVhc2VkUmVzZXJ2ZXMFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAADCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAA3R0eAUAAAAHJG1hdGNoMAkAAGcAAAACCQAAZQAAAAIJAQAAAAx3YXZlc0JhbGFuY2UAAAABBQAAAAR0aGlzCAUAAAADdHR4AAAABmFtb3VudAkBAAAAEkV4dHJhY3RSZXNlcnZlZEFtdAAAAAADCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAFFNldFNjcmlwdFRyYW5zYWN0aW9uBAAAAANzdHgFAAAAByRtYXRjaDAGBwfr9HtM", "chainId": 84, "height": 589505, "spentComplexity": 0 } View: original | compacted Prev: BqjVLajQ1eZvxnPAM5w9MjxinzjhyiYYYX2mLK3FYukn Next: B5sh5eCzMdCK9paWDLCYPuA5K58YRVhyZedKNwx1fbiW Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let RSAPUBLIC = fromBase64String("base64: | |
4 | + | let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmpuXcI/o4pIB5ywv9DOOGapTBUwRVlM/6+H6hFelOXtkrwY/YItmPxEDpz7rAerQPQe9tDPEaAv/GnlEztybOFXgu9DzDe8YoMRD1vakgoAcogmbY58QD6KMj5HkoVj/yTNIc9szj5qhIlrAdmb3KLL6hQU7y8+Jj69BWVPsaQgkspSdeYtb1tHQc7t95n7OZ56r2A7G3+bQf6nSMkPkAhIrEpbCm58oiGBczdTd/LqFSVotZsbL7Yh6SHLfnHeD+QgcfJrnam8OHMGJEJTRXjILeHGjlRCP8oVpioHry1S2xPx5sVzIm2MM+CzYenAGlo0j26atBhiULoTulwD3pQIDAQAB") | |
5 | 5 | ||
6 | - | let SERVER = addressFromStringValue(" | |
6 | + | let SERVER = addressFromStringValue("3NCiG28LmWyTigWG13E5QnvdHBsZFYXSS2j") | |
7 | 7 | ||
8 | - | let RANDORACLETIMEFRAME = | |
8 | + | let RANDORACLETIMEFRAME = 4320 | |
9 | 9 | ||
10 | 10 | let WAVELET = ((100 * 1000) * 1000) | |
11 | 11 | ||
12 | 12 | let COMMISSION = ((5 * WAVELET) / 1000) | |
13 | 13 | ||
14 | - | let | |
14 | + | let BETMIN = ((1 * WAVELET) / 2) | |
15 | 15 | ||
16 | - | let | |
16 | + | let BETMAX = (6 * WAVELET) | |
17 | 17 | ||
18 | - | let | |
18 | + | let BETSTEP = ((1 * WAVELET) / 10) | |
19 | 19 | ||
20 | - | let | |
20 | + | let PRECISION = 10000 | |
21 | 21 | ||
22 | - | let | |
22 | + | let R1MAX = 96 | |
23 | 23 | ||
24 | - | let | |
24 | + | let R1MIN = 94 | |
25 | 25 | ||
26 | - | let | |
26 | + | let R1K = 9860 | |
27 | 27 | ||
28 | - | let | |
28 | + | let R2MAX = 93 | |
29 | 29 | ||
30 | - | let | |
30 | + | let R2MIN = 87 | |
31 | 31 | ||
32 | - | let | |
32 | + | let R2K = 9800 | |
33 | 33 | ||
34 | - | let RATE5 = 11400 | |
34 | + | let R3MAX = 86 | |
35 | + | ||
36 | + | let R3MIN = 86 | |
37 | + | ||
38 | + | let R3K = 9750 | |
39 | + | ||
40 | + | let R4MAX = 85 | |
41 | + | ||
42 | + | let R4MIN = 84 | |
43 | + | ||
44 | + | let R4K = 9670 | |
45 | + | ||
46 | + | let R5MAX = 83 | |
47 | + | ||
48 | + | let R5MIN = 83 | |
49 | + | ||
50 | + | let R5K = 9630 | |
51 | + | ||
52 | + | let R6MAX = 82 | |
53 | + | ||
54 | + | let R6MIN = 67 | |
55 | + | ||
56 | + | let R6K = 9610 | |
57 | + | ||
58 | + | let R7MAX = 66 | |
59 | + | ||
60 | + | let R7MIN = 56 | |
61 | + | ||
62 | + | let R7K = 9560 | |
63 | + | ||
64 | + | let R8MAX = 55 | |
65 | + | ||
66 | + | let R8MIN = 38 | |
67 | + | ||
68 | + | let R8K = 9500 | |
69 | + | ||
70 | + | let R9MAX = 37 | |
71 | + | ||
72 | + | let R9MIN = 3 | |
73 | + | ||
74 | + | let R9K = 9290 | |
75 | + | ||
76 | + | let R10MAX = 2 | |
77 | + | ||
78 | + | let R10MIN = 1 | |
79 | + | ||
80 | + | let R10K = 9860 | |
35 | 81 | ||
36 | 82 | let IdxGameState = 0 | |
37 | 83 | ||
78 | 124 | let newReservedAmount = (ExtractReservedAmt() + winAmt) | |
79 | 125 | let balance = wavesBalance(this) | |
80 | 126 | if ((newReservedAmount > balance)) | |
81 | - | then throw("Insufficient funds on | |
127 | + | then throw("Insufficient funds on Waves Rider account. Transaction was rejected for your safety.") | |
82 | 128 | else newReservedAmount | |
83 | 129 | } | |
84 | 130 | ||
92 | 138 | ||
93 | 139 | ||
94 | 140 | func ValidateBetAndDefineWinAmt (betAmt,playerChoice) = { | |
95 | - | let betAmtValid = if (if (if (if ((betAmt == (BET1 + COMMISSION))) | |
96 | - | then true | |
97 | - | else (betAmt == (BET2 + COMMISSION))) | |
98 | - | then true | |
99 | - | else (betAmt == (BET4 + COMMISSION))) | |
100 | - | then true | |
101 | - | else (betAmt == (BET8 + COMMISSION))) | |
102 | - | then true | |
103 | - | else (betAmt == (BET14 + COMMISSION)) | |
141 | + | let bet = (betAmt - COMMISSION) | |
142 | + | let betAmtValid = if (if ((bet >= BETMIN)) | |
143 | + | then (BETMAX >= bet) | |
144 | + | else false) | |
145 | + | then ((bet % BETSTEP) == 0) | |
146 | + | else false | |
104 | 147 | if (betAmtValid) | |
105 | 148 | then { | |
106 | - | let dicesCount = size(playerChoice) | |
107 | - | let bet = (betAmt - COMMISSION) | |
108 | - | if ((dicesCount == 1)) | |
109 | - | then ((bet * RATE1) / RATEMULT) | |
110 | - | else if ((dicesCount == 2)) | |
111 | - | then ((bet * RATE2) / RATEMULT) | |
112 | - | else if ((dicesCount == 3)) | |
113 | - | then ((bet * RATE3) / RATEMULT) | |
114 | - | else if ((dicesCount == 4)) | |
115 | - | then ((bet * RATE4) / RATEMULT) | |
116 | - | else if ((dicesCount == 5)) | |
117 | - | then ((bet * RATE5) / RATEMULT) | |
118 | - | else throw("Invalid dices count in player's choice") | |
149 | + | let playerChoiceInt = parseIntValue(playerChoice) | |
150 | + | if (if ((playerChoiceInt >= 1)) | |
151 | + | then (96 >= playerChoiceInt) | |
152 | + | else false) | |
153 | + | then { | |
154 | + | let RKxPrecision = if (if ((R1MAX >= playerChoiceInt)) | |
155 | + | then (playerChoiceInt >= R1MIN) | |
156 | + | else false) | |
157 | + | then R1K | |
158 | + | else if (if ((R2MAX >= playerChoiceInt)) | |
159 | + | then (playerChoiceInt >= R2MIN) | |
160 | + | else false) | |
161 | + | then R2K | |
162 | + | else if (if ((R3MAX >= playerChoiceInt)) | |
163 | + | then (playerChoiceInt >= R3MIN) | |
164 | + | else false) | |
165 | + | then R3K | |
166 | + | else if (if ((R4MAX >= playerChoiceInt)) | |
167 | + | then (playerChoiceInt >= R4MIN) | |
168 | + | else false) | |
169 | + | then R4K | |
170 | + | else if (if ((R5MAX >= playerChoiceInt)) | |
171 | + | then (playerChoiceInt >= R5MIN) | |
172 | + | else false) | |
173 | + | then R5K | |
174 | + | else if (if ((R6MAX >= playerChoiceInt)) | |
175 | + | then (playerChoiceInt >= R6MIN) | |
176 | + | else false) | |
177 | + | then R6K | |
178 | + | else if (if ((R7MAX >= playerChoiceInt)) | |
179 | + | then (playerChoiceInt >= R7MIN) | |
180 | + | else false) | |
181 | + | then R7K | |
182 | + | else if (if ((R8MAX >= playerChoiceInt)) | |
183 | + | then (playerChoiceInt >= R8MIN) | |
184 | + | else false) | |
185 | + | then R8K | |
186 | + | else if (if ((R9MAX >= playerChoiceInt)) | |
187 | + | then (playerChoiceInt >= R9MIN) | |
188 | + | else false) | |
189 | + | then R9K | |
190 | + | else if (if ((R10MAX >= playerChoiceInt)) | |
191 | + | then (playerChoiceInt >= R10MIN) | |
192 | + | else false) | |
193 | + | then R10K | |
194 | + | else throw(("Couldn't define range: playerChoice=" + playerChoice)) | |
195 | + | ((((100 * RKxPrecision) / playerChoiceInt) * bet) / PRECISION) | |
196 | + | } | |
197 | + | else throw("Player choice is out of the condition below: 1 <= choice <= 96") | |
119 | 198 | } | |
120 | - | else throw("Bet amount is not in range") | |
199 | + | else throw(((((("Bet amount is not in range: minBet=" + toString(BETMIN)) + " maxBet=") + toString(BETMAX)) + " betStep=") + toString(BETSTEP))) | |
121 | 200 | } | |
122 | 201 | ||
123 | 202 | ||
124 | - | func RandToStr (r) = if ((r == 0)) | |
125 | - | then "1" | |
126 | - | else if ((r == 1)) | |
127 | - | then "2" | |
128 | - | else if ((r == 2)) | |
129 | - | then "3" | |
130 | - | else if ((r == 3)) | |
131 | - | then "4" | |
132 | - | else if ((r == 4)) | |
133 | - | then "5" | |
134 | - | else if ((r == 5)) | |
135 | - | then "6" | |
136 | - | else throw(("Unsupported r parameter passed: expected=[0,...,5] actual=" + toString(r))) | |
203 | + | func RandToStr (r) = if (if ((r >= 1)) | |
204 | + | then (100 >= r) | |
205 | + | else false) | |
206 | + | then toString(r) | |
207 | + | else throw(("Unsupported r parameter passed: expected=[1,...,100] actual=" + toString(r))) | |
137 | 208 | ||
138 | 209 | ||
139 | 210 | func GenerateRandInt (gameId,rsaSign) = { | |
140 | 211 | let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC) | |
141 | 212 | if (rsaSigValid) | |
142 | 213 | then { | |
143 | - | let rand = (toInt(sha256(rsaSign)) % | |
214 | + | let rand = (toInt(sha256(rsaSign)) % 100) | |
144 | 215 | if ((0 > rand)) | |
145 | - | then (-1 * rand) | |
146 | - | else rand | |
216 | + | then ((-1 * rand) + 1) | |
217 | + | else (rand + 1) | |
147 | 218 | } | |
148 | 219 | else throw("Invalid RSA signature") | |
149 | 220 | } | |
150 | 221 | ||
151 | 222 | ||
152 | - | func IsPlayerWin (playerChoice,randStr) = { | |
153 | - | let s = size(playerChoice) | |
154 | - | if (if (if (if (if (if ((s >= 1)) | |
155 | - | then (take(drop(playerChoice, 0), 1) == randStr) | |
156 | - | else false) | |
157 | - | then true | |
158 | - | else if ((s >= 2)) | |
159 | - | then (take(drop(playerChoice, 1), 1) == randStr) | |
160 | - | else false) | |
161 | - | then true | |
162 | - | else if ((s >= 3)) | |
163 | - | then (take(drop(playerChoice, 2), 1) == randStr) | |
164 | - | else false) | |
165 | - | then true | |
166 | - | else if ((s >= 4)) | |
167 | - | then (take(drop(playerChoice, 3), 1) == randStr) | |
168 | - | else false) | |
169 | - | then true | |
170 | - | else if ((s >= 5)) | |
171 | - | then (take(drop(playerChoice, 4), 1) == randStr) | |
172 | - | else false) | |
173 | - | then true | |
174 | - | else if ((s >= 6)) | |
175 | - | then (take(drop(playerChoice, 5), 1) == randStr) | |
176 | - | else false | |
223 | + | func IsPlayerWin (playerChoice,rand) = { | |
224 | + | let playerChoiceInt = parseIntValue(playerChoice) | |
225 | + | (playerChoiceInt >= rand) | |
177 | 226 | } | |
178 | 227 | ||
179 | 228 | ||
292 | 341 | then throw("Invalid game state for passed gameId") | |
293 | 342 | else if (winByTimeout) | |
294 | 343 | then { | |
295 | - | let randStr = | |
344 | + | let randStr = playerChoice | |
296 | 345 | let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr) | |
297 | 346 | WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves) | |
298 | 347 | } | |
299 | 348 | else { | |
300 | - | let randStr = RandToStr(GenerateRandInt(gameId, rsaSign)) | |
301 | - | if (IsPlayerWin(playerChoice, randStr)) | |
349 | + | let rand = GenerateRandInt(gameId, rsaSign) | |
350 | + | let randStr = RandToStr(rand) | |
351 | + | if (IsPlayerWin(playerChoice, rand)) | |
302 | 352 | then { | |
303 | 353 | let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr) | |
304 | 354 | WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let RSAPUBLIC = fromBase64String("base64: | |
4 | + | let RSAPUBLIC = fromBase64String("base64:MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmpuXcI/o4pIB5ywv9DOOGapTBUwRVlM/6+H6hFelOXtkrwY/YItmPxEDpz7rAerQPQe9tDPEaAv/GnlEztybOFXgu9DzDe8YoMRD1vakgoAcogmbY58QD6KMj5HkoVj/yTNIc9szj5qhIlrAdmb3KLL6hQU7y8+Jj69BWVPsaQgkspSdeYtb1tHQc7t95n7OZ56r2A7G3+bQf6nSMkPkAhIrEpbCm58oiGBczdTd/LqFSVotZsbL7Yh6SHLfnHeD+QgcfJrnam8OHMGJEJTRXjILeHGjlRCP8oVpioHry1S2xPx5sVzIm2MM+CzYenAGlo0j26atBhiULoTulwD3pQIDAQAB") | |
5 | 5 | ||
6 | - | let SERVER = addressFromStringValue(" | |
6 | + | let SERVER = addressFromStringValue("3NCiG28LmWyTigWG13E5QnvdHBsZFYXSS2j") | |
7 | 7 | ||
8 | - | let RANDORACLETIMEFRAME = | |
8 | + | let RANDORACLETIMEFRAME = 4320 | |
9 | 9 | ||
10 | 10 | let WAVELET = ((100 * 1000) * 1000) | |
11 | 11 | ||
12 | 12 | let COMMISSION = ((5 * WAVELET) / 1000) | |
13 | 13 | ||
14 | - | let | |
14 | + | let BETMIN = ((1 * WAVELET) / 2) | |
15 | 15 | ||
16 | - | let | |
16 | + | let BETMAX = (6 * WAVELET) | |
17 | 17 | ||
18 | - | let | |
18 | + | let BETSTEP = ((1 * WAVELET) / 10) | |
19 | 19 | ||
20 | - | let | |
20 | + | let PRECISION = 10000 | |
21 | 21 | ||
22 | - | let | |
22 | + | let R1MAX = 96 | |
23 | 23 | ||
24 | - | let | |
24 | + | let R1MIN = 94 | |
25 | 25 | ||
26 | - | let | |
26 | + | let R1K = 9860 | |
27 | 27 | ||
28 | - | let | |
28 | + | let R2MAX = 93 | |
29 | 29 | ||
30 | - | let | |
30 | + | let R2MIN = 87 | |
31 | 31 | ||
32 | - | let | |
32 | + | let R2K = 9800 | |
33 | 33 | ||
34 | - | let RATE5 = 11400 | |
34 | + | let R3MAX = 86 | |
35 | + | ||
36 | + | let R3MIN = 86 | |
37 | + | ||
38 | + | let R3K = 9750 | |
39 | + | ||
40 | + | let R4MAX = 85 | |
41 | + | ||
42 | + | let R4MIN = 84 | |
43 | + | ||
44 | + | let R4K = 9670 | |
45 | + | ||
46 | + | let R5MAX = 83 | |
47 | + | ||
48 | + | let R5MIN = 83 | |
49 | + | ||
50 | + | let R5K = 9630 | |
51 | + | ||
52 | + | let R6MAX = 82 | |
53 | + | ||
54 | + | let R6MIN = 67 | |
55 | + | ||
56 | + | let R6K = 9610 | |
57 | + | ||
58 | + | let R7MAX = 66 | |
59 | + | ||
60 | + | let R7MIN = 56 | |
61 | + | ||
62 | + | let R7K = 9560 | |
63 | + | ||
64 | + | let R8MAX = 55 | |
65 | + | ||
66 | + | let R8MIN = 38 | |
67 | + | ||
68 | + | let R8K = 9500 | |
69 | + | ||
70 | + | let R9MAX = 37 | |
71 | + | ||
72 | + | let R9MIN = 3 | |
73 | + | ||
74 | + | let R9K = 9290 | |
75 | + | ||
76 | + | let R10MAX = 2 | |
77 | + | ||
78 | + | let R10MIN = 1 | |
79 | + | ||
80 | + | let R10K = 9860 | |
35 | 81 | ||
36 | 82 | let IdxGameState = 0 | |
37 | 83 | ||
38 | 84 | let IdxPlayerChoice = 1 | |
39 | 85 | ||
40 | 86 | let IdxPlayerPubKey58 = 2 | |
41 | 87 | ||
42 | 88 | let IdxStartedHeight = 3 | |
43 | 89 | ||
44 | 90 | let IdxWinAmt = 4 | |
45 | 91 | ||
46 | 92 | let IdxRandOrEmpty = 5 | |
47 | 93 | ||
48 | 94 | let RESERVATIONKEY = "$RESERVED_AMOUNT" | |
49 | 95 | ||
50 | 96 | let GAMESCOUNTERKEY = "$GAME_NUM" | |
51 | 97 | ||
52 | 98 | let STATESUBMITTED = "SUBMITTED" | |
53 | 99 | ||
54 | 100 | let STATEWON = "WON" | |
55 | 101 | ||
56 | 102 | let STATELOST = "LOST" | |
57 | 103 | ||
58 | 104 | func IncrementGameNum () = { | |
59 | 105 | let gameNum = match getInteger(this, GAMESCOUNTERKEY) { | |
60 | 106 | case num: Int => | |
61 | 107 | num | |
62 | 108 | case _ => | |
63 | 109 | 0 | |
64 | 110 | } | |
65 | 111 | (gameNum + 1) | |
66 | 112 | } | |
67 | 113 | ||
68 | 114 | ||
69 | 115 | func ExtractReservedAmt () = match getInteger(this, RESERVATIONKEY) { | |
70 | 116 | case a: Int => | |
71 | 117 | a | |
72 | 118 | case _ => | |
73 | 119 | 0 | |
74 | 120 | } | |
75 | 121 | ||
76 | 122 | ||
77 | 123 | func ValidateAndIncreaseReservedAmt (winAmt) = { | |
78 | 124 | let newReservedAmount = (ExtractReservedAmt() + winAmt) | |
79 | 125 | let balance = wavesBalance(this) | |
80 | 126 | if ((newReservedAmount > balance)) | |
81 | - | then throw("Insufficient funds on | |
127 | + | then throw("Insufficient funds on Waves Rider account. Transaction was rejected for your safety.") | |
82 | 128 | else newReservedAmount | |
83 | 129 | } | |
84 | 130 | ||
85 | 131 | ||
86 | 132 | func DecreaseReservedAmt (gameId,winAmt) = { | |
87 | 133 | let newReservedAmount = (ExtractReservedAmt() - winAmt) | |
88 | 134 | if ((0 > newReservedAmount)) | |
89 | 135 | then throw("Invalid Dice Roller account state - reserved amount is less than 0") | |
90 | 136 | else DataEntry(RESERVATIONKEY, newReservedAmount) | |
91 | 137 | } | |
92 | 138 | ||
93 | 139 | ||
94 | 140 | func ValidateBetAndDefineWinAmt (betAmt,playerChoice) = { | |
95 | - | let betAmtValid = if (if (if (if ((betAmt == (BET1 + COMMISSION))) | |
96 | - | then true | |
97 | - | else (betAmt == (BET2 + COMMISSION))) | |
98 | - | then true | |
99 | - | else (betAmt == (BET4 + COMMISSION))) | |
100 | - | then true | |
101 | - | else (betAmt == (BET8 + COMMISSION))) | |
102 | - | then true | |
103 | - | else (betAmt == (BET14 + COMMISSION)) | |
141 | + | let bet = (betAmt - COMMISSION) | |
142 | + | let betAmtValid = if (if ((bet >= BETMIN)) | |
143 | + | then (BETMAX >= bet) | |
144 | + | else false) | |
145 | + | then ((bet % BETSTEP) == 0) | |
146 | + | else false | |
104 | 147 | if (betAmtValid) | |
105 | 148 | then { | |
106 | - | let dicesCount = size(playerChoice) | |
107 | - | let bet = (betAmt - COMMISSION) | |
108 | - | if ((dicesCount == 1)) | |
109 | - | then ((bet * RATE1) / RATEMULT) | |
110 | - | else if ((dicesCount == 2)) | |
111 | - | then ((bet * RATE2) / RATEMULT) | |
112 | - | else if ((dicesCount == 3)) | |
113 | - | then ((bet * RATE3) / RATEMULT) | |
114 | - | else if ((dicesCount == 4)) | |
115 | - | then ((bet * RATE4) / RATEMULT) | |
116 | - | else if ((dicesCount == 5)) | |
117 | - | then ((bet * RATE5) / RATEMULT) | |
118 | - | else throw("Invalid dices count in player's choice") | |
149 | + | let playerChoiceInt = parseIntValue(playerChoice) | |
150 | + | if (if ((playerChoiceInt >= 1)) | |
151 | + | then (96 >= playerChoiceInt) | |
152 | + | else false) | |
153 | + | then { | |
154 | + | let RKxPrecision = if (if ((R1MAX >= playerChoiceInt)) | |
155 | + | then (playerChoiceInt >= R1MIN) | |
156 | + | else false) | |
157 | + | then R1K | |
158 | + | else if (if ((R2MAX >= playerChoiceInt)) | |
159 | + | then (playerChoiceInt >= R2MIN) | |
160 | + | else false) | |
161 | + | then R2K | |
162 | + | else if (if ((R3MAX >= playerChoiceInt)) | |
163 | + | then (playerChoiceInt >= R3MIN) | |
164 | + | else false) | |
165 | + | then R3K | |
166 | + | else if (if ((R4MAX >= playerChoiceInt)) | |
167 | + | then (playerChoiceInt >= R4MIN) | |
168 | + | else false) | |
169 | + | then R4K | |
170 | + | else if (if ((R5MAX >= playerChoiceInt)) | |
171 | + | then (playerChoiceInt >= R5MIN) | |
172 | + | else false) | |
173 | + | then R5K | |
174 | + | else if (if ((R6MAX >= playerChoiceInt)) | |
175 | + | then (playerChoiceInt >= R6MIN) | |
176 | + | else false) | |
177 | + | then R6K | |
178 | + | else if (if ((R7MAX >= playerChoiceInt)) | |
179 | + | then (playerChoiceInt >= R7MIN) | |
180 | + | else false) | |
181 | + | then R7K | |
182 | + | else if (if ((R8MAX >= playerChoiceInt)) | |
183 | + | then (playerChoiceInt >= R8MIN) | |
184 | + | else false) | |
185 | + | then R8K | |
186 | + | else if (if ((R9MAX >= playerChoiceInt)) | |
187 | + | then (playerChoiceInt >= R9MIN) | |
188 | + | else false) | |
189 | + | then R9K | |
190 | + | else if (if ((R10MAX >= playerChoiceInt)) | |
191 | + | then (playerChoiceInt >= R10MIN) | |
192 | + | else false) | |
193 | + | then R10K | |
194 | + | else throw(("Couldn't define range: playerChoice=" + playerChoice)) | |
195 | + | ((((100 * RKxPrecision) / playerChoiceInt) * bet) / PRECISION) | |
196 | + | } | |
197 | + | else throw("Player choice is out of the condition below: 1 <= choice <= 96") | |
119 | 198 | } | |
120 | - | else throw("Bet amount is not in range") | |
199 | + | else throw(((((("Bet amount is not in range: minBet=" + toString(BETMIN)) + " maxBet=") + toString(BETMAX)) + " betStep=") + toString(BETSTEP))) | |
121 | 200 | } | |
122 | 201 | ||
123 | 202 | ||
124 | - | func RandToStr (r) = if ((r == 0)) | |
125 | - | then "1" | |
126 | - | else if ((r == 1)) | |
127 | - | then "2" | |
128 | - | else if ((r == 2)) | |
129 | - | then "3" | |
130 | - | else if ((r == 3)) | |
131 | - | then "4" | |
132 | - | else if ((r == 4)) | |
133 | - | then "5" | |
134 | - | else if ((r == 5)) | |
135 | - | then "6" | |
136 | - | else throw(("Unsupported r parameter passed: expected=[0,...,5] actual=" + toString(r))) | |
203 | + | func RandToStr (r) = if (if ((r >= 1)) | |
204 | + | then (100 >= r) | |
205 | + | else false) | |
206 | + | then toString(r) | |
207 | + | else throw(("Unsupported r parameter passed: expected=[1,...,100] actual=" + toString(r))) | |
137 | 208 | ||
138 | 209 | ||
139 | 210 | func GenerateRandInt (gameId,rsaSign) = { | |
140 | 211 | let rsaSigValid = rsaVerify(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC) | |
141 | 212 | if (rsaSigValid) | |
142 | 213 | then { | |
143 | - | let rand = (toInt(sha256(rsaSign)) % | |
214 | + | let rand = (toInt(sha256(rsaSign)) % 100) | |
144 | 215 | if ((0 > rand)) | |
145 | - | then (-1 * rand) | |
146 | - | else rand | |
216 | + | then ((-1 * rand) + 1) | |
217 | + | else (rand + 1) | |
147 | 218 | } | |
148 | 219 | else throw("Invalid RSA signature") | |
149 | 220 | } | |
150 | 221 | ||
151 | 222 | ||
152 | - | func IsPlayerWin (playerChoice,randStr) = { | |
153 | - | let s = size(playerChoice) | |
154 | - | if (if (if (if (if (if ((s >= 1)) | |
155 | - | then (take(drop(playerChoice, 0), 1) == randStr) | |
156 | - | else false) | |
157 | - | then true | |
158 | - | else if ((s >= 2)) | |
159 | - | then (take(drop(playerChoice, 1), 1) == randStr) | |
160 | - | else false) | |
161 | - | then true | |
162 | - | else if ((s >= 3)) | |
163 | - | then (take(drop(playerChoice, 2), 1) == randStr) | |
164 | - | else false) | |
165 | - | then true | |
166 | - | else if ((s >= 4)) | |
167 | - | then (take(drop(playerChoice, 3), 1) == randStr) | |
168 | - | else false) | |
169 | - | then true | |
170 | - | else if ((s >= 5)) | |
171 | - | then (take(drop(playerChoice, 4), 1) == randStr) | |
172 | - | else false) | |
173 | - | then true | |
174 | - | else if ((s >= 6)) | |
175 | - | then (take(drop(playerChoice, 5), 1) == randStr) | |
176 | - | else false | |
223 | + | func IsPlayerWin (playerChoice,rand) = { | |
224 | + | let playerChoiceInt = parseIntValue(playerChoice) | |
225 | + | (playerChoiceInt >= rand) | |
177 | 226 | } | |
178 | 227 | ||
179 | 228 | ||
180 | 229 | func FormatGameDataParam (p) = { | |
181 | 230 | let s = size(p) | |
182 | 231 | if ((s == 0)) | |
183 | 232 | then throw("Parameter size must be greater then 0") | |
184 | 233 | else if ((s > 99)) | |
185 | 234 | then throw("Parameter size must be less then 100") | |
186 | 235 | else if ((10 > s)) | |
187 | 236 | then (("0" + toString(s)) + p) | |
188 | 237 | else (toString(s) + p) | |
189 | 238 | } | |
190 | 239 | ||
191 | 240 | ||
192 | 241 | func FormatGameDataStr (gameState,playerChoice,playerPubKey58,startedHeight,winAmt,randOrEmpty) = { | |
193 | 242 | let fullStateStr = ((((((((FormatGameDataParam(gameState) + "_") + FormatGameDataParam(playerChoice)) + "_") + FormatGameDataParam(playerPubKey58)) + "_") + FormatGameDataParam(toString(startedHeight))) + "_") + FormatGameDataParam(toString(winAmt))) | |
194 | 243 | if ((randOrEmpty == "")) | |
195 | 244 | then fullStateStr | |
196 | 245 | else ((fullStateStr + "_") + FormatGameDataParam(randOrEmpty)) | |
197 | 246 | } | |
198 | 247 | ||
199 | 248 | ||
200 | 249 | func RemoveUnderscoreIfPresent (remaining) = if ((size(remaining) > 0)) | |
201 | 250 | then drop(remaining, 1) | |
202 | 251 | else remaining | |
203 | 252 | ||
204 | 253 | ||
205 | 254 | func ParseNextAttribute (remaining) = { | |
206 | 255 | let s = size(remaining) | |
207 | 256 | if ((s > 0)) | |
208 | 257 | then { | |
209 | 258 | let nn = parseIntValue(take(remaining, 2)) | |
210 | 259 | let v = take(drop(remaining, 2), nn) | |
211 | 260 | let tmpRemaining = drop(remaining, (nn + 2)) | |
212 | 261 | let remainingState = RemoveUnderscoreIfPresent(tmpRemaining) | |
213 | 262 | [v, remainingState] | |
214 | 263 | } | |
215 | 264 | else throw("Empty string was passed into parseNextAttribute func") | |
216 | 265 | } | |
217 | 266 | ||
218 | 267 | ||
219 | 268 | func ParseGameRawDataStr (rawStateStr) = { | |
220 | 269 | let gameState = ParseNextAttribute(rawStateStr) | |
221 | 270 | let playerChoice = ParseNextAttribute(gameState[1]) | |
222 | 271 | let playerPubKey58 = ParseNextAttribute(playerChoice[1]) | |
223 | 272 | let startedHeight = ParseNextAttribute(playerPubKey58[1]) | |
224 | 273 | let winAmt = ParseNextAttribute(startedHeight[1]) | |
225 | 274 | [gameState[0], playerChoice[0], playerPubKey58[0], startedHeight[0], winAmt[0]] | |
226 | 275 | } | |
227 | 276 | ||
228 | 277 | ||
229 | 278 | func ExtractGameDataList (gameId) = { | |
230 | 279 | let rawDataStr = match getString(this, gameId) { | |
231 | 280 | case str: String => | |
232 | 281 | str | |
233 | 282 | case _ => | |
234 | 283 | throw(("Couldn't find game by " + gameId)) | |
235 | 284 | } | |
236 | 285 | ParseGameRawDataStr(rawDataStr) | |
237 | 286 | } | |
238 | 287 | ||
239 | 288 | ||
240 | 289 | func WinScriptSet (gameId,playerAddress,winAmt,newGameDataStr,winByTimeout,decreasedReserves) = { | |
241 | 290 | let wSetCommonData = [decreasedReserves] | |
242 | 291 | let tSetCommonData = [ScriptTransfer(playerAddress, winAmt, unit)] | |
243 | 292 | if (winByTimeout) | |
244 | 293 | then { | |
245 | 294 | let newGameDataStrAdjusted = ((newGameDataStr + "_") + FormatGameDataParam("TIMEOUT")) | |
246 | 295 | let gameData = DataEntry(gameId, newGameDataStrAdjusted) | |
247 | 296 | ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData)) | |
248 | 297 | } | |
249 | 298 | else { | |
250 | 299 | let gameData = DataEntry(gameId, newGameDataStr) | |
251 | 300 | ScriptResult(WriteSet(gameData :: wSetCommonData), TransferSet(tSetCommonData)) | |
252 | 301 | } | |
253 | 302 | } | |
254 | 303 | ||
255 | 304 | ||
256 | 305 | @Callable(i) | |
257 | 306 | func bet (playerChoice) = { | |
258 | 307 | let newGameNum = IncrementGameNum() | |
259 | 308 | let gameId = toBase58String(i.transactionId) | |
260 | 309 | let pmt = extract(i.payment) | |
261 | 310 | let betNotInWaves = isDefined(pmt.assetId) | |
262 | 311 | let feeNotInWaves = isDefined(pmt.assetId) | |
263 | 312 | let winAmt = ValidateBetAndDefineWinAmt(pmt.amount, playerChoice) | |
264 | 313 | let txIdUsed = isDefined(getString(this, gameId)) | |
265 | 314 | if (betNotInWaves) | |
266 | 315 | then throw("Bet amount must be in Waves") | |
267 | 316 | else if (feeNotInWaves) | |
268 | 317 | then throw("Transaction's fee must be in Waves") | |
269 | 318 | else if (txIdUsed) | |
270 | 319 | then throw("Passed txId had been used before. Game aborted.") | |
271 | 320 | else { | |
272 | 321 | let playerPubKey58 = toBase58String(i.callerPublicKey) | |
273 | 322 | let gameDataStr = FormatGameDataStr(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmt, "") | |
274 | 323 | ScriptResult(WriteSet([DataEntry(RESERVATIONKEY, ValidateAndIncreaseReservedAmt(winAmt)), DataEntry(GAMESCOUNTERKEY, newGameNum), DataEntry(gameId, gameDataStr)]), TransferSet([ScriptTransfer(SERVER, COMMISSION, unit)])) | |
275 | 324 | } | |
276 | 325 | } | |
277 | 326 | ||
278 | 327 | ||
279 | 328 | ||
280 | 329 | @Callable(i) | |
281 | 330 | func withdraw (gameId,rsaSign) = { | |
282 | 331 | let gameDataList = ExtractGameDataList(gameId) | |
283 | 332 | let gameState = gameDataList[IdxGameState] | |
284 | 333 | let playerChoice = gameDataList[IdxPlayerChoice] | |
285 | 334 | let startedHeight = parseIntValue(gameDataList[IdxStartedHeight]) | |
286 | 335 | let winAmt = parseIntValue(gameDataList[IdxWinAmt]) | |
287 | 336 | let playerPubKey58 = gameDataList[IdxPlayerPubKey58] | |
288 | 337 | let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58)) | |
289 | 338 | let winByTimeout = ((height - startedHeight) > RANDORACLETIMEFRAME) | |
290 | 339 | let decreasedReserves = DecreaseReservedAmt(gameId, winAmt) | |
291 | 340 | if ((gameState != STATESUBMITTED)) | |
292 | 341 | then throw("Invalid game state for passed gameId") | |
293 | 342 | else if (winByTimeout) | |
294 | 343 | then { | |
295 | - | let randStr = | |
344 | + | let randStr = playerChoice | |
296 | 345 | let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr) | |
297 | 346 | WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves) | |
298 | 347 | } | |
299 | 348 | else { | |
300 | - | let randStr = RandToStr(GenerateRandInt(gameId, rsaSign)) | |
301 | - | if (IsPlayerWin(playerChoice, randStr)) | |
349 | + | let rand = GenerateRandInt(gameId, rsaSign) | |
350 | + | let randStr = RandToStr(rand) | |
351 | + | if (IsPlayerWin(playerChoice, rand)) | |
302 | 352 | then { | |
303 | 353 | let newGameDataStr = FormatGameDataStr(STATEWON, playerChoice, playerPubKey58, startedHeight, winAmt, randStr) | |
304 | 354 | WinScriptSet(gameId, playerAddress, winAmt, newGameDataStr, winByTimeout, decreasedReserves) | |
305 | 355 | } | |
306 | 356 | else { | |
307 | 357 | let newGameDataStr = FormatGameDataStr(STATELOST, playerChoice, playerPubKey58, startedHeight, winAmt, randStr) | |
308 | 358 | WriteSet([DataEntry(gameId, newGameDataStr), decreasedReserves]) | |
309 | 359 | } | |
310 | 360 | } | |
311 | 361 | } | |
312 | 362 | ||
313 | 363 | ||
314 | 364 | @Verifier(tx) | |
315 | 365 | func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
316 | 366 | then match tx { | |
317 | 367 | case ttx: TransferTransaction => | |
318 | 368 | ((wavesBalance(this) - ttx.amount) >= ExtractReservedAmt()) | |
319 | 369 | case stx: SetScriptTransaction => | |
320 | 370 | true | |
321 | 371 | case _ => | |
322 | 372 | false | |
323 | 373 | } | |
324 | 374 | else false | |
325 | 375 |
github/deemru/w8io/026f985 70.87 ms ◑