tx · D9nuK465nEitbyB4YKUs6J6jZjaekCQL7PVwq5Mzafkb 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito: -0.05000000 Waves 2021.09.10 14:31 [1696896] smart account 3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito > SELF 0.00000000 Waves
{ "type": 13, "id": "D9nuK465nEitbyB4YKUs6J6jZjaekCQL7PVwq5Mzafkb", "fee": 5000000, "feeAssetId": null, "timestamp": 1631273516753, "version": 2, "chainId": 84, "sender": "3N6oaapvYkEryHUr4vAiPRXM3iS6kMYXito", "senderPublicKey": "7PMrxEzirv6h9Z2zqLE47qrZd6v1AbRZER5Aqfo95Eyr", "proofs": [ "43vV1cqQoUEEUt8xp3fSaqD8c3XVZBqf3aG72aPUPaZa2BkfUPLeMQZsDYHcpqrinHzC4CWfcDZczgHJ8F7CZwVp" ], "script": "base64:AAIFAAAAAAAAACgIAhIGCgQBAQEBEgMKAQESAwoBARIFCgMICAgSAwoBCBIECgIICBIAAAAANgAAAAAOZmFybWluZ0FkZHJlc3MBAAAAGgFU8jY5wCvKx9IdZ1jq9byeNi+peiAgajPTAAAAABVyYXJpdHlQcm92aWRlckFkZHJlc3MBAAAAGgFU+q9cAg4rvtWEk5vjyvMr8wmPCufq9HWkAAAAAAtlZ2dzQXNzZXRJZAEAAAAgJQJlzPcEaMi+AVmReOVYWjhmFBOtSkxKt/4FF0gXFoMAAAAABVNMT1RTAAAAAAAAAAAKAAAAAAdXQUlUSU5HAAAAAAAAAAAIAAAAAAxzdGVwRHVyYXRpb24AAAAAAAAAAAUBAAAADXRyeUdldEludGVnZXIAAAABAAAAA2tleQQAAAAHJG1hdGNoMAkABBoAAAACBQAAAAR0aGlzBQAAAANrZXkDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAA0ludAQAAAABYgUAAAAHJG1hdGNoMAUAAAABYgAAAAAAAAAAAAEAAAAMdHJ5R2V0U3RyaW5nAAAAAQAAAANrZXkEAAAAByRtYXRjaDAJAAQdAAAAA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gkBAAAACmdldEJldEVnZ3MAAAABBQAAAAZnYW1lSWQFAAAAC2VnZ3NBc3NldElkBQAAAANuaWwJAARMAAAAAgkBAAAADEludGVnZXJFbnRyeQAAAAIJAQAAABdnZXRQbGF5ZXJDdXJyZW50R2FtZUtleQAAAAEFAAAADWNhbGxlckFkZHJlc3MAAAAAAAAAAAAFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5SO2dRA==", "height": 1696896, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9a6rU1qowbZ5NXSPGYtrE1gYgxL6XKM4DLaN4Gf2Uouv Next: DWsNfa7Fy7sePxsPSaL8vMtwUvq4313c1UBzyhTDXV13 Diff:
Old | New | Differences | |
---|---|---|---|
133 | 133 | ||
134 | 134 | ||
135 | 135 | func getGameResult (gameId,playerAddress) = tryGetString(getGameResultKey(gameId, playerAddress)) | |
136 | + | ||
137 | + | ||
138 | + | func getGamePrizeKey (gameId,playerAddress) = (((("game" + toString(gameId)) + "_") + playerAddress) + "_prize") | |
139 | + | ||
140 | + | ||
141 | + | func getGamePrize (gameId,playerAddress) = tryGetString(getGamePrizeKey(gameId, playerAddress)) | |
136 | 142 | ||
137 | 143 | ||
138 | 144 | func getPlayerWinsKey (playerAddress) = (playerAddress + "_wins") | |
473 | 479 | if ((gameId == 0)) | |
474 | 480 | then throw("You don't have an active game") | |
475 | 481 | else if ((winner == playerRole)) | |
476 | - | 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)] | |
482 | + | then { | |
483 | + | let bet = getBetEggs(gameId) | |
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 | + | } | |
477 | 486 | else if ((winner == "draw")) | |
478 | - | then [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0), IntegerEntry(getPlayerDrawsKey(callerAddress), (getPlayerDraws(callerAddress) + 1)), StringEntry(getGameResultKey(gameId, callerAddress), "draw"), ScriptTransfer(i.caller, getBetEggs(gameId), eggsAssetId)] | |
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)] | |
479 | 488 | else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0)] | |
480 | 489 | } | |
481 | 490 |
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 | + | ||
137 | + | ||
138 | + | func getGamePrizeKey (gameId,playerAddress) = (((("game" + toString(gameId)) + "_") + playerAddress) + "_prize") | |
139 | + | ||
140 | + | ||
141 | + | func getGamePrize (gameId,playerAddress) = tryGetString(getGamePrizeKey(gameId, playerAddress)) | |
136 | 142 | ||
137 | 143 | ||
138 | 144 | func getPlayerWinsKey (playerAddress) = (playerAddress + "_wins") | |
139 | 145 | ||
140 | 146 | ||
141 | 147 | func getPlayerWins (playerAddress) = tryGetInteger(getPlayerWinsKey(playerAddress)) | |
142 | 148 | ||
143 | 149 | ||
144 | 150 | func getPlayerLosesKey (playerAddress) = (playerAddress + "_loses") | |
145 | 151 | ||
146 | 152 | ||
147 | 153 | func getPlayerLoses (playerAddress) = tryGetInteger(getPlayerLosesKey(playerAddress)) | |
148 | 154 | ||
149 | 155 | ||
150 | 156 | func getPlayerDrawsKey (playerAddress) = (playerAddress + "_draws") | |
151 | 157 | ||
152 | 158 | ||
153 | 159 | func getPlayerDraws (playerAddress) = tryGetInteger(getPlayerDrawsKey(playerAddress)) | |
154 | 160 | ||
155 | 161 | ||
156 | 162 | func getGamesPlayedKey () = "gamesPlayed" | |
157 | 163 | ||
158 | 164 | ||
159 | 165 | func getGamesPlayed () = tryGetInteger(getGamesPlayedKey()) | |
160 | 166 | ||
161 | 167 | ||
162 | 168 | func getFarmingPower (address,assetId) = match getInteger(Address(farmingAddress), (((("address_" + address) + "_asset_") + assetId) + "_farmingPower")) { | |
163 | 169 | case fp: Int => | |
164 | 170 | fp | |
165 | 171 | case _ => | |
166 | 172 | 0 | |
167 | 173 | } | |
168 | 174 | ||
169 | 175 | ||
170 | 176 | func checkDuckOwner (ownerAddress,assetId) = if ((assetBalance(ownerAddress, assetId) > 0)) | |
171 | 177 | then true | |
172 | 178 | else (getFarmingPower(toBase58String(ownerAddress.bytes), toBase58String(assetId)) > 0) | |
173 | 179 | ||
174 | 180 | ||
175 | 181 | func getScore (a,b) = if ((a > b)) | |
176 | 182 | then 1 | |
177 | 183 | else if ((b > a)) | |
178 | 184 | then -1 | |
179 | 185 | else 0 | |
180 | 186 | ||
181 | 187 | ||
182 | 188 | func getWinner (gameId) = { | |
183 | 189 | let gameStep = getStep(gameId) | |
184 | 190 | if ((6 > gameStep)) | |
185 | 191 | then { | |
186 | 192 | let expirationHeight = getExpirationHeight(gameId) | |
187 | 193 | if ((expirationHeight == 0)) | |
188 | 194 | then throw("Game is not started") | |
189 | 195 | else if ((expirationHeight > height)) | |
190 | 196 | then throw("Game is not finished or expired") | |
191 | 197 | else if (((getStep(gameId) % 2) == 0)) | |
192 | 198 | then "maker" | |
193 | 199 | else "taker" | |
194 | 200 | } | |
195 | 201 | else { | |
196 | 202 | let makerDuckOrder = split(getDuckOrder(gameId, "maker"), ",") | |
197 | 203 | let takerDuckOrder = split(getDuckOrder(gameId, "taker"), ",") | |
198 | 204 | let makerRarity1 = getRarity(gameId, "maker", makerDuckOrder[0]) | |
199 | 205 | let makerRarity2 = getRarity(gameId, "maker", makerDuckOrder[1]) | |
200 | 206 | let makerRarity3 = getRarity(gameId, "maker", makerDuckOrder[2]) | |
201 | 207 | let takerRarity1 = getRarity(gameId, "taker", takerDuckOrder[0]) | |
202 | 208 | let takerRarity2 = getRarity(gameId, "taker", takerDuckOrder[1]) | |
203 | 209 | let takerRarity3 = getRarity(gameId, "taker", takerDuckOrder[2]) | |
204 | 210 | let makerScore = ((getScore(makerRarity1, takerRarity1) + getScore(makerRarity2, takerRarity2)) + getScore(makerRarity3, takerRarity3)) | |
205 | 211 | if ((makerScore > 0)) | |
206 | 212 | then "maker" | |
207 | 213 | else if ((0 > makerScore)) | |
208 | 214 | then "taker" | |
209 | 215 | else "draw" | |
210 | 216 | } | |
211 | 217 | } | |
212 | 218 | ||
213 | 219 | ||
214 | 220 | @Callable(i) | |
215 | 221 | func makeGame (slot,rarityRangeWorst,rarityRangeMedium,rarityRangeBest) = { | |
216 | 222 | let callerAddress = toBase58String(i.caller.bytes) | |
217 | 223 | let slotGameId = getSlot(slot) | |
218 | 224 | let payment = value(i.payments[0]) | |
219 | 225 | let eggs = payment.amount | |
220 | 226 | let gameId = getNextGameId() | |
221 | 227 | if ((getPlayerCurrentGame(callerAddress) != 0)) | |
222 | 228 | then throw("You already have an active game") | |
223 | 229 | else if (if ((0 > slot)) | |
224 | 230 | then true | |
225 | 231 | else (slot >= SLOTS)) | |
226 | 232 | then throw("Invalid slot") | |
227 | 233 | else if ((slotGameId != 0)) | |
228 | 234 | then throw("This slot is busy") | |
229 | 235 | else if ((payment.assetId != eggsAssetId)) | |
230 | 236 | then throw(("You can attach only EGGs with the following asset id: " + toBase58String(eggsAssetId))) | |
231 | 237 | else if ((eggs != 1)) | |
232 | 238 | then throw("Bet must be 0.01 EGG during beta test") | |
233 | 239 | else if (if ((1 > rarityRangeWorst)) | |
234 | 240 | then true | |
235 | 241 | else (rarityRangeWorst > 5)) | |
236 | 242 | then throw("Invalid rarity range for the worst duck") | |
237 | 243 | else if (if ((1 > rarityRangeMedium)) | |
238 | 244 | then true | |
239 | 245 | else (rarityRangeMedium > 5)) | |
240 | 246 | then throw("Invalid rarity range for the medium duck") | |
241 | 247 | else if (if ((1 > rarityRangeBest)) | |
242 | 248 | then true | |
243 | 249 | else (rarityRangeBest > 5)) | |
244 | 250 | then throw("Invalid rarity range for the best duck") | |
245 | 251 | else if ((rarityRangeWorst > rarityRangeMedium)) | |
246 | 252 | then throw("The medium range can't be less than the worst one") | |
247 | 253 | else if ((rarityRangeMedium > rarityRangeBest)) | |
248 | 254 | then throw("The best range can't be worse than the medium one") | |
249 | 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))] | |
250 | 256 | } | |
251 | 257 | ||
252 | 258 | ||
253 | 259 | ||
254 | 260 | @Callable(i) | |
255 | 261 | func takeGame (slot) = { | |
256 | 262 | let callerAddress = toBase58String(i.caller.bytes) | |
257 | 263 | let gameId = getSlot(slot) | |
258 | 264 | let payment = value(i.payments[0]) | |
259 | 265 | if ((getPlayerCurrentGame(callerAddress) != 0)) | |
260 | 266 | then throw("You already have an active game") | |
261 | 267 | else if (if ((0 > slot)) | |
262 | 268 | then true | |
263 | 269 | else (slot >= SLOTS)) | |
264 | 270 | then throw("Invalid slot") | |
265 | 271 | else if ((getSlot(slot) == 0)) | |
266 | 272 | then throw("This slot is empty") | |
267 | 273 | else if ((payment.assetId != eggsAssetId)) | |
268 | 274 | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId))) | |
269 | 275 | else if ((payment.amount != getBetEggs(gameId))) | |
270 | 276 | then throw("Insufficient eggs amount") | |
271 | 277 | else if ((height >= getWaitingExpirationHeight(gameId))) | |
272 | 278 | then throw("This game is expired") | |
273 | 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))] | |
274 | 280 | } | |
275 | 281 | ||
276 | 282 | ||
277 | 283 | ||
278 | 284 | @Callable(i) | |
279 | 285 | func kickGame (slot) = { | |
280 | 286 | let gameId = getSlot(slot) | |
281 | 287 | if (if ((0 > slot)) | |
282 | 288 | then true | |
283 | 289 | else (slot >= SLOTS)) | |
284 | 290 | then throw("Invalid slot") | |
285 | 291 | else if ((gameId == 0)) | |
286 | 292 | then throw("Slot is empty") | |
287 | 293 | else if ((getWaitingExpirationHeight(gameId) > height)) | |
288 | 294 | then throw("Waiting is not finished yet") | |
289 | 295 | else { | |
290 | 296 | let maker = getMaker(gameId) | |
291 | 297 | [IntegerEntry(getPlayerCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(fromBase58String(maker)), getBetEggs(gameId), eggsAssetId)] | |
292 | 298 | } | |
293 | 299 | } | |
294 | 300 | ||
295 | 301 | ||
296 | 302 | ||
297 | 303 | @Callable(i) | |
298 | 304 | func pickDucks (worstDuckId,mediumDuckId,bestDuckId) = { | |
299 | 305 | let callerAddress = toBase58String(i.caller.bytes) | |
300 | 306 | let gameId = getPlayerCurrentGame(callerAddress) | |
301 | 307 | let playerRole = getPlayerRole(gameId, callerAddress) | |
302 | 308 | let gameStep = getStep(gameId) | |
303 | 309 | let worstRarityRange = getRarityRange(gameId, "worst") | |
304 | 310 | let mediumRarityRange = getRarityRange(gameId, "medium") | |
305 | 311 | let bestRarityRange = getRarityRange(gameId, "best") | |
306 | 312 | let invokeWorstRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [worstDuckId], nil) | |
307 | 313 | if ((invokeWorstRes == invokeWorstRes)) | |
308 | 314 | then { | |
309 | 315 | let worstRarity = match invokeWorstRes { | |
310 | 316 | case r: Int => | |
311 | 317 | r | |
312 | 318 | case _ => | |
313 | 319 | throw("Incorrect invoke result") | |
314 | 320 | } | |
315 | 321 | let invokeMediumRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [mediumDuckId], nil) | |
316 | 322 | if ((invokeMediumRes == invokeMediumRes)) | |
317 | 323 | then { | |
318 | 324 | let mediumRarity = match invokeMediumRes { | |
319 | 325 | case r: Int => | |
320 | 326 | r | |
321 | 327 | case _ => | |
322 | 328 | throw("Incorrect invoke result") | |
323 | 329 | } | |
324 | 330 | let invokeBestRes = invoke(Address(rarityProviderAddress), "getAssetRarity", [bestDuckId], nil) | |
325 | 331 | if ((invokeBestRes == invokeBestRes)) | |
326 | 332 | then { | |
327 | 333 | let bestRarity = match invokeBestRes { | |
328 | 334 | case r: Int => | |
329 | 335 | r | |
330 | 336 | case _ => | |
331 | 337 | throw("Incorrect invoke result") | |
332 | 338 | } | |
333 | 339 | if ((gameId == 0)) | |
334 | 340 | then throw("You don't have an active game") | |
335 | 341 | else if ((getExpirationHeight(gameId) == 0)) | |
336 | 342 | then throw("Game is not started") | |
337 | 343 | else if (if ((gameStep == 0)) | |
338 | 344 | then (playerRole != "taker") | |
339 | 345 | else false) | |
340 | 346 | then throw("It is the taker's turn to pick now") | |
341 | 347 | else if (if ((gameStep == 1)) | |
342 | 348 | then (playerRole != "maker") | |
343 | 349 | else false) | |
344 | 350 | then throw("It is the maker's turn to pick now") | |
345 | 351 | else if ((gameStep > 1)) | |
346 | 352 | then throw("Ducks have already been picked") | |
347 | 353 | else if (!(checkDuckOwner(i.caller, fromBase58String(worstDuckId)))) | |
348 | 354 | then throw((("Asset " + worstDuckId) + " doesn't belong to you")) | |
349 | 355 | else if (!(checkDuckOwner(i.caller, fromBase58String(mediumDuckId)))) | |
350 | 356 | then throw((("Asset " + mediumDuckId) + " doesn't belong to you")) | |
351 | 357 | else if (!(checkDuckOwner(i.caller, fromBase58String(bestDuckId)))) | |
352 | 358 | then throw((("Asset " + bestDuckId) + " doesn't belong to you")) | |
353 | 359 | else if (if ((5 > worstRarityRange)) | |
354 | 360 | then if ((worstRarity > (worstRarityRange * 10))) | |
355 | 361 | then true | |
356 | 362 | else (((worstRarityRange - 1) * 10) >= worstRarity) | |
357 | 363 | else false) | |
358 | 364 | then throw("Worst duck doesn't fit rarity range") | |
359 | 365 | else if (if ((5 > mediumRarityRange)) | |
360 | 366 | then if ((mediumRarity > (mediumRarityRange * 10))) | |
361 | 367 | then true | |
362 | 368 | else (((mediumRarityRange - 1) * 10) >= mediumRarity) | |
363 | 369 | else false) | |
364 | 370 | then throw("Medium duck doesn't fit rarity range") | |
365 | 371 | else if (if ((5 > bestRarityRange)) | |
366 | 372 | then if ((bestRarity > (bestRarityRange * 10))) | |
367 | 373 | then true | |
368 | 374 | else (((bestRarityRange - 1) * 10) >= bestRarity) | |
369 | 375 | else false) | |
370 | 376 | then throw("Best duck doesn't fit rarity range") | |
371 | 377 | else if (if ((worstRarityRange == 5)) | |
372 | 378 | then (40 >= worstRarity) | |
373 | 379 | else false) | |
374 | 380 | then throw("Worst duck doesn't fit rarity range") | |
375 | 381 | else if (if ((mediumRarityRange == 5)) | |
376 | 382 | then (40 >= mediumRarity) | |
377 | 383 | else false) | |
378 | 384 | then throw("Medium duck doesn't fit rarity range") | |
379 | 385 | else if (if ((bestRarityRange == 5)) | |
380 | 386 | then (40 >= bestRarity) | |
381 | 387 | else false) | |
382 | 388 | then throw("Best duck doesn't fit rarity range") | |
383 | 389 | else if (if (if ((worstRarity == mediumRarity)) | |
384 | 390 | then true | |
385 | 391 | else (worstRarity == bestRarity)) | |
386 | 392 | then true | |
387 | 393 | else (mediumRarity == bestRarity)) | |
388 | 394 | then throw("Ducks must have different rarities") | |
389 | 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))] | |
390 | 396 | } | |
391 | 397 | else throw("Strict value is not equal to itself.") | |
392 | 398 | } | |
393 | 399 | else throw("Strict value is not equal to itself.") | |
394 | 400 | } | |
395 | 401 | else throw("Strict value is not equal to itself.") | |
396 | 402 | } | |
397 | 403 | ||
398 | 404 | ||
399 | 405 | ||
400 | 406 | @Callable(i) | |
401 | 407 | func commit (hash) = { | |
402 | 408 | let callerAddress = toBase58String(i.caller.bytes) | |
403 | 409 | let gameId = getPlayerCurrentGame(callerAddress) | |
404 | 410 | let playerRole = getPlayerRole(gameId, callerAddress) | |
405 | 411 | let gameStep = getStep(gameId) | |
406 | 412 | if ((gameId == 0)) | |
407 | 413 | then throw("You don't have an active game") | |
408 | 414 | else if ((2 > gameStep)) | |
409 | 415 | then throw("Commit is not started") | |
410 | 416 | else if (if ((gameStep == 2)) | |
411 | 417 | then (playerRole != "taker") | |
412 | 418 | else false) | |
413 | 419 | then throw("It is the taker's turn to pick now") | |
414 | 420 | else if (if ((gameStep == 3)) | |
415 | 421 | then (playerRole != "maker") | |
416 | 422 | else false) | |
417 | 423 | then throw("It is the maker's turn to pick now") | |
418 | 424 | else if ((gameStep > 3)) | |
419 | 425 | then throw("Commit is finished") | |
420 | 426 | else [StringEntry(getCommitKey(gameId, playerRole), hash), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))] | |
421 | 427 | } | |
422 | 428 | ||
423 | 429 | ||
424 | 430 | ||
425 | 431 | @Callable(i) | |
426 | 432 | func reveal (duckOrder,salt) = { | |
427 | 433 | let callerAddress = toBase58String(i.caller.bytes) | |
428 | 434 | let gameId = getPlayerCurrentGame(callerAddress) | |
429 | 435 | let playerRole = getPlayerRole(gameId, callerAddress) | |
430 | 436 | let gameStep = getStep(gameId) | |
431 | 437 | if ((gameId == 0)) | |
432 | 438 | then throw("You don't have an active game") | |
433 | 439 | else if ((4 > gameStep)) | |
434 | 440 | then throw("Reveal is not started") | |
435 | 441 | else if (if ((gameStep == 4)) | |
436 | 442 | then (playerRole != "taker") | |
437 | 443 | else false) | |
438 | 444 | then throw("It is the taker's turn to pick now") | |
439 | 445 | else if (if ((gameStep == 5)) | |
440 | 446 | then (playerRole != "maker") | |
441 | 447 | else false) | |
442 | 448 | then throw("It is the maker's turn to pick now") | |
443 | 449 | else if ((gameStep > 5)) | |
444 | 450 | then throw("Reveal is finished") | |
445 | 451 | else if (if (if (if (if (if ((duckOrder != "worst,medium,best")) | |
446 | 452 | then (duckOrder != "worst,best,medium") | |
447 | 453 | else false) | |
448 | 454 | then (duckOrder != "medium,worst,best") | |
449 | 455 | else false) | |
450 | 456 | then (duckOrder != "medium,best,worst") | |
451 | 457 | else false) | |
452 | 458 | then (duckOrder != "best,worst,medium") | |
453 | 459 | else false) | |
454 | 460 | then (duckOrder != "best,medium,worst") | |
455 | 461 | else false) | |
456 | 462 | then throw("Reveal data is not valid") | |
457 | 463 | else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, playerRole))) | |
458 | 464 | then throw("Reveal doesn't match commit") | |
459 | 465 | else [StringEntry(getDuckOrderKey(gameId, playerRole), duckOrder), IntegerEntry(getStepKey(gameId), (gameStep + 1)), IntegerEntry(getExpirationHeightKey(gameId), (height + stepDuration))] | |
460 | 466 | } | |
461 | 467 | ||
462 | 468 | ||
463 | 469 | ||
464 | 470 | @Callable(i) | |
465 | 471 | func getPrize () = { | |
466 | 472 | let callerAddress = toBase58String(i.caller.bytes) | |
467 | 473 | let gameId = getPlayerCurrentGame(callerAddress) | |
468 | 474 | let playerRole = getPlayerRole(gameId, callerAddress) | |
469 | 475 | let anotherPlayerAddress = if ((playerRole == "maker")) | |
470 | 476 | then getTaker(gameId) | |
471 | 477 | else getMaker(gameId) | |
472 | 478 | let winner = getWinner(gameId) | |
473 | 479 | if ((gameId == 0)) | |
474 | 480 | then throw("You don't have an active game") | |
475 | 481 | else if ((winner == playerRole)) | |
476 | - | 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)] | |
482 | + | then { | |
483 | + | let bet = getBetEggs(gameId) | |
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 | + | } | |
477 | 486 | else if ((winner == "draw")) | |
478 | - | then [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0), IntegerEntry(getPlayerDrawsKey(callerAddress), (getPlayerDraws(callerAddress) + 1)), StringEntry(getGameResultKey(gameId, callerAddress), "draw"), ScriptTransfer(i.caller, getBetEggs(gameId), eggsAssetId)] | |
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)] | |
479 | 488 | else [IntegerEntry(getPlayerCurrentGameKey(callerAddress), 0)] | |
480 | 489 | } | |
481 | 490 | ||
482 | 491 | ||
483 | 492 | @Verifier(tx) | |
484 | 493 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
485 | 494 |
github/deemru/w8io/026f985 57.50 ms ◑