tx · 36mz51n2TdDLiidgd9yAoxygkhgXpmHgjoNUcbbR4QkC 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito: -0.05000000 Waves 2021.09.09 18:11 [1695672] smart account 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito > SELF 0.00000000 Waves
{ "type": 13, "id": "36mz51n2TdDLiidgd9yAoxygkhgXpmHgjoNUcbbR4QkC", "fee": 5000000, "feeAssetId": null, "timestamp": 1631200311183, "version": 2, "chainId": 84, "sender": "3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito", "senderPublicKey": "7PMrxEzirv6h9Z2zqLE47qrZd6v1AbRZER5Aqfo95Eyr", "proofs": [ "3sXCbVBRyiHsiycNGBGa7dk8eTxXhWnifSkLmytJVypfATjzXAP6f3KveG56TftufrMkyjz3w1wsb2E1hQ17QckZ" ], "script": "base64:AAIFAAAAAAAAACgIAhIGCgQBAQEBEgMKAQESAwoBARIFCgMICAgSAwoBCBIECgIICBIAAAAANAAAAAAQaW5jdWJhdG9yQWRkcmVzcwEAAAAaAVQu1YzRxAHn1ekAzs1AJJ6xFAc06V7PK6oAAAAADmJyZWVkZXJBZGRyZXNzAQAAABoBVIXmeysidPaPsP+lKHIt9Vw8rE+lS45bjgAAAAAVcmFyaXR5UHJvdmlkZXJBZGRyZXNzAQAAABoBVPqvXAIOK77VhJOb48rzK/MJjwrn6vR1pAAAAAALZWdnc0Fzc2V0SWQBAAAAICUCZcz3BGjIvgFZkXjlWFo4ZhQTrUpMSrf+BRdIFxaDAAAAAAVTTE9UUwAAAAAAAAAACgAAAAAHV0FJVElORwAAAAAAAAAACAAAAAAMc3RlcER1cmF0aW9uAAAAAAAAAAAFAQAAAA10cnlHZXRJbnRlZ2VyAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQaAAAAAgUAAAAEdGhpcwUAAAADa2V5AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWIFAAAAByRtYXRjaDAFAAAAAWIAAAAA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AA1jYWxsZXJBZGRyZXNzAAAAAAAAAAAABQAAAANuaWwAAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleWSFms4=", "height": 1695672, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 5NXBvXDpLiVQxJNNx2rEuwAtuqVkc3XZZAcNMh9PNGfr Next: HLY34fT7CAdnkN3xqaiPyMSyrab7y5c1VcFJPrWBFiup Diff:
Old | New | Differences | |
---|---|---|---|
336 | 336 | then throw("It is the maker's turn to pick now") | |
337 | 337 | else if ((gameStep > 1)) | |
338 | 338 | then throw("Ducks have already been picked") | |
339 | - | else if (checkDuckOwner(i.caller, fromBase58String(worstDuckId))) | |
339 | + | else if (!(checkDuckOwner(i.caller, fromBase58String(worstDuckId)))) | |
340 | 340 | then throw((("Asset " + worstDuckId) + " doesn't belong to you")) | |
341 | - | else if (checkDuckOwner(i.caller, fromBase58String(mediumDuckId))) | |
341 | + | else if (!(checkDuckOwner(i.caller, fromBase58String(mediumDuckId)))) | |
342 | 342 | then throw((("Asset " + mediumDuckId) + " doesn't belong to you")) | |
343 | - | else if (checkDuckOwner(i.caller, fromBase58String(bestDuckId))) | |
343 | + | else if (!(checkDuckOwner(i.caller, fromBase58String(bestDuckId)))) | |
344 | 344 | then throw((("Asset " + bestDuckId) + " doesn't belong to you")) | |
345 | 345 | else if (if ((5 > worstRarityRange)) | |
346 | 346 | then if ((worstRarity > (worstRarityRange * 10))) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let incubatorAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh' | |
5 | 5 | ||
6 | 6 | let breederAddress = base58'3N285kYUMxPi6oZsdWrxhSY34dJHyu4kRN5' | |
7 | 7 | ||
8 | 8 | let rarityProviderAddress = base58'3NCman4dCzk1HWWU4DPTr5rsbhvuUCwwUZh' | |
9 | 9 | ||
10 | 10 | let eggsAssetId = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN' | |
11 | 11 | ||
12 | 12 | let SLOTS = 10 | |
13 | 13 | ||
14 | 14 | let WAITING = 8 | |
15 | 15 | ||
16 | 16 | let stepDuration = 5 | |
17 | 17 | ||
18 | 18 | func tryGetInteger (key) = match getInteger(this, key) { | |
19 | 19 | case b: Int => | |
20 | 20 | b | |
21 | 21 | case _ => | |
22 | 22 | 0 | |
23 | 23 | } | |
24 | 24 | ||
25 | 25 | ||
26 | 26 | func tryGetString (key) = match getString(this, key) { | |
27 | 27 | case a: String => | |
28 | 28 | a | |
29 | 29 | case _ => | |
30 | 30 | "" | |
31 | 31 | } | |
32 | 32 | ||
33 | 33 | ||
34 | 34 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
35 | 35 | case b: Boolean => | |
36 | 36 | b | |
37 | 37 | case _ => | |
38 | 38 | false | |
39 | 39 | } | |
40 | 40 | ||
41 | 41 | ||
42 | 42 | func getNextGameId () = { | |
43 | 43 | let nextId = tryGetInteger("nextGameId") | |
44 | 44 | if ((nextId == 0)) | |
45 | 45 | then 1 | |
46 | 46 | else nextId | |
47 | 47 | } | |
48 | 48 | ||
49 | 49 | ||
50 | 50 | func getPlayerCurrentGameKey (playerAddress) = (playerAddress + "_currentGame") | |
51 | 51 | ||
52 | 52 | ||
53 | 53 | func getPlayerCurrentGame (playerAddress) = tryGetInteger(getPlayerCurrentGameKey(playerAddress)) | |
54 | 54 | ||
55 | 55 | ||
56 | 56 | func getSlotKey (slot) = ("slot" + toString(slot)) | |
57 | 57 | ||
58 | 58 | ||
59 | 59 | func getSlot (slot) = tryGetInteger(getSlotKey(slot)) | |
60 | 60 | ||
61 | 61 | ||
62 | 62 | func getPlayerRoleKey (gameId,playerAddress) = ((("game" + toString(gameId)) + "_") + playerAddress) | |
63 | 63 | ||
64 | 64 | ||
65 | 65 | func getPlayerRole (gameId,playerAddress) = tryGetString(getPlayerRoleKey(gameId, playerAddress)) | |
66 | 66 | ||
67 | 67 | ||
68 | 68 | func getMakerKey (gameId) = (("game" + toString(gameId)) + "_maker") | |
69 | 69 | ||
70 | 70 | ||
71 | 71 | func getMaker (gameId) = tryGetString(getMakerKey(gameId)) | |
72 | 72 | ||
73 | 73 | ||
74 | 74 | func getTakerKey (gameId) = (("game" + toString(gameId)) + "_taker") | |
75 | 75 | ||
76 | 76 | ||
77 | 77 | func getTaker (gameId) = tryGetString(getTakerKey(gameId)) | |
78 | 78 | ||
79 | 79 | ||
80 | 80 | func getBetEggsKey (gameId) = (("game" + toString(gameId)) + "_betEggs") | |
81 | 81 | ||
82 | 82 | ||
83 | 83 | func getBetEggs (gameId) = tryGetInteger(getBetEggsKey(gameId)) | |
84 | 84 | ||
85 | 85 | ||
86 | 86 | func getWaitingExpirationHeightKey (gameId) = (("game" + toString(gameId)) + "_waitingExpirationHeight") | |
87 | 87 | ||
88 | 88 | ||
89 | 89 | func getWaitingExpirationHeight (gameId) = tryGetInteger(getWaitingExpirationHeightKey(gameId)) | |
90 | 90 | ||
91 | 91 | ||
92 | 92 | func getExpirationHeightKey (gameId) = (("game" + toString(gameId)) + "_expirationHeight") | |
93 | 93 | ||
94 | 94 | ||
95 | 95 | func getExpirationHeight (gameId) = tryGetInteger(getExpirationHeightKey(gameId)) | |
96 | 96 | ||
97 | 97 | ||
98 | 98 | func getRarityRangeKey (gameId,rangePosition) = ((("game" + toString(gameId)) + "_rarityRange_") + rangePosition) | |
99 | 99 | ||
100 | 100 | ||
101 | 101 | func getRarityRange (gameId,rangePosition) = tryGetInteger(getRarityRangeKey(gameId, rangePosition)) | |
102 | 102 | ||
103 | 103 | ||
104 | 104 | func getStepKey (gameId) = (("game" + toString(gameId)) + "_step") | |
105 | 105 | ||
106 | 106 | ||
107 | 107 | func getStep (gameId) = tryGetInteger(getStepKey(gameId)) | |
108 | 108 | ||
109 | 109 | ||
110 | 110 | func getRarityKey (gameId,playerRole,rangePosition) = (((((("game" + toString(gameId)) + "_") + playerRole) + "_") + rangePosition) + "Rarity") | |
111 | 111 | ||
112 | 112 | ||
113 | 113 | func getRarity (gameId,playerRole,rangePosition) = tryGetInteger(getRarityKey(gameId, playerRole, rangePosition)) | |
114 | 114 | ||
115 | 115 | ||
116 | 116 | func getDuckIdKey (gameId,playerRole,rangePosition) = (((((("game" + toString(gameId)) + "_") + playerRole) + "_") + rangePosition) + "DuckId") | |
117 | 117 | ||
118 | 118 | ||
119 | 119 | func getDuckId (gameId,playerRole,rangePosition) = tryGetString(getDuckIdKey(gameId, playerRole, rangePosition)) | |
120 | 120 | ||
121 | 121 | ||
122 | 122 | func getCommitKey (gameId,playerRole) = (((("game" + toString(gameId)) + "_") + playerRole) + "_commit") | |
123 | 123 | ||
124 | 124 | ||
125 | 125 | func getCommit (gameId,playerRole) = tryGetString(getCommitKey(gameId, playerRole)) | |
126 | 126 | ||
127 | 127 | ||
128 | 128 | func getDuckOrderKey (gameId,playerRole) = (((("game" + toString(gameId)) + "_") + playerRole) + "_duckOrder") | |
129 | 129 | ||
130 | 130 | ||
131 | 131 | func getDuckOrder (gameId,playerRole) = tryGetString(getDuckOrderKey(gameId, playerRole)) | |
132 | 132 | ||
133 | 133 | ||
134 | 134 | func getGameResultKey (gameId,playerAddress) = (((("game" + toString(gameId)) + "_") + playerAddress) + "_result") | |
135 | 135 | ||
136 | 136 | ||
137 | 137 | func getGameResult (gameId,playerAddress) = tryGetString(getGameResultKey(gameId, playerAddress)) | |
138 | 138 | ||
139 | 139 | ||
140 | 140 | func getPlayerWinsKey (playerAddress) = (playerAddress + "_wins") | |
141 | 141 | ||
142 | 142 | ||
143 | 143 | func getPlayerWins (playerAddress) = tryGetInteger(getPlayerWinsKey(playerAddress)) | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func getPlayerLosesKey (playerAddress) = (playerAddress + "_loses") | |
147 | 147 | ||
148 | 148 | ||
149 | 149 | func getPlayerLoses (playerAddress) = tryGetInteger(getPlayerLosesKey(playerAddress)) | |
150 | 150 | ||
151 | 151 | ||
152 | 152 | func getPlayerDrawsKey (playerAddress) = (playerAddress + "_draws") | |
153 | 153 | ||
154 | 154 | ||
155 | 155 | func getPlayerDraws (playerAddress) = tryGetInteger(getPlayerDrawsKey(playerAddress)) | |
156 | 156 | ||
157 | 157 | ||
158 | 158 | func getGamesPlayedKey () = "gamesPlayed" | |
159 | 159 | ||
160 | 160 | ||
161 | 161 | func getGamesPlayed () = tryGetInteger(getGamesPlayedKey()) | |
162 | 162 | ||
163 | 163 | ||
164 | 164 | func checkDuckOwner (ownerAddress,assetId) = (assetBalance(ownerAddress, assetId) > 0) | |
165 | 165 | ||
166 | 166 | ||
167 | 167 | func getScore (a,b) = if ((a > b)) | |
168 | 168 | then 1 | |
169 | 169 | else if ((b > a)) | |
170 | 170 | then -1 | |
171 | 171 | else 0 | |
172 | 172 | ||
173 | 173 | ||
174 | 174 | func getWinner (gameId) = { | |
175 | 175 | let gameStep = getStep(gameId) | |
176 | 176 | if ((6 > gameStep)) | |
177 | 177 | then { | |
178 | 178 | let expirationHeight = getExpirationHeight(gameId) | |
179 | 179 | if ((expirationHeight == 0)) | |
180 | 180 | then throw("Game is not started") | |
181 | 181 | else if ((expirationHeight > height)) | |
182 | 182 | then throw("Game is not finished or expired") | |
183 | 183 | else if (((getStep(gameId) % 2) == 0)) | |
184 | 184 | then "maker" | |
185 | 185 | else "taker" | |
186 | 186 | } | |
187 | 187 | else { | |
188 | 188 | let makerDuckOrder = split(getDuckOrder(gameId, "maker"), ",") | |
189 | 189 | let takerDuckOrder = split(getDuckOrder(gameId, "taker"), ",") | |
190 | 190 | let makerRarity1 = getRarity(gameId, "maker", makerDuckOrder[0]) | |
191 | 191 | let makerRarity2 = getRarity(gameId, "maker", makerDuckOrder[1]) | |
192 | 192 | let makerRarity3 = getRarity(gameId, "maker", makerDuckOrder[2]) | |
193 | 193 | let takerRarity1 = getRarity(gameId, "taker", takerDuckOrder[0]) | |
194 | 194 | let takerRarity2 = getRarity(gameId, "taker", takerDuckOrder[1]) | |
195 | 195 | let takerRarity3 = getRarity(gameId, "taker", takerDuckOrder[2]) | |
196 | 196 | let makerScore = ((getScore(makerRarity1, takerRarity1) + getScore(makerRarity2, takerRarity2)) + getScore(makerRarity3, takerRarity3)) | |
197 | 197 | if ((makerScore > 0)) | |
198 | 198 | then "maker" | |
199 | 199 | else if ((0 > makerScore)) | |
200 | 200 | then "taker" | |
201 | 201 | else "draw" | |
202 | 202 | } | |
203 | 203 | } | |
204 | 204 | ||
205 | 205 | ||
206 | 206 | @Callable(i) | |
207 | 207 | func makeGame (slot,rarityRangeWorst,rarityRangeMedium,rarityRangeBest) = { | |
208 | 208 | let callerAddress = toBase58String(i.caller.bytes) | |
209 | 209 | let slotGameId = getSlot(slot) | |
210 | 210 | let payment = value(i.payments[0]) | |
211 | 211 | let eggs = payment.amount | |
212 | 212 | let gameId = getNextGameId() | |
213 | 213 | if ((getPlayerCurrentGame(callerAddress) != 0)) | |
214 | 214 | then throw("You already have an active game") | |
215 | 215 | else if (if ((0 > slot)) | |
216 | 216 | then true | |
217 | 217 | else (slot >= SLOTS)) | |
218 | 218 | then throw("Invalid slot") | |
219 | 219 | else if ((slotGameId != 0)) | |
220 | 220 | then throw("This slot is busy") | |
221 | 221 | else if ((payment.assetId != eggsAssetId)) | |
222 | 222 | then throw(("You can attach only EGGs with the following asset id: " + toBase58String(eggsAssetId))) | |
223 | 223 | else if ((eggs != 1)) | |
224 | 224 | then throw("Bet must be 0.01 EGG during beta test") | |
225 | 225 | else if (if ((1 > rarityRangeWorst)) | |
226 | 226 | then true | |
227 | 227 | else (rarityRangeWorst > 5)) | |
228 | 228 | then throw("Invalid rarity range for the worst duck") | |
229 | 229 | else if (if ((1 > rarityRangeMedium)) | |
230 | 230 | then true | |
231 | 231 | else (rarityRangeMedium > 5)) | |
232 | 232 | then throw("Invalid rarity range for the medium duck") | |
233 | 233 | else if (if ((1 > rarityRangeBest)) | |
234 | 234 | then true | |
235 | 235 | else (rarityRangeBest > 5)) | |
236 | 236 | then throw("Invalid rarity range for the best duck") | |
237 | 237 | else if ((rarityRangeWorst > rarityRangeMedium)) | |
238 | 238 | then throw("The medium range can't be less than the worst one") | |
239 | 239 | else if ((rarityRangeMedium > rarityRangeBest)) | |
240 | 240 | then throw("The best range can't be worse than the medium one") | |
241 | 241 | else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), gameId), StringEntry(getMakerKey(gameId), callerAddress), StringEntry(getPlayerRoleKey(gameId, callerAddress), "maker"), IntegerEntry(getBetEggsKey(gameId), eggs), IntegerEntry(getRarityRangeKey(gameId, "worst"), rarityRangeWorst), IntegerEntry(getRarityRangeKey(gameId, "medium"), rarityRangeMedium), IntegerEntry(getRarityRangeKey(gameId, "best"), rarityRangeBest), IntegerEntry(getWaitingExpirationHeightKey(gameId), (height + WAITING)), IntegerEntry(getSlotKey(slot), gameId), IntegerEntry("nextGameId", (gameId + 1))] | |
242 | 242 | } | |
243 | 243 | ||
244 | 244 | ||
245 | 245 | ||
246 | 246 | @Callable(i) | |
247 | 247 | func takeGame (slot) = { | |
248 | 248 | let callerAddress = toBase58String(i.caller.bytes) | |
249 | 249 | let gameId = getSlot(slot) | |
250 | 250 | let payment = value(i.payments[0]) | |
251 | 251 | if ((getPlayerCurrentGame(callerAddress) != 0)) | |
252 | 252 | then throw("You already have an active game") | |
253 | 253 | else if (if ((0 > slot)) | |
254 | 254 | then true | |
255 | 255 | else (slot >= SLOTS)) | |
256 | 256 | then throw("Invalid slot") | |
257 | 257 | else if ((getSlot(slot) == 0)) | |
258 | 258 | then throw("This slot is empty") | |
259 | 259 | else if ((payment.assetId != eggsAssetId)) | |
260 | 260 | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId))) | |
261 | 261 | else if ((payment.amount != getBetEggs(gameId))) | |
262 | 262 | then throw("Insufficient eggs amount") | |
263 | 263 | else if ((height >= getWaitingExpirationHeight(gameId))) | |
264 | 264 | then throw("This game is expired") | |
265 | 265 | else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), gameId), StringEntry(getTakerKey(gameId), callerAddress), StringEntry(getPlayerRoleKey(gameId, callerAddress), "taker"), IntegerEntry(getStepKey(gameId), 0), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration)), IntegerEntry(getSlotKey(slot), 0), IntegerEntry("gamesPlayed", (getGamesPlayed() + 1))] | |
266 | 266 | } | |
267 | 267 | ||
268 | 268 | ||
269 | 269 | ||
270 | 270 | @Callable(i) | |
271 | 271 | func kickGame (slot) = { | |
272 | 272 | let gameId = getSlot(slot) | |
273 | 273 | if (if ((0 > slot)) | |
274 | 274 | then true | |
275 | 275 | else (slot >= SLOTS)) | |
276 | 276 | then throw("Invalid slot") | |
277 | 277 | else if ((gameId == 0)) | |
278 | 278 | then throw("Slot is empty") | |
279 | 279 | else if ((getWaitingExpirationHeight(gameId) > height)) | |
280 | 280 | then throw("Waiting is not finished yet") | |
281 | 281 | else { | |
282 | 282 | let maker = getMaker(gameId) | |
283 | 283 | [IntegerEntry(getPlayerCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(fromBase58String(maker)), getBetEggs(gameId), eggsAssetId)] | |
284 | 284 | } | |
285 | 285 | } | |
286 | 286 | ||
287 | 287 | ||
288 | 288 | ||
289 | 289 | @Callable(i) | |
290 | 290 | func pickDucks (worstDuckId,mediumDuckId,bestDuckId) = { | |
291 | 291 | let callerAddress = toBase58String(i.caller.bytes) | |
292 | 292 | let gameId = getPlayerCurrentGame(callerAddress) | |
293 | 293 | let playerRole = getPlayerRole(gameId, callerAddress) | |
294 | 294 | let gameStep = getStep(gameId) | |
295 | 295 | let worstRarityRange = getRarityRange(gameId, "worst") | |
296 | 296 | let mediumRarityRange = getRarityRange(gameId, "medium") | |
297 | 297 | let bestRarityRange = getRarityRange(gameId, "best") | |
298 | 298 | let invokeWorstRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [worstDuckId], nil) | |
299 | 299 | if ((invokeWorstRes == invokeWorstRes)) | |
300 | 300 | then { | |
301 | 301 | let worstRarity = match invokeWorstRes { | |
302 | 302 | case r: Int => | |
303 | 303 | r | |
304 | 304 | case _ => | |
305 | 305 | throw("Incorrect invoke result") | |
306 | 306 | } | |
307 | 307 | let invokeMediumRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [mediumDuckId], nil) | |
308 | 308 | if ((invokeMediumRes == invokeMediumRes)) | |
309 | 309 | then { | |
310 | 310 | let mediumRarity = match invokeMediumRes { | |
311 | 311 | case r: Int => | |
312 | 312 | r | |
313 | 313 | case _ => | |
314 | 314 | throw("Incorrect invoke result") | |
315 | 315 | } | |
316 | 316 | let invokeBestRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [bestDuckId], nil) | |
317 | 317 | if ((invokeBestRes == invokeBestRes)) | |
318 | 318 | then { | |
319 | 319 | let bestRarity = match invokeWorstRes { | |
320 | 320 | case r: Int => | |
321 | 321 | r | |
322 | 322 | case _ => | |
323 | 323 | throw("Incorrect invoke result") | |
324 | 324 | } | |
325 | 325 | if ((gameId == 0)) | |
326 | 326 | then throw("You don't have an active game") | |
327 | 327 | else if ((getExpirationHeight(gameId) == 0)) | |
328 | 328 | then throw("Game is not started") | |
329 | 329 | else if (if ((gameStep == 0)) | |
330 | 330 | then (playerRole != "taker") | |
331 | 331 | else false) | |
332 | 332 | then throw("It is the taker's turn to pick now") | |
333 | 333 | else if (if ((gameStep == 1)) | |
334 | 334 | then (playerRole != "maker") | |
335 | 335 | else false) | |
336 | 336 | then throw("It is the maker's turn to pick now") | |
337 | 337 | else if ((gameStep > 1)) | |
338 | 338 | then throw("Ducks have already been picked") | |
339 | - | else if (checkDuckOwner(i.caller, fromBase58String(worstDuckId))) | |
339 | + | else if (!(checkDuckOwner(i.caller, fromBase58String(worstDuckId)))) | |
340 | 340 | then throw((("Asset " + worstDuckId) + " doesn't belong to you")) | |
341 | - | else if (checkDuckOwner(i.caller, fromBase58String(mediumDuckId))) | |
341 | + | else if (!(checkDuckOwner(i.caller, fromBase58String(mediumDuckId)))) | |
342 | 342 | then throw((("Asset " + mediumDuckId) + " doesn't belong to you")) | |
343 | - | else if (checkDuckOwner(i.caller, fromBase58String(bestDuckId))) | |
343 | + | else if (!(checkDuckOwner(i.caller, fromBase58String(bestDuckId)))) | |
344 | 344 | then throw((("Asset " + bestDuckId) + " doesn't belong to you")) | |
345 | 345 | else if (if ((5 > worstRarityRange)) | |
346 | 346 | then if ((worstRarity > (worstRarityRange * 10))) | |
347 | 347 | then true | |
348 | 348 | else (((worstRarityRange - 1) * 10) >= worstRarity) | |
349 | 349 | else false) | |
350 | 350 | then throw("Worst duck doesn't fit rarity range") | |
351 | 351 | else if (if ((5 > mediumRarityRange)) | |
352 | 352 | then if ((mediumRarity > (mediumRarityRange * 10))) | |
353 | 353 | then true | |
354 | 354 | else (((mediumRarityRange - 1) * 10) >= mediumRarity) | |
355 | 355 | else false) | |
356 | 356 | then throw("Medium duck doesn't fit rarity range") | |
357 | 357 | else if (if ((5 > bestRarityRange)) | |
358 | 358 | then if ((bestRarity > (bestRarityRange * 10))) | |
359 | 359 | then true | |
360 | 360 | else (((bestRarityRange - 1) * 10) >= bestRarity) | |
361 | 361 | else false) | |
362 | 362 | then throw("Best duck doesn't fit rarity range") | |
363 | 363 | else if (if ((worstRarityRange == 5)) | |
364 | 364 | then (40 >= worstRarity) | |
365 | 365 | else false) | |
366 | 366 | then throw("Worst duck doesn't fit rarity range") | |
367 | 367 | else if (if ((mediumRarityRange == 5)) | |
368 | 368 | then (40 >= mediumRarity) | |
369 | 369 | else false) | |
370 | 370 | then throw("Medium duck doesn't fit rarity range") | |
371 | 371 | else if (if ((bestRarityRange == 5)) | |
372 | 372 | then (40 >= bestRarity) | |
373 | 373 | else false) | |
374 | 374 | then throw("Best duck doesn't fit rarity range") | |
375 | 375 | else if (if (if ((worstRarity == mediumRarity)) | |
376 | 376 | then true | |
377 | 377 | else (worstRarity == bestRarity)) | |
378 | 378 | then true | |
379 | 379 | else (mediumRarity == bestRarity)) | |
380 | 380 | then throw("Ducks of the same rarity can't play") | |
381 | 381 | else [IntegerEntry(getRarityKey(gameId, playerRole, "worst"), worstRarity), IntegerEntry(getRarityKey(gameId, playerRole, "medium"), mediumRarity), IntegerEntry(getRarityKey(gameId, playerRole, "best"), bestRarity), StringEntry(getDuckIdKey(gameId, playerRole, "worst"), worstDuckId), StringEntry(getDuckIdKey(gameId, playerRole, "medium"), mediumDuckId), StringEntry(getDuckIdKey(gameId, playerRole, "best"), bestDuckId), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))] | |
382 | 382 | } | |
383 | 383 | else throw("Strict value is not equal to itself.") | |
384 | 384 | } | |
385 | 385 | else throw("Strict value is not equal to itself.") | |
386 | 386 | } | |
387 | 387 | else throw("Strict value is not equal to itself.") | |
388 | 388 | } | |
389 | 389 | ||
390 | 390 | ||
391 | 391 | ||
392 | 392 | @Callable(i) | |
393 | 393 | func commit (hash) = { | |
394 | 394 | let callerAddress = toBase58String(i.caller.bytes) | |
395 | 395 | let gameId = getPlayerCurrentGame(callerAddress) | |
396 | 396 | let playerRole = getPlayerRole(gameId, callerAddress) | |
397 | 397 | let gameStep = getStep(gameId) | |
398 | 398 | if ((gameId == 0)) | |
399 | 399 | then throw("You don't have an active game") | |
400 | 400 | else if ((2 > gameStep)) | |
401 | 401 | then throw("Commit is not started") | |
402 | 402 | else if (if ((gameStep == 2)) | |
403 | 403 | then (playerRole != "taker") | |
404 | 404 | else false) | |
405 | 405 | then throw("It is the taker's turn to pick now") | |
406 | 406 | else if (if ((gameStep == 3)) | |
407 | 407 | then (playerRole != "maker") | |
408 | 408 | else false) | |
409 | 409 | then throw("It is the maker's turn to pick now") | |
410 | 410 | else if ((gameStep > 3)) | |
411 | 411 | then throw("Commit is finished") | |
412 | 412 | else [StringEntry(getCommitKey(gameId, playerRole), hash), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))] | |
413 | 413 | } | |
414 | 414 | ||
415 | 415 | ||
416 | 416 | ||
417 | 417 | @Callable(i) | |
418 | 418 | func reveal (duckOrder,salt) = { | |
419 | 419 | let callerAddress = toBase58String(i.caller.bytes) | |
420 | 420 | let gameId = getPlayerCurrentGame(callerAddress) | |
421 | 421 | let playerRole = getPlayerRole(gameId, callerAddress) | |
422 | 422 | let gameStep = getStep(gameId) | |
423 | 423 | if ((gameId == 0)) | |
424 | 424 | then throw("You don't have an active game") | |
425 | 425 | else if ((4 > gameStep)) | |
426 | 426 | then throw("Reveal is not started") | |
427 | 427 | else if (if ((gameStep == 4)) | |
428 | 428 | then (playerRole != "taker") | |
429 | 429 | else false) | |
430 | 430 | then throw("It is the taker's turn to pick now") | |
431 | 431 | else if (if ((gameStep == 5)) | |
432 | 432 | then (playerRole != "maker") | |
433 | 433 | else false) | |
434 | 434 | then throw("It is the maker's turn to pick now") | |
435 | 435 | else if ((gameStep > 5)) | |
436 | 436 | then throw("Reveal is finished") | |
437 | 437 | else if (if (if (if (if (if ((duckOrder != "worst,medium,best")) | |
438 | 438 | then (duckOrder != "worst,best,medium") | |
439 | 439 | else false) | |
440 | 440 | then (duckOrder != "medium,worst,best") | |
441 | 441 | else false) | |
442 | 442 | then (duckOrder != "medium,best,worst") | |
443 | 443 | else false) | |
444 | 444 | then (duckOrder != "best,worst,medium") | |
445 | 445 | else false) | |
446 | 446 | then (duckOrder != "best,medium,worst") | |
447 | 447 | else false) | |
448 | 448 | then throw("Reveal data is not valid") | |
449 | 449 | else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, playerRole))) | |
450 | 450 | then throw("Reveal doesn't match commit") | |
451 | 451 | else [StringEntry(getDuckOrderKey(gameId, playerRole), duckOrder), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))] | |
452 | 452 | } | |
453 | 453 | ||
454 | 454 | ||
455 | 455 | ||
456 | 456 | @Callable(i) | |
457 | 457 | func getPrize () = { | |
458 | 458 | let callerAddress = toBase58String(i.caller.bytes) | |
459 | 459 | let gameId = getPlayerCurrentGame(callerAddress) | |
460 | 460 | let playerRole = getPlayerRole(gameId, callerAddress) | |
461 | 461 | let anotherPlayerAddress = if ((playerRole == "maker")) | |
462 | 462 | then getTaker(gameId) | |
463 | 463 | else getMaker(gameId) | |
464 | 464 | let winner = getWinner(gameId) | |
465 | 465 | if ((gameId == 0)) | |
466 | 466 | then throw("You don't have an active game") | |
467 | 467 | else if ((winner == playerRole)) | |
468 | 468 | then [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0), IntegerEntry(getPlayerCurrentGameKey(anotherPlayerAddress), 0), IntegerEntry(getPlayerWinsKey(callerAddress), (getPlayerWins(callerAddress) + 1)), IntegerEntry(getPlayerLosesKey(anotherPlayerAddress), (getPlayerLoses(anotherPlayerAddress) + 1)), StringEntry(getGameResultKey(gameId, callerAddress), "win"), StringEntry(getGameResultKey(gameId, anotherPlayerAddress), "lose"), ScriptTransfer(i.caller, (getBetEggs(gameId) * 2), eggsAssetId)] | |
469 | 469 | else if ((winner == "draw")) | |
470 | 470 | then [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0), IntegerEntry(getPlayerDrawsKey(callerAddress), (getPlayerDraws(callerAddress) + 1)), StringEntry(getGameResultKey(gameId, callerAddress), "draw"), ScriptTransfer(i.caller, getBetEggs(gameId), eggsAssetId)] | |
471 | 471 | else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0)] | |
472 | 472 | } | |
473 | 473 | ||
474 | 474 | ||
475 | 475 | @Verifier(tx) | |
476 | 476 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
477 | 477 |
github/deemru/w8io/026f985 88.81 ms ◑