tx · H8fveYRAvpgVBoWD9KnHuWeMZiDoQfVWno5VgwDQNYsi 3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB: -0.05000000 Waves 2021.08.19 23:13 [1665698] smart account 3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB > SELF 0.00000000 Waves
{ "type": 13, "id": "H8fveYRAvpgVBoWD9KnHuWeMZiDoQfVWno5VgwDQNYsi", "fee": 5000000, "feeAssetId": null, "timestamp": 1629404005918, "version": 2, "chainId": 84, "sender": "3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB", "senderPublicKey": "9Vbnf3b9hhuCerzPXf38mLo8mUGTPNVW3jtQRbymjaSw", "proofs": [ "39PrX4GXkYYjY5Qzv5H9GAUpy4AVKicJMru51KH7MmY5ahhr1HY2bT59hJJR5a3iZgKbciYbjZ81aCmnywbJQRtu" ], "script": "base64:AAIFAAAAAAAAADoIAhIGCgQBAQEBEgMKAQESAwoBARIDCgEBEgMKAQESAwoBARIECgIBCBIFCgMBCAgSAwoBARIDCgEBAAAALAAAAAAQaW5jdWJhdG9yQWRkcmVzcwEAAAAaAVQu1YzRxAHn1ekAzs1AJJ6xFAc06V7PK6oAAAAADmJyZWVkZXJBZGRyZXNzAQAAABoBVC7VjNHEAefV6QDOzUAknrEUBzTpXs8rqgAAAAAOZmFybWluZ0FkZHJlc3MBAAAAGgFU8jY5wCvKx9IdZ1jq9byeNi+peiAgajPTAAAAAAtlZ2dzQXNzZXRJZAEAAAAgJQJlzPcEaMi+AVmReOVYWjhmFBOtSkxKt/4FF0gXFoMAAAAACG1ha2VyRmVlAAAAAAAAAAABAAAAAAh0YWtlckZlZQAAAAAAAAAAAQAAAAAFU0xPVFMAAAAAAAAAAAoAAAAAB1dBSVRJTkcAAAAAAAAAAAUAAAAADHN0ZXBEdXJhdGlvbgAAAAAAAAAAAwEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAABHRo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BpcmVkAAAAAQUAAAAIZ2FtZVN0ZXAJAAACAAAAAQIAAAAWSW52YWxpZCBjYWxsZXIgYWRkcmVzcwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V59c3EZw==", "height": 1665698, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: BPGo8qUvMF5T7MunpBFCoRcWvzUhxfCAUPtFu9Et3Pgc Next: DJJFE6k83nSDLzHbsbHfStV2aCsxg92EUc3aAjKENj7u Diff:
Old | New | Differences | |
---|---|---|---|
281 | 281 | then throw("This game is started") | |
282 | 282 | else { | |
283 | 283 | let maker = getGameMaker(gameId) | |
284 | - | [IntegerEntry(getUserCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address( | |
284 | + | [IntegerEntry(getUserCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(fromBase58String(maker)), (getBetEggs(gameId) + makerFee), eggsAssetId)] | |
285 | 285 | } | |
286 | 286 | } | |
287 | 287 |
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'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh' | |
7 | 7 | ||
8 | 8 | let farmingAddress = base58'3NBznG19rEYUAcnukTRTtwJHBVKQLbobVdC' | |
9 | 9 | ||
10 | 10 | let eggsAssetId = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN' | |
11 | 11 | ||
12 | 12 | let makerFee = 1 | |
13 | 13 | ||
14 | 14 | let takerFee = 1 | |
15 | 15 | ||
16 | 16 | let SLOTS = 10 | |
17 | 17 | ||
18 | 18 | let WAITING = 5 | |
19 | 19 | ||
20 | 20 | let stepDuration = 3 | |
21 | 21 | ||
22 | 22 | func tryGetInteger (key) = match getInteger(this, key) { | |
23 | 23 | case b: Int => | |
24 | 24 | b | |
25 | 25 | case _ => | |
26 | 26 | 0 | |
27 | 27 | } | |
28 | 28 | ||
29 | 29 | ||
30 | 30 | func tryGetString (key) = match getString(this, key) { | |
31 | 31 | case a: String => | |
32 | 32 | a | |
33 | 33 | case _ => | |
34 | 34 | "" | |
35 | 35 | } | |
36 | 36 | ||
37 | 37 | ||
38 | 38 | func tryGetBoolean (key) = match getBoolean(this, key) { | |
39 | 39 | case b: Boolean => | |
40 | 40 | b | |
41 | 41 | case _ => | |
42 | 42 | false | |
43 | 43 | } | |
44 | 44 | ||
45 | 45 | ||
46 | 46 | func getNextGameId () = { | |
47 | 47 | let nextId = tryGetInteger("next_game_id") | |
48 | 48 | if ((nextId == 0)) | |
49 | 49 | then 1 | |
50 | 50 | else nextId | |
51 | 51 | } | |
52 | 52 | ||
53 | 53 | ||
54 | 54 | func getUserCurrentGameKey (address) = ("current_game_" + address) | |
55 | 55 | ||
56 | 56 | ||
57 | 57 | func getUserCurrentGame (address) = tryGetInteger(getUserCurrentGameKey(address)) | |
58 | 58 | ||
59 | 59 | ||
60 | 60 | func getSlotKey (slot) = ("slot_" + toString(slot)) | |
61 | 61 | ||
62 | 62 | ||
63 | 63 | func getSlot (slot) = tryGetInteger(getSlotKey(slot)) | |
64 | 64 | ||
65 | 65 | ||
66 | 66 | func getGameMakerKey (gameId) = (("game_" + toString(gameId)) + "_maker") | |
67 | 67 | ||
68 | 68 | ||
69 | 69 | func getGameMaker (gameId) = tryGetString(getGameMakerKey(gameId)) | |
70 | 70 | ||
71 | 71 | ||
72 | 72 | func getGameTakerKey (gameId) = (("game_" + toString(gameId)) + "_taker") | |
73 | 73 | ||
74 | 74 | ||
75 | 75 | func getGameTaker (gameId) = tryGetString(getGameTakerKey(gameId)) | |
76 | 76 | ||
77 | 77 | ||
78 | 78 | func getBetEggsKey (gameId) = (("game_" + toString(gameId)) + "_bet_eggs") | |
79 | 79 | ||
80 | 80 | ||
81 | 81 | func getBetEggs (gameId) = tryGetInteger(getBetEggsKey(gameId)) | |
82 | 82 | ||
83 | 83 | ||
84 | 84 | func getGameWaitingEndHeightKey (gameId) = (("game_" + toString(gameId)) + "_waiting_end_height") | |
85 | 85 | ||
86 | 86 | ||
87 | 87 | func getGameWaitingEndHeight (gameId) = tryGetInteger(getGameWaitingEndHeightKey(gameId)) | |
88 | 88 | ||
89 | 89 | ||
90 | 90 | func getGameOverHeightKey (gameId) = (("game_" + toString(gameId)) + "_over_height") | |
91 | 91 | ||
92 | 92 | ||
93 | 93 | func getGameOverHeight (gameId) = tryGetInteger(getGameWaitingEndHeightKey(gameId)) | |
94 | 94 | ||
95 | 95 | ||
96 | 96 | func getGameRarityRangeKey (gameId,rangePosition) = ((("game_" + toString(gameId)) + "_rarityRange_") + rangePosition) | |
97 | 97 | ||
98 | 98 | ||
99 | 99 | func getGameRarityRange (gameId,rangePosition) = tryGetInteger(getGameRarityRangeKey(gameId, rangePosition)) | |
100 | 100 | ||
101 | 101 | ||
102 | 102 | func getGameStepKey (gameId) = (("game_" + toString(gameId)) + "_step") | |
103 | 103 | ||
104 | 104 | ||
105 | 105 | func getGameStep (gameId) = tryGetInteger(getGameStepKey(gameId)) | |
106 | 106 | ||
107 | 107 | ||
108 | 108 | func getRarityKey (gameId,player,rangePosition) = (((((("game_" + toString(gameId)) + "_") + player) + "_") + rangePosition) + "Rarity") | |
109 | 109 | ||
110 | 110 | ||
111 | 111 | func getRarity (gameId,player,rangePosition) = tryGetInteger(getRarityKey(gameId, player, rangePosition)) | |
112 | 112 | ||
113 | 113 | ||
114 | 114 | func getCommitKey (gameId,player) = (((("game_" + toString(gameId)) + "_") + player) + "_commit") | |
115 | 115 | ||
116 | 116 | ||
117 | 117 | func getCommit (gameId,player) = tryGetString(getCommitKey(gameId, player)) | |
118 | 118 | ||
119 | 119 | ||
120 | 120 | func getDuckOrderKey (gameId,player) = (((("game_" + toString(gameId)) + "_") + player) + "_duckOrder") | |
121 | 121 | ||
122 | 122 | ||
123 | 123 | func getDuckOrder (gameId,player) = tryGetString(getDuckOrderKey(gameId, player)) | |
124 | 124 | ||
125 | 125 | ||
126 | 126 | func getPrizeSentKey (gameId,player) = (((("game_" + toString(gameId)) + "_") + player) + "_withdrawStatus") | |
127 | 127 | ||
128 | 128 | ||
129 | 129 | func getPrizeSent (gameId,player) = tryGetBoolean(getPrizeSentKey(gameId, player)) | |
130 | 130 | ||
131 | 131 | ||
132 | 132 | func pickDuck (gameId,playerRole,playerAddress,assetId,rarity,rangePosition,step) = { | |
133 | 133 | let rarityRange = getGameRarityRange(gameId, rangePosition) | |
134 | 134 | if (if (if (if ((rarityRange == 5)) | |
135 | 135 | then (40 > rarity) | |
136 | 136 | else false) | |
137 | 137 | then true | |
138 | 138 | else (rarity >= (rarityRange * 10))) | |
139 | 139 | then true | |
140 | 140 | else (((rarityRange - 1) * 10) > rarity)) | |
141 | 141 | then throw("This duck doesn't fit the rarity range") | |
142 | 142 | else [IntegerEntry(getRarityKey(gameId, playerRole, rangePosition), rarity), IntegerEntry(getGameStepKey(gameId), (step + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration)), ScriptTransfer(playerAddress, 1, assetId)] | |
143 | 143 | } | |
144 | 144 | ||
145 | 145 | ||
146 | 146 | func getScore (a,b) = if ((a > b)) | |
147 | 147 | then 1 | |
148 | 148 | else if ((b > a)) | |
149 | 149 | then -1 | |
150 | 150 | else 0 | |
151 | 151 | ||
152 | 152 | ||
153 | 153 | func getWinner (gameId) = { | |
154 | 154 | let makerDuckOrder = split(getDuckOrder(gameId, "maker"), ",") | |
155 | 155 | let takerDuckOrder = split(getDuckOrder(gameId, "taker"), ",") | |
156 | 156 | let makerRarity1 = getRarity(gameId, "maker", makerDuckOrder[0]) | |
157 | 157 | let makerRarity2 = getRarity(gameId, "maker", makerDuckOrder[1]) | |
158 | 158 | let makerRarity3 = getRarity(gameId, "maker", makerDuckOrder[2]) | |
159 | 159 | let takerRarity1 = getRarity(gameId, "taker", makerDuckOrder[0]) | |
160 | 160 | let takerRarity2 = getRarity(gameId, "taker", makerDuckOrder[1]) | |
161 | 161 | let takerRarity3 = getRarity(gameId, "taker", makerDuckOrder[2]) | |
162 | 162 | let makerScore = ((getScore(makerRarity1, takerRarity1) + getScore(makerRarity2, takerRarity2)) + getScore(makerRarity3, takerRarity3)) | |
163 | 163 | if ((makerScore > 0)) | |
164 | 164 | then "maker" | |
165 | 165 | else if ((0 > makerScore)) | |
166 | 166 | then "taker" | |
167 | 167 | else "draw" | |
168 | 168 | } | |
169 | 169 | ||
170 | 170 | ||
171 | 171 | func getWinnerExpired (gameStep) = if (if (if (if (if ((gameStep == 0)) | |
172 | 172 | then true | |
173 | 173 | else (gameStep == 3)) | |
174 | 174 | then true | |
175 | 175 | else (gameStep == 4)) | |
176 | 176 | then true | |
177 | 177 | else (gameStep == 7)) | |
178 | 178 | then true | |
179 | 179 | else (gameStep == 9)) | |
180 | 180 | then "maker" | |
181 | 181 | else if (if (if (if (if ((gameStep == 1)) | |
182 | 182 | then true | |
183 | 183 | else (gameStep == 2)) | |
184 | 184 | then true | |
185 | 185 | else (gameStep == 5)) | |
186 | 186 | then true | |
187 | 187 | else (gameStep == 6)) | |
188 | 188 | then true | |
189 | 189 | else (gameStep == 8)) | |
190 | 190 | then "taker" | |
191 | 191 | else "draw" | |
192 | 192 | ||
193 | 193 | ||
194 | 194 | func sendPrize (gameId,playerAddress,playerRole,winner) = { | |
195 | 195 | let makerAddress = getGameMaker(gameId) | |
196 | 196 | let takerAddress = getGameTaker(gameId) | |
197 | 197 | if (getPrizeSent(gameId, playerRole)) | |
198 | 198 | then throw("You have already got the prize") | |
199 | 199 | else if ((winner == playerRole)) | |
200 | 200 | then [IntegerEntry(getUserCurrentGameKey(makerAddress), 0), IntegerEntry(getUserCurrentGameKey(takerAddress), 0), BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, (getBetEggs(gameId) * 2), eggsAssetId)] | |
201 | 201 | else if ((winner == "draw")) | |
202 | 202 | then if ((playerRole == "maker")) | |
203 | 203 | then [IntegerEntry(getUserCurrentGameKey(makerAddress), 0), BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, getBetEggs(gameId), eggsAssetId)] | |
204 | 204 | else [IntegerEntry(getUserCurrentGameKey(takerAddress), 0), BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, getBetEggs(gameId), eggsAssetId)] | |
205 | 205 | else throw("You lose and don't have any prize") | |
206 | 206 | } | |
207 | 207 | ||
208 | 208 | ||
209 | 209 | @Callable(i) | |
210 | 210 | func makeGame (slot,rarityRangeWorst,rarityRangeMedium,rarityRangeBest) = { | |
211 | 211 | let callerAddress = toBase58String(i.caller.bytes) | |
212 | 212 | let slotGameId = getSlot(slot) | |
213 | 213 | let payment = value(i.payments[0]) | |
214 | 214 | let eggs = (payment.amount - makerFee) | |
215 | 215 | let gameId = getNextGameId() | |
216 | 216 | if ((payment.assetId != eggsAssetId)) | |
217 | 217 | then throw(("You can attach only EGGs with the following asset id: " + toBase58String(eggsAssetId))) | |
218 | 218 | else if ((0 >= eggs)) | |
219 | 219 | then throw("Not enough EGGs") | |
220 | 220 | else if ((getUserCurrentGame(callerAddress) != 0)) | |
221 | 221 | then throw("You already have an active game") | |
222 | 222 | else if (if ((0 > slot)) | |
223 | 223 | then true | |
224 | 224 | else (slot >= SLOTS)) | |
225 | 225 | then throw("Invalid slot") | |
226 | 226 | else if ((slotGameId != 0)) | |
227 | 227 | then throw("This slot is busy") | |
228 | 228 | else if (if ((1 > rarityRangeWorst)) | |
229 | 229 | then true | |
230 | 230 | else (rarityRangeWorst > 5)) | |
231 | 231 | then throw("Invalid rarity range for the worst duck") | |
232 | 232 | else if (if ((1 > rarityRangeMedium)) | |
233 | 233 | then true | |
234 | 234 | else (rarityRangeMedium > 5)) | |
235 | 235 | then throw("Invalid rarity range for the medium duck") | |
236 | 236 | else if (if ((1 > rarityRangeBest)) | |
237 | 237 | then true | |
238 | 238 | else (rarityRangeBest > 5)) | |
239 | 239 | then throw("Invalid rarity range for the best duck") | |
240 | 240 | else if ((rarityRangeWorst >= rarityRangeMedium)) | |
241 | 241 | then throw("The medium duck must be better than the worst one") | |
242 | 242 | else if ((rarityRangeMedium >= rarityRangeBest)) | |
243 | 243 | then throw("The best duck must be better than the medium one") | |
244 | 244 | else [IntegerEntry(getUserCurrentGameKey(callerAddress), gameId), StringEntry(getGameMakerKey(gameId), callerAddress), IntegerEntry(getBetEggsKey(gameId), eggs), IntegerEntry(getGameRarityRangeKey(gameId, "worst"), rarityRangeWorst), IntegerEntry(getGameRarityRangeKey(gameId, "medium"), rarityRangeMedium), IntegerEntry(getGameRarityRangeKey(gameId, "best"), rarityRangeBest), IntegerEntry(getGameWaitingEndHeightKey(gameId), (height + WAITING)), IntegerEntry(getSlotKey(slot), gameId), IntegerEntry("next_game_id", (gameId + 1))] | |
245 | 245 | } | |
246 | 246 | ||
247 | 247 | ||
248 | 248 | ||
249 | 249 | @Callable(i) | |
250 | 250 | func takeGame (slot) = { | |
251 | 251 | let callerAddress = toBase58String(i.caller.bytes) | |
252 | 252 | let gameId = getSlot(slot) | |
253 | 253 | let payment = value(i.payments[0]) | |
254 | 254 | if ((getSlot(slot) == 0)) | |
255 | 255 | then throw("This slot is empty") | |
256 | 256 | else if ((payment.assetId != eggsAssetId)) | |
257 | 257 | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId))) | |
258 | 258 | else if ((payment.amount != (getBetEggs(gameId) + takerFee))) | |
259 | 259 | then throw("Insufficient eggs amount") | |
260 | 260 | else if ((getGameTaker(gameId) != "")) | |
261 | 261 | then throw("This game is already taken") | |
262 | 262 | else if ((height >= getGameWaitingEndHeight(gameId))) | |
263 | 263 | then throw("This game is expired") | |
264 | 264 | else [IntegerEntry(getUserCurrentGameKey(callerAddress), gameId), StringEntry(getGameTakerKey(gameId), callerAddress), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration)), IntegerEntry(getSlotKey(slot), 0)] | |
265 | 265 | } | |
266 | 266 | ||
267 | 267 | ||
268 | 268 | ||
269 | 269 | @Callable(i) | |
270 | 270 | func kickGame (slot) = { | |
271 | 271 | let gameId = getSlot(slot) | |
272 | 272 | if (if ((0 > slot)) | |
273 | 273 | then true | |
274 | 274 | else (slot >= SLOTS)) | |
275 | 275 | then throw("Invalid slot") | |
276 | 276 | else if ((gameId == 0)) | |
277 | 277 | then throw("Slot is empty") | |
278 | 278 | else if ((getGameWaitingEndHeight(gameId) > height)) | |
279 | 279 | then throw("Waiting is not finished yet") | |
280 | 280 | else if ((getGameTaker(gameId) != "")) | |
281 | 281 | then throw("This game is started") | |
282 | 282 | else { | |
283 | 283 | let maker = getGameMaker(gameId) | |
284 | - | [IntegerEntry(getUserCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address( | |
284 | + | [IntegerEntry(getUserCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(fromBase58String(maker)), (getBetEggs(gameId) + makerFee), eggsAssetId)] | |
285 | 285 | } | |
286 | 286 | } | |
287 | 287 | ||
288 | 288 | ||
289 | 289 | ||
290 | 290 | @Callable(i) | |
291 | 291 | func pickWorstDuck (gameId) = { | |
292 | 292 | let callerAddress = toBase58String(i.caller.bytes) | |
293 | 293 | let assetId = value(value(i.payments[0]).assetId) | |
294 | 294 | let gameStep = getGameStep(gameId) | |
295 | 295 | if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress))) | |
296 | 296 | then (value(assetInfo(assetId)).issuer != Address(incubatorAddress)) | |
297 | 297 | else false) | |
298 | 298 | then throw("Invalid NFT") | |
299 | 299 | else if ((gameStep == 0)) | |
300 | 300 | then if ((callerAddress != getGameTaker(gameId))) | |
301 | 301 | then throw("It is the taker's turn to pick now") | |
302 | 302 | else { | |
303 | 303 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
304 | 304 | if ((invokeRes == invokeRes)) | |
305 | 305 | then { | |
306 | 306 | let rarity = match invokeRes { | |
307 | 307 | case r: Int => | |
308 | 308 | r | |
309 | 309 | case _ => | |
310 | 310 | throw("Incorrect invoke result") | |
311 | 311 | } | |
312 | 312 | pickDuck(gameId, "taker", i.caller, assetId, rarity, "worst", 0) | |
313 | 313 | } | |
314 | 314 | else throw("Strict value is not equal to itself.") | |
315 | 315 | } | |
316 | 316 | else if ((gameStep == 1)) | |
317 | 317 | then if ((callerAddress != getGameMaker(gameId))) | |
318 | 318 | then throw("It is the maker's turn to pick now") | |
319 | 319 | else { | |
320 | 320 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
321 | 321 | if ((invokeRes == invokeRes)) | |
322 | 322 | then { | |
323 | 323 | let rarity = match invokeRes { | |
324 | 324 | case r: Int => | |
325 | 325 | r | |
326 | 326 | case _ => | |
327 | 327 | throw("Incorrect invoke result") | |
328 | 328 | } | |
329 | 329 | pickDuck(gameId, "maker", i.caller, assetId, rarity, "worst", 1) | |
330 | 330 | } | |
331 | 331 | else throw("Strict value is not equal to itself.") | |
332 | 332 | } | |
333 | 333 | else throw("The worst duck has already been picked") | |
334 | 334 | } | |
335 | 335 | ||
336 | 336 | ||
337 | 337 | ||
338 | 338 | @Callable(i) | |
339 | 339 | func pickMediumtDuck (gameId) = { | |
340 | 340 | let callerAddress = toBase58String(i.caller.bytes) | |
341 | 341 | let assetId = value(value(i.payments[0]).assetId) | |
342 | 342 | let gameStep = getGameStep(gameId) | |
343 | 343 | if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress))) | |
344 | 344 | then (value(assetInfo(assetId)).issuer != Address(incubatorAddress)) | |
345 | 345 | else false) | |
346 | 346 | then throw("Invalid NFT") | |
347 | 347 | else if ((2 > gameStep)) | |
348 | 348 | then throw("The medium duck must be picked after the worst one") | |
349 | 349 | else if ((gameStep == 2)) | |
350 | 350 | then if ((callerAddress != getGameMaker(gameId))) | |
351 | 351 | then throw("It is the maker's turn to pick now") | |
352 | 352 | else { | |
353 | 353 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
354 | 354 | if ((invokeRes == invokeRes)) | |
355 | 355 | then { | |
356 | 356 | let rarity = match invokeRes { | |
357 | 357 | case r: Int => | |
358 | 358 | r | |
359 | 359 | case _ => | |
360 | 360 | throw("Incorrect invoke result") | |
361 | 361 | } | |
362 | 362 | pickDuck(gameId, "maker", i.caller, assetId, rarity, "medium", 2) | |
363 | 363 | } | |
364 | 364 | else throw("Strict value is not equal to itself.") | |
365 | 365 | } | |
366 | 366 | else if ((gameStep == 3)) | |
367 | 367 | then if ((callerAddress != getGameTaker(gameId))) | |
368 | 368 | then throw("It is the taker's turn to pick now") | |
369 | 369 | else { | |
370 | 370 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
371 | 371 | if ((invokeRes == invokeRes)) | |
372 | 372 | then { | |
373 | 373 | let rarity = match invokeRes { | |
374 | 374 | case r: Int => | |
375 | 375 | r | |
376 | 376 | case _ => | |
377 | 377 | throw("Incorrect invoke result") | |
378 | 378 | } | |
379 | 379 | pickDuck(gameId, "taker", i.caller, assetId, rarity, "medium", 3) | |
380 | 380 | } | |
381 | 381 | else throw("Strict value is not equal to itself.") | |
382 | 382 | } | |
383 | 383 | else throw("The medium duck has already been picked") | |
384 | 384 | } | |
385 | 385 | ||
386 | 386 | ||
387 | 387 | ||
388 | 388 | @Callable(i) | |
389 | 389 | func pickBestDuck (gameId) = { | |
390 | 390 | let callerAddress = toBase58String(i.caller.bytes) | |
391 | 391 | let assetId = value(value(i.payments[0]).assetId) | |
392 | 392 | let gameStep = getGameStep(gameId) | |
393 | 393 | if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress))) | |
394 | 394 | then (value(assetInfo(assetId)).issuer != Address(incubatorAddress)) | |
395 | 395 | else false) | |
396 | 396 | then throw("Invalid NFT") | |
397 | 397 | else if ((4 > gameStep)) | |
398 | 398 | then throw("The best duck must be picked after the worst and the medium ones") | |
399 | 399 | else if ((gameStep == 4)) | |
400 | 400 | then if ((callerAddress != getGameTaker(gameId))) | |
401 | 401 | then throw("It is the taker's turn to pick now") | |
402 | 402 | else { | |
403 | 403 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
404 | 404 | if ((invokeRes == invokeRes)) | |
405 | 405 | then { | |
406 | 406 | let rarity = match invokeRes { | |
407 | 407 | case r: Int => | |
408 | 408 | r | |
409 | 409 | case _ => | |
410 | 410 | throw("Incorrect invoke result") | |
411 | 411 | } | |
412 | 412 | pickDuck(gameId, "taker", i.caller, assetId, rarity, "best", 4) | |
413 | 413 | } | |
414 | 414 | else throw("Strict value is not equal to itself.") | |
415 | 415 | } | |
416 | 416 | else if ((gameStep == 5)) | |
417 | 417 | then if ((callerAddress != getGameMaker(gameId))) | |
418 | 418 | then throw("It is the maker's turn to pick now") | |
419 | 419 | else { | |
420 | 420 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
421 | 421 | if ((invokeRes == invokeRes)) | |
422 | 422 | then { | |
423 | 423 | let rarity = match invokeRes { | |
424 | 424 | case r: Int => | |
425 | 425 | r | |
426 | 426 | case _ => | |
427 | 427 | throw("Incorrect invoke result") | |
428 | 428 | } | |
429 | 429 | pickDuck(gameId, "maker", i.caller, assetId, rarity, "best", 5) | |
430 | 430 | } | |
431 | 431 | else throw("Strict value is not equal to itself.") | |
432 | 432 | } | |
433 | 433 | else throw("The best duck has already been picked") | |
434 | 434 | } | |
435 | 435 | ||
436 | 436 | ||
437 | 437 | ||
438 | 438 | @Callable(i) | |
439 | 439 | func commit (gameId,hash) = { | |
440 | 440 | let callerAddress = toBase58String(i.caller.bytes) | |
441 | 441 | let gameStep = getGameStep(gameId) | |
442 | 442 | if ((6 > gameStep)) | |
443 | 443 | then throw("Ducks hasn't been picked yet") | |
444 | 444 | else if ((gameStep == 6)) | |
445 | 445 | then if ((callerAddress != getGameMaker(gameId))) | |
446 | 446 | then throw("It is the maker's turn to commit now") | |
447 | 447 | else [StringEntry(getCommitKey(gameId, "maker"), hash), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))] | |
448 | 448 | else if ((gameStep == 7)) | |
449 | 449 | then if ((callerAddress != getGameTaker(gameId))) | |
450 | 450 | then throw("It is the taker's turn to commit now") | |
451 | 451 | else [StringEntry(getCommitKey(gameId, "taker"), hash), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))] | |
452 | 452 | else throw("Commit is finished") | |
453 | 453 | } | |
454 | 454 | ||
455 | 455 | ||
456 | 456 | ||
457 | 457 | @Callable(i) | |
458 | 458 | func reveal (gameId,duckOrder,salt) = { | |
459 | 459 | let callerAddress = toBase58String(i.caller.bytes) | |
460 | 460 | let gameStep = getGameStep(gameId) | |
461 | 461 | if ((8 > gameStep)) | |
462 | 462 | then throw("Reveal is not started") | |
463 | 463 | else if (if (if (if (if (if ((duckOrder != "worst,medium,best")) | |
464 | 464 | then true | |
465 | 465 | else (duckOrder != "worst,best,medium")) | |
466 | 466 | then true | |
467 | 467 | else (duckOrder != "medium,worst,best")) | |
468 | 468 | then true | |
469 | 469 | else (duckOrder != "medium,best,worst")) | |
470 | 470 | then true | |
471 | 471 | else (duckOrder != "best,worst,medium")) | |
472 | 472 | then true | |
473 | 473 | else (duckOrder != "best,medium,worst")) | |
474 | 474 | then throw("Invalid duckOrder") | |
475 | 475 | else if ((gameStep == 8)) | |
476 | 476 | then if ((callerAddress != getGameMaker(gameId))) | |
477 | 477 | then throw("It is the maker's turn to reveal now") | |
478 | 478 | else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "maker"))) | |
479 | 479 | then throw("reveal data is not valid") | |
480 | 480 | else [StringEntry(getDuckOrderKey(gameId, "maker"), duckOrder), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))] | |
481 | 481 | else if ((gameStep == 9)) | |
482 | 482 | then if ((callerAddress != getGameTaker(gameId))) | |
483 | 483 | then throw("It is the taker's turn to reveal now") | |
484 | 484 | else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "taker"))) | |
485 | 485 | then throw("reveal data is not valid") | |
486 | 486 | else [StringEntry(getDuckOrderKey(gameId, "taker"), duckOrder), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))] | |
487 | 487 | else throw("Reveal is finished") | |
488 | 488 | } | |
489 | 489 | ||
490 | 490 | ||
491 | 491 | ||
492 | 492 | @Callable(i) | |
493 | 493 | func getPrize (gameId) = { | |
494 | 494 | let callerAddress = toBase58String(i.caller.bytes) | |
495 | 495 | let gameStep = getGameStep(gameId) | |
496 | 496 | if ((gameStep != 10)) | |
497 | 497 | then throw("Game is not finished") | |
498 | 498 | else if ((callerAddress == getGameMaker(gameId))) | |
499 | 499 | then sendPrize(gameId, i.caller, "maker", getWinner(gameId)) | |
500 | 500 | else if ((callerAddress == getGameTaker(gameId))) | |
501 | 501 | then sendPrize(gameId, i.caller, "taker", getWinner(gameId)) | |
502 | 502 | else throw("Invalid caller address") | |
503 | 503 | } | |
504 | 504 | ||
505 | 505 | ||
506 | 506 | ||
507 | 507 | @Callable(i) | |
508 | 508 | func getPrizeExpired (gameId) = { | |
509 | 509 | let callerAddress = toBase58String(i.caller.bytes) | |
510 | 510 | let gameStep = getGameStep(gameId) | |
511 | 511 | if ((gameStep == 10)) | |
512 | 512 | then throw("Game is finished, call getPrize instead") | |
513 | 513 | else if ((getGameOverHeight(gameId) > height)) | |
514 | 514 | then throw("Game is not expired") | |
515 | 515 | else if ((callerAddress == getGameMaker(gameId))) | |
516 | 516 | then sendPrize(gameId, i.caller, "maker", getWinnerExpired(gameStep)) | |
517 | 517 | else if ((callerAddress == getGameTaker(gameId))) | |
518 | 518 | then sendPrize(gameId, i.caller, "taker", getWinnerExpired(gameStep)) | |
519 | 519 | else throw("Invalid caller address") | |
520 | 520 | } | |
521 | 521 | ||
522 | 522 | ||
523 | 523 | @Verifier(tx) | |
524 | 524 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
525 | 525 |
github/deemru/w8io/169f3d6 81.61 ms ◑