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