tx · 2fKnLFXeMRi15d4aYSuwwSv34kWdRbmGpWC3qgVUyJf5 3N8NLvRGsbGhgoXy7EdigPbAz6N2i7ygBcZ: -0.01700000 Waves 2023.12.12 19:40 [2883765] smart account 3N8NLvRGsbGhgoXy7EdigPbAz6N2i7ygBcZ > SELF 0.00000000 Waves
{ "type": 13, "id": "2fKnLFXeMRi15d4aYSuwwSv34kWdRbmGpWC3qgVUyJf5", "fee": 1700000, "feeAssetId": null, "timestamp": 1702399280814, "version": 2, "chainId": 84, "sender": "3N8NLvRGsbGhgoXy7EdigPbAz6N2i7ygBcZ", "senderPublicKey": "CQoe8BRHR78TuPQLcK3Ykv39w9CeNLhjKdj6TNbJ5FrM", "proofs": [ "5qVBqVzb7LtCUmaoqcxJT7p1cbZWJZpahoaAvSRHHV22mQKVVHtnb1kjnQoG5qQtX4eCw2D133QUPXa6uuec4eEY" ], "script": "base64:BgIaCAISBgoECAgBCBIDCgEEEgMKAQgSBAoCCAJGAANTRVACAl9fAAdXQVZFU0lEAQQTq9kzAAZXQVZFU0QAgMLXLwAJR0FNRV9OQU1FAglYbWFzIFRyZWUADFJBTkRPTV9SQU5HRQAFAAhOVU1fQkVUUwABAQxnZXRTdHJPckZhaWwCB2FkZHJlc3MDa2V5CQETdmFsdWVPckVycm9yTWVzc2FnZQIJAJ0IAgUHYWRkcmVzcwUDa2V5CQC5CQIJAMwIAgIKbWFuZGF0b3J5IAkAzAgCCQClCAEFB2FkZHJlc3MJAMwIAgIBLgkAzAgCBQNrZXkJAMwIAgIPIGlzIG5vdCBkZWZpbmVkBQNuaWwCAAEMZ2V0SW50T3JGYWlsAgdhZGRyZXNzA2tleQkBE3ZhbHVlT3JFcnJvck1lc3NhZ2UCCQCaCAIFB2FkZHJlc3MFA2tleQkAuQkCCQDMCAICCm1hbmRhdG9yeSAJAMwIAgkApQgBBQdhZGRyZXNzCQDMCAICAS4JAMwIAgUDa2V5CQDMCAICDyBpcyBub3QgZGVmaW5lZAUDbmlsAgABDWdld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RJZHgAAAMJAAECBQckbWF0Y2gwAhRTZXRTY3JpcHRUcmFuc2FjdGlvbgQDc3R4BQckbWF0Y2gwCgEHY2hlY2tlcgIDYWNjBWFzc2V0AwUDYWNjCQAAAgkBCGdldEludE9yAgkBGGtleVJlc2VydmF0aW9uQnlBc3NldFN0cgEFBWFzc2V0AAAAAAcKAAIkbAUGQVNTRVRTCgACJHMJAJADAQUCJGwKAAUkYWNjMAYKAQUkZjBfMQICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkBB2NoZWNrZXICBQIkYQkAkQMCBQIkbAUCJGkKAQUkZjBfMgICJGECJGkDCQBnAgUCJGkFAiRzBQIkYQkAAgECFExpc3Qgc2l6ZSBleGNlZWRzIDEwCQEFJGYwXzICCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECCQEFJGYwXzECBQUkYWNjMAAAAAEAAgADAAQABQAGAAcACAAJAAoDCQABAgUHJG1hdGNoMAIXSW52b2tlU2NyaXB0VHJhbnNhY3Rpb24EA2l0eAUHJG1hdGNoMAMJAAACCAUDaXR4BGRBcHAFBHRoaXMJAAACCAUDaXR4CGZ1bmN0aW9uAg1jb25zdHJ1Y3RvclYxBwcHE/Df4w==", "height": 2883765, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CFJTzodtTfc9BN6gqaKMCjoN9S9G4Er3fHxoYvtWZ8EZ Next: E4hcche2nVENgLZA29jHVUsB5Z2TCDktD716RhguQUie Diff:
Old | New | Differences | |
---|---|---|---|
217 | 217 | func getCoords (gameId,rsaSign) = { | |
218 | 218 | func calcAreas (acc,ignored) = { | |
219 | 219 | let i = acc._3 | |
220 | - | let top = HOR_LINES[i] | |
221 | - | let bottom = HOR_LINES[(i + 1)] | |
222 | - | let area4 = (((((top[1] - top[0]) + bottom[1]) - bottom[0]) * (bottom[2] - top[2])) * 5000) | |
223 | - | $Tuple3((acc._1 :+ area4), (acc._2 + area4), (acc._3 + 1)) | |
220 | + | if ((i == 14)) | |
221 | + | then acc | |
222 | + | else { | |
223 | + | let top = HOR_LINES[i] | |
224 | + | let bottom = HOR_LINES[(i + 1)] | |
225 | + | let area4 = (((((top[1] - top[0]) + bottom[1]) - bottom[0]) * (bottom[2] - top[2])) * 5000) | |
226 | + | $Tuple3((acc._1 :+ area4), (acc._2 + area4), (acc._3 + 1)) | |
227 | + | } | |
224 | 228 | } | |
225 | 229 | ||
226 | - | let $ | |
230 | + | let $t079748041 = { | |
227 | 231 | let $l = HOR_LINES | |
228 | 232 | let $s = size($l) | |
229 | 233 | let $acc0 = $Tuple3(nil, 0, 0) | |
233 | 237 | ||
234 | 238 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
235 | 239 | then $a | |
236 | - | else throw("List size exceeds | |
240 | + | else throw("List size exceeds 15") | |
237 | 241 | ||
238 | - | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14) | |
242 | + | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
239 | 243 | } | |
240 | - | let areas = $ | |
241 | - | let totalArea = $ | |
244 | + | let areas = $t079748041._1 | |
245 | + | let totalArea = $t079748041._2 | |
242 | 246 | let rand = (toInt(sha256(rsaSign)) % totalArea) | |
243 | 247 | func check (acc,area) = { | |
244 | 248 | let i = acc._1 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 6 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let SEP = "__" | |
5 | 5 | ||
6 | 6 | let WAVESID = base58'WAVES' | |
7 | 7 | ||
8 | 8 | let WAVESD = 100000000 | |
9 | 9 | ||
10 | 10 | let GAME_NAME = "Xmas Tree" | |
11 | 11 | ||
12 | 12 | let RANDOM_RANGE = 5 | |
13 | 13 | ||
14 | 14 | let NUM_BETS = 1 | |
15 | 15 | ||
16 | 16 | func getStrOrFail (address,key) = valueOrErrorMessage(getString(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
17 | 17 | ||
18 | 18 | ||
19 | 19 | func getIntOrFail (address,key) = valueOrErrorMessage(getInteger(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
20 | 20 | ||
21 | 21 | ||
22 | 22 | func getBoolOrFail (address,key) = valueOrErrorMessage(getBoolean(address, key), makeString(["mandatory ", toString(address), ".", key, " is not defined"], "")) | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | let allowedAssetsKey = "%s%s__cfg__allowedAssets" | |
26 | 26 | ||
27 | 27 | let assetsDecimalsKey = "%s%s__cfg__assetsDecimals" | |
28 | 28 | ||
29 | 29 | let betDividersKey = "%s%s__cfg__assetsBetDividers" | |
30 | 30 | ||
31 | 31 | let RSAPUBLIC64KEY = "%s%s__cfg__rsaPublic64" | |
32 | 32 | ||
33 | 33 | let SERVERADDRESSKEY = "%s%s__cfg__benzAddress" | |
34 | 34 | ||
35 | 35 | let RANDTIMEFRAMEKEY = "%s%s__cfg__withdrawTimeFrame" | |
36 | 36 | ||
37 | 37 | let GAMESCOUNTERKEY = "%s%s__runtime__gameNum" | |
38 | 38 | ||
39 | 39 | let blockedKey = "%s%s__runtime__contractIsBlocked" | |
40 | 40 | ||
41 | 41 | let reservedAmountsKey = "%s%s__runtime__reservedAmounts" | |
42 | 42 | ||
43 | 43 | func getIntArray (key) = { | |
44 | 44 | let a = getStrOrFail(this, key) | |
45 | 45 | func filler (acc,el) = (acc :+ parseIntValue(el)) | |
46 | 46 | ||
47 | 47 | let $l = split(a, SEP) | |
48 | 48 | let $s = size($l) | |
49 | 49 | let $acc0 = nil | |
50 | 50 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
51 | 51 | then $a | |
52 | 52 | else filler($a, $l[$i]) | |
53 | 53 | ||
54 | 54 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
55 | 55 | then $a | |
56 | 56 | else throw("List size exceeds 10") | |
57 | 57 | ||
58 | 58 | $f0_2($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) | |
59 | 59 | } | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | let ASSETS = split(getStrOrFail(this, allowedAssetsKey), SEP) | |
63 | 63 | ||
64 | 64 | let DECIMALS = getIntArray(assetsDecimalsKey) | |
65 | 65 | ||
66 | 66 | let BETDIVIDERS = getIntArray(betDividersKey) | |
67 | 67 | ||
68 | 68 | func keyReservationByAssetStr (assetStr) = ("$RESERVED_AMOUNT_" + assetStr) | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func keyReservationByAssetIdx (assetIdx) = keyReservationByAssetStr(ASSETS[assetIdx]) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | let MINFEEWAVES = ((5 * WAVESD) / 1000) | |
75 | 75 | ||
76 | 76 | let idxAssets = 0 | |
77 | 77 | ||
78 | 78 | let idxDecimals = 1 | |
79 | 79 | ||
80 | 80 | let idxDividers = 2 | |
81 | 81 | ||
82 | 82 | let BET1 = 1 | |
83 | 83 | ||
84 | 84 | let BET2 = 2 | |
85 | 85 | ||
86 | 86 | let BET4 = 4 | |
87 | 87 | ||
88 | 88 | let BET8 = 8 | |
89 | 89 | ||
90 | 90 | let BET14 = 14 | |
91 | 91 | ||
92 | 92 | let RATEMULT = 10000 | |
93 | 93 | ||
94 | 94 | let RATE = 250000 | |
95 | 95 | ||
96 | 96 | let BETS = [BET2] | |
97 | 97 | ||
98 | 98 | let IdxGameState = 0 | |
99 | 99 | ||
100 | 100 | let IdxPlayerChoice = 1 | |
101 | 101 | ||
102 | 102 | let IdxPlayerPubKey58 = 2 | |
103 | 103 | ||
104 | 104 | let IdxStartedHeight = 3 | |
105 | 105 | ||
106 | 106 | let IdxWinAmount = 4 | |
107 | 107 | ||
108 | 108 | let IdxAssetId = 5 | |
109 | 109 | ||
110 | 110 | let STATESUBMITTED = "SUBMITTED" | |
111 | 111 | ||
112 | 112 | let STATEWON = "WON" | |
113 | 113 | ||
114 | 114 | let STATELOST = "LOST" | |
115 | 115 | ||
116 | 116 | func getStringOrFail (key) = valueOrErrorMessage(getString(this, key), (key + " key is not specified in this.state")) | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | let RSAPUBLIC = fromBase64String(getStringOrFail(RSAPUBLIC64KEY)) | |
120 | 120 | ||
121 | 121 | let SERVER = addressFromStringValue(getStringOrFail(SERVERADDRESSKEY)) | |
122 | 122 | ||
123 | 123 | let RANDORACLETIMEFRAME = valueOrElse(getInteger(this, RANDTIMEFRAMEKEY), 7200) | |
124 | 124 | ||
125 | 125 | func getIntOr (key,default) = if (isDefined(getInteger(key))) | |
126 | 126 | then getIntegerValue(key) | |
127 | 127 | else default | |
128 | 128 | ||
129 | 129 | ||
130 | 130 | func setInt (key,value) = IntegerEntry(key, value) | |
131 | 131 | ||
132 | 132 | ||
133 | 133 | func incrementInt (key) = setInt(key, (getIntOr(key, -1) + 1)) | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func changeInt (key,by) = setInt(key, (getIntOr(key, 0) + by)) | |
137 | 137 | ||
138 | 138 | ||
139 | 139 | func assetIdToStr (assetIdOrUnit) = match assetIdOrUnit { | |
140 | 140 | case b: ByteVector => | |
141 | 141 | toBase58String(b) | |
142 | 142 | case _ => | |
143 | 143 | "WAVES" | |
144 | 144 | } | |
145 | 145 | ||
146 | 146 | ||
147 | 147 | func assetIdFromStr (assetIdStr) = if ((assetIdStr == "WAVES")) | |
148 | 148 | then unit | |
149 | 149 | else fromBase58String(assetIdStr) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func getAssetBalance (assetIdOrUnit) = match assetIdOrUnit { | |
153 | 153 | case assetId: ByteVector => | |
154 | 154 | assetBalance(this, assetId) | |
155 | 155 | case _ => | |
156 | 156 | wavesBalance(this).available | |
157 | 157 | } | |
158 | 158 | ||
159 | 159 | ||
160 | 160 | func increaseReserveAmount (winAmount,assetIdx) = { | |
161 | 161 | let assetIdStr = ASSETS[assetIdx] | |
162 | 162 | let newReservedAmount = (getIntOr(keyReservationByAssetIdx(assetIdx), 0) + winAmount) | |
163 | 163 | if ((newReservedAmount > getAssetBalance(assetIdFromStr(assetIdStr)))) | |
164 | 164 | then throw((("Insufficient funds on " + GAME_NAME) + " account. Transaction was rejected for your safety.")) | |
165 | 165 | else newReservedAmount | |
166 | 166 | } | |
167 | 167 | ||
168 | 168 | ||
169 | 169 | func decreaseReservedAmount (gameId,assetIdx,winAmount) = if ((0 > (getIntOr(keyReservationByAssetIdx(assetIdx), 0) - winAmount))) | |
170 | 170 | then throw((("Invalid " + GAME_NAME) + " account state - reserved amount is less than 0")) | |
171 | 171 | else changeInt(keyReservationByAssetIdx(assetIdx), -(winAmount)) | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func validateAndGetAssetIdx (assetIdStr) = { | |
175 | 175 | let idx = indexOf(ASSETS, assetIdStr) | |
176 | 176 | if (!(isDefined(idx))) | |
177 | 177 | then throw("Invalid payment asset") | |
178 | 178 | else value(idx) | |
179 | 179 | } | |
180 | 180 | ||
181 | 181 | ||
182 | 182 | func validateBetAndGetWinAmount (bet,internalAssetIdx,playerChoice) = { | |
183 | 183 | let dicesCount = size(playerChoice) | |
184 | 184 | func checkAmount (a,x) = if (a) | |
185 | 185 | then true | |
186 | 186 | else (bet == ((x * DECIMALS[internalAssetIdx]) / BETDIVIDERS[internalAssetIdx])) | |
187 | 187 | ||
188 | 188 | if (!({ | |
189 | 189 | let $l = BETS | |
190 | 190 | let $s = size($l) | |
191 | 191 | let $acc0 = false | |
192 | 192 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
193 | 193 | then $a | |
194 | 194 | else checkAmount($a, $l[$i]) | |
195 | 195 | ||
196 | 196 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
197 | 197 | then $a | |
198 | 198 | else throw("List size exceeds 5") | |
199 | 199 | ||
200 | 200 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
201 | 201 | })) | |
202 | 202 | then throw("Bet amount is not valid") | |
203 | 203 | else if ((parseInt(playerChoice) == unit)) | |
204 | 204 | then throw("Invalid player's choice") | |
205 | 205 | else if ((dicesCount != NUM_BETS)) | |
206 | 206 | then throw("Invalid length of player's choice") | |
207 | 207 | else fraction(bet, RATE, RATEMULT) | |
208 | 208 | } | |
209 | 209 | ||
210 | 210 | ||
211 | 211 | let HOR_LINES = [[491, 506, 44], [455, 542, 120], [404, 596, 166], [441, 556, 177], [387, 620, 232], [423, 620, 232], [410, 592, 244], [329, 665, 321], [370, 666, 337], [355, 645, 349], [313, 692, 384], [289, 682, 405], [324, 657, 461], [450, 575, 525], [505, 505, 532]] | |
212 | 212 | ||
213 | 213 | let HALF = 5000 | |
214 | 214 | ||
215 | 215 | let M4 = 10000 | |
216 | 216 | ||
217 | 217 | func getCoords (gameId,rsaSign) = { | |
218 | 218 | func calcAreas (acc,ignored) = { | |
219 | 219 | let i = acc._3 | |
220 | - | let top = HOR_LINES[i] | |
221 | - | let bottom = HOR_LINES[(i + 1)] | |
222 | - | let area4 = (((((top[1] - top[0]) + bottom[1]) - bottom[0]) * (bottom[2] - top[2])) * 5000) | |
223 | - | $Tuple3((acc._1 :+ area4), (acc._2 + area4), (acc._3 + 1)) | |
220 | + | if ((i == 14)) | |
221 | + | then acc | |
222 | + | else { | |
223 | + | let top = HOR_LINES[i] | |
224 | + | let bottom = HOR_LINES[(i + 1)] | |
225 | + | let area4 = (((((top[1] - top[0]) + bottom[1]) - bottom[0]) * (bottom[2] - top[2])) * 5000) | |
226 | + | $Tuple3((acc._1 :+ area4), (acc._2 + area4), (acc._3 + 1)) | |
227 | + | } | |
224 | 228 | } | |
225 | 229 | ||
226 | - | let $ | |
230 | + | let $t079748041 = { | |
227 | 231 | let $l = HOR_LINES | |
228 | 232 | let $s = size($l) | |
229 | 233 | let $acc0 = $Tuple3(nil, 0, 0) | |
230 | 234 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
231 | 235 | then $a | |
232 | 236 | else calcAreas($a, $l[$i]) | |
233 | 237 | ||
234 | 238 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
235 | 239 | then $a | |
236 | - | else throw("List size exceeds | |
240 | + | else throw("List size exceeds 15") | |
237 | 241 | ||
238 | - | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14) | |
242 | + | $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($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14), 15) | |
239 | 243 | } | |
240 | - | let areas = $ | |
241 | - | let totalArea = $ | |
244 | + | let areas = $t079748041._1 | |
245 | + | let totalArea = $t079748041._2 | |
242 | 246 | let rand = (toInt(sha256(rsaSign)) % totalArea) | |
243 | 247 | func check (acc,area) = { | |
244 | 248 | let i = acc._1 | |
245 | 249 | let newArea = (acc._2 + area) | |
246 | 250 | $Tuple3((i + 1), newArea, if ((newArea > rand)) | |
247 | 251 | then i | |
248 | 252 | else acc._3) | |
249 | 253 | } | |
250 | 254 | ||
251 | 255 | let j = ( let $l = areas | |
252 | 256 | let $s = size($l) | |
253 | 257 | let $acc0 = $Tuple3(0, 0, -1) | |
254 | 258 | func $f1_1 ($a,$i) = if (($i >= $s)) | |
255 | 259 | then $a | |
256 | 260 | else check($a, $l[$i]) | |
257 | 261 | ||
258 | 262 | func $f1_2 ($a,$i) = if (($i >= $s)) | |
259 | 263 | then $a | |
260 | 264 | else throw("List size exceeds 14") | |
261 | 265 | ||
262 | 266 | $f1_2($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($f1_1($acc0, 0), 1), 2), 3), 4), 5), 6), 7), 8), 9), 10), 11), 12), 13), 14))._3 | |
263 | 267 | let top = HOR_LINES[j] | |
264 | 268 | let bottom = HOR_LINES[(j + 1)] | |
265 | 269 | let mx04 = ((top[0] + bottom[0]) * HALF) | |
266 | 270 | let mx14 = ((top[1] + bottom[1]) * HALF) | |
267 | 271 | let h4 = ((bottom[2] - top[2]) * M4) | |
268 | 272 | let my4 = ((top[2] + bottom[2]) * HALF) | |
269 | 273 | let randX4 = (mx04 + (toInt(sha256((rsaSign + toBytes(j)))) % (mx14 - mx04))) | |
270 | 274 | let randY4 = (top[2] + (toInt(sha256((rsaSign + toBytes(randX4)))) % h4)) | |
271 | 275 | let a4 = ((top[2] * M4) - randY4) | |
272 | 276 | let b4 = ((bottom[2] * M4) - randY4) | |
273 | 277 | let x04 = fraction(((top[0] * b4) - (bottom[0] * a4)), M4, h4) | |
274 | 278 | let x14 = fraction(((top[1] * b4) - (bottom[1] * a4)), M4, h4) | |
275 | 279 | if ((x04 > randX4)) | |
276 | 280 | then [((2 * mx04) - randX4), ((2 * my4) - randY4)] | |
277 | 281 | else if ((randX4 > x14)) | |
278 | 282 | then [((2 * mx14) - randX4), ((2 * my4) - randY4)] | |
279 | 283 | else [randX4, randY4] | |
280 | 284 | } | |
281 | 285 | ||
282 | 286 | ||
283 | 287 | func generateRandChoice (gameId,rsaSign) = { | |
284 | 288 | let rsaSigValid = rsaVerify_16Kb(SHA256, toBytes(gameId), rsaSign, RSAPUBLIC) | |
285 | 289 | if (!(rsaSigValid)) | |
286 | 290 | then throw("Invalid RSA signature") | |
287 | 291 | else { | |
288 | 292 | let rand = (toInt(sha256(rsaSign)) % RANDOM_RANGE) | |
289 | 293 | toString((rand + 1)) | |
290 | 294 | } | |
291 | 295 | } | |
292 | 296 | ||
293 | 297 | ||
294 | 298 | func isPlayerWin (playerChoice,randChoise) = { | |
295 | 299 | let s = size(playerChoice) | |
296 | 300 | func check (a,x) = if (a) | |
297 | 301 | then true | |
298 | 302 | else if ((s >= x)) | |
299 | 303 | then (take(drop(playerChoice, (x - 1)), 1) == randChoise) | |
300 | 304 | else false | |
301 | 305 | ||
302 | 306 | let $l = [1, 2, 3, 4, 5] | |
303 | 307 | let $s = size($l) | |
304 | 308 | let $acc0 = false | |
305 | 309 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
306 | 310 | then $a | |
307 | 311 | else check($a, $l[$i]) | |
308 | 312 | ||
309 | 313 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
310 | 314 | then $a | |
311 | 315 | else throw("List size exceeds 5") | |
312 | 316 | ||
313 | 317 | $f0_2($f0_1($f0_1($f0_1($f0_1($f0_1($acc0, 0), 1), 2), 3), 4), 5) | |
314 | 318 | } | |
315 | 319 | ||
316 | 320 | ||
317 | 321 | func formatGameDataS (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty,xCoord,yCoord) = makeString([gameStatus, playerChoice, playerPubKey58, startedHeight, winAmount, assetIdx, if ((randOrEmpty == "")) | |
318 | 322 | then "" | |
319 | 323 | else randOrEmpty, xCoord, yCoord], "_") | |
320 | 324 | ||
321 | 325 | ||
322 | 326 | func formatGameData (gameStatus,playerChoice,playerPubKey58,startedHeight,winAmount,assetIdx,randOrEmpty,xCoord,yCoord) = formatGameDataS(gameStatus, playerChoice, playerPubKey58, toString(startedHeight), toString(winAmount), toString(assetIdx), randOrEmpty, toString(xCoord), toString(yCoord)) | |
323 | 327 | ||
324 | 328 | ||
325 | 329 | func finishGameData (origGameData,gameStatus,rand,winByTimeout,xCoord,yCoord) = { | |
326 | 330 | let finishGameData = formatGameDataS(gameStatus, origGameData[IdxPlayerChoice], origGameData[IdxPlayerPubKey58], origGameData[IdxStartedHeight], origGameData[IdxWinAmount], origGameData[IdxAssetId], rand, toString(xCoord), toString(yCoord)) | |
327 | 331 | if (winByTimeout) | |
328 | 332 | then (finishGameData + "_TIMEOUT") | |
329 | 333 | else finishGameData | |
330 | 334 | } | |
331 | 335 | ||
332 | 336 | ||
333 | 337 | func extractGameData (gameId) = split(match getString(this, gameId) { | |
334 | 338 | case str: String => | |
335 | 339 | str | |
336 | 340 | case _ => | |
337 | 341 | throw((("Game: " + gameId) + " not found.")) | |
338 | 342 | }, "_") | |
339 | 343 | ||
340 | 344 | ||
341 | 345 | @Callable(i) | |
342 | 346 | func constructorV1 (rsaPublic64,benzAddress,randOracleTimeFrame,tokensDescriptor) = if ((i.caller != this)) | |
343 | 347 | then throw("not authorized") | |
344 | 348 | else { | |
345 | 349 | func splitter (acc,elem) = { | |
346 | 350 | let tokList = split(elem, ":") | |
347 | 351 | if ((size(tokList) != 3)) | |
348 | 352 | then throw("Invalid asset record") | |
349 | 353 | else $Tuple3((acc._1 :+ tokList[idxAssets]), (acc._2 :+ tokList[idxDecimals]), (acc._3 :+ tokList[idxDividers])) | |
350 | 354 | } | |
351 | 355 | ||
352 | 356 | let r = { | |
353 | 357 | let $l = split_4C(tokensDescriptor, "_") | |
354 | 358 | let $s = size($l) | |
355 | 359 | let $acc0 = $Tuple3(nil, nil, nil) | |
356 | 360 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
357 | 361 | then $a | |
358 | 362 | else splitter($a, $l[$i]) | |
359 | 363 | ||
360 | 364 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
361 | 365 | then $a | |
362 | 366 | else throw("List size exceeds 10") | |
363 | 367 | ||
364 | 368 | $f0_2($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) | |
365 | 369 | } | |
366 | 370 | [StringEntry(RSAPUBLIC64KEY, rsaPublic64), StringEntry(SERVERADDRESSKEY, benzAddress), IntegerEntry(RANDTIMEFRAMEKEY, randOracleTimeFrame), StringEntry(allowedAssetsKey, makeString_2C(r._1, SEP)), StringEntry(assetsDecimalsKey, makeString(r._2, SEP)), StringEntry(betDividersKey, makeString(r._3, SEP))] | |
367 | 371 | } | |
368 | 372 | ||
369 | 373 | ||
370 | 374 | ||
371 | 375 | @Callable(i) | |
372 | 376 | func maintenance (blocked) = if ((i.caller != SERVER)) | |
373 | 377 | then throw("not authorized") | |
374 | 378 | else [BooleanEntry(blockedKey, blocked)] | |
375 | 379 | ||
376 | 380 | ||
377 | 381 | ||
378 | 382 | @Callable(i) | |
379 | 383 | func bet (playerChoice) = if (valueOrElse(getBoolean(blockedKey), false)) | |
380 | 384 | then throw("Game is stopped for maintenence") | |
381 | 385 | else { | |
382 | 386 | let gameId = toBase58String(i.transactionId) | |
383 | 387 | if ((1 >= size(i.payments))) | |
384 | 388 | then throw("2 payments must be attached") | |
385 | 389 | else if (isDefined(getString(this, gameId))) | |
386 | 390 | then throw((("Bet for: " + gameId) + " was already made.")) | |
387 | 391 | else { | |
388 | 392 | let betPmt = value(i.payments[0]) | |
389 | 393 | let feePmt = value(i.payments[1]) | |
390 | 394 | if (isDefined(feePmt.assetId)) | |
391 | 395 | then throw("feePmt (2nd payment) assetId must be in Waves") | |
392 | 396 | else if ((MINFEEWAVES > feePmt.amount)) | |
393 | 397 | then throw("feePmt (2nd payment) must be >= 0.005 Waves") | |
394 | 398 | else { | |
395 | 399 | let assetIdStr = assetIdToStr(betPmt.assetId) | |
396 | 400 | let internalAssetIdx = validateAndGetAssetIdx(assetIdStr) | |
397 | 401 | let commission = feePmt.amount | |
398 | 402 | let winAmount = validateBetAndGetWinAmount(betPmt.amount, internalAssetIdx, playerChoice) | |
399 | 403 | let playerPubKey58 = toBase58String(i.callerPublicKey) | |
400 | 404 | let gameData = formatGameData(STATESUBMITTED, playerChoice, playerPubKey58, height, winAmount, internalAssetIdx, "", -1, -1) | |
401 | 405 | [IntegerEntry(keyReservationByAssetIdx(internalAssetIdx), increaseReserveAmount(winAmount, internalAssetIdx)), incrementInt(GAMESCOUNTERKEY), StringEntry(gameId, gameData), ScriptTransfer(SERVER, commission, feePmt.assetId)] | |
402 | 406 | } | |
403 | 407 | } | |
404 | 408 | } | |
405 | 409 | ||
406 | 410 | ||
407 | 411 | ||
408 | 412 | @Callable(i) | |
409 | 413 | func withdraw (gameId,rsaSign) = { | |
410 | 414 | let gameData = extractGameData(gameId) | |
411 | 415 | let gameState = gameData[IdxGameState] | |
412 | 416 | let playerChoice = gameData[IdxPlayerChoice] | |
413 | 417 | let startedHeight = parseIntValue(gameData[IdxStartedHeight]) | |
414 | 418 | let winAmount = parseIntValue(gameData[IdxWinAmount]) | |
415 | 419 | let assetIdx = parseIntValue(gameData[IdxAssetId]) | |
416 | 420 | let playerPubKey58 = gameData[IdxPlayerPubKey58] | |
417 | 421 | let playerAddress = addressFromPublicKey(fromBase58String(playerPubKey58)) | |
418 | 422 | if ((gameState != STATESUBMITTED)) | |
419 | 423 | then throw("Invalid game state for passed gameId") | |
420 | 424 | else if ((i.caller != SERVER)) | |
421 | 425 | then throw("Regular withdraw can be done by server only") | |
422 | 426 | else { | |
423 | 427 | let winByTimeout = ((height - startedHeight) > RANDORACLETIMEFRAME) | |
424 | 428 | let randChoice = if (winByTimeout) | |
425 | 429 | then take(playerChoice, 1) | |
426 | 430 | else generateRandChoice(gameId, rsaSign) | |
427 | 431 | let playerWin = isPlayerWin(playerChoice, randChoice) | |
428 | 432 | let newGameStatus = if (playerWin) | |
429 | 433 | then STATEWON | |
430 | 434 | else STATELOST | |
431 | 435 | let coords = if (playerWin) | |
432 | 436 | then [-(M4), -(M4)] | |
433 | 437 | else getCoords(gameId, rsaSign) | |
434 | 438 | let newGameData = finishGameData(gameData, newGameStatus, randChoice, winByTimeout, (coords[0] / M4), (coords[1] / M4)) | |
435 | 439 | ([StringEntry(gameId, newGameData), decreaseReservedAmount(gameId, assetIdx, winAmount)] ++ (if (playerWin) | |
436 | 440 | then [ScriptTransfer(playerAddress, winAmount, assetIdFromStr(ASSETS[assetIdx]))] | |
437 | 441 | else nil)) | |
438 | 442 | } | |
439 | 443 | } | |
440 | 444 | ||
441 | 445 | ||
442 | 446 | @Verifier(tx) | |
443 | 447 | func verify () = if (sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey)) | |
444 | 448 | then match tx { | |
445 | 449 | case ttx: TransferTransaction => | |
446 | 450 | let assetIdx = validateAndGetAssetIdx(assetIdToStr(ttx.assetId)) | |
447 | 451 | ((getAssetBalance(ttx.assetId) - ttx.amount) >= getIntOr(keyReservationByAssetIdx(assetIdx), 0)) | |
448 | 452 | case stx: SetScriptTransaction => | |
449 | 453 | func checker (acc,asset) = if (acc) | |
450 | 454 | then (getIntOr(keyReservationByAssetStr(asset), 0) == 0) | |
451 | 455 | else false | |
452 | 456 | ||
453 | 457 | let $l = ASSETS | |
454 | 458 | let $s = size($l) | |
455 | 459 | let $acc0 = true | |
456 | 460 | func $f0_1 ($a,$i) = if (($i >= $s)) | |
457 | 461 | then $a | |
458 | 462 | else checker($a, $l[$i]) | |
459 | 463 | ||
460 | 464 | func $f0_2 ($a,$i) = if (($i >= $s)) | |
461 | 465 | then $a | |
462 | 466 | else throw("List size exceeds 10") | |
463 | 467 | ||
464 | 468 | $f0_2($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) | |
465 | 469 | case itx: InvokeScriptTransaction => | |
466 | 470 | if ((itx.dApp == this)) | |
467 | 471 | then (itx.function == "constructorV1") | |
468 | 472 | else false | |
469 | 473 | case _ => | |
470 | 474 | false | |
471 | 475 | } | |
472 | 476 | else false | |
473 | 477 |
github/deemru/w8io/169f3d6 123.54 ms ◑