tx · Y4n6CNaHLGhmgic5CfGH5Ux1MEDL2j2swvX64QS4odX 3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB: -0.05000000 Waves 2021.08.19 15:35 [1665244] smart account 3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB > SELF 0.00000000 Waves
{ "type": 13, "id": "Y4n6CNaHLGhmgic5CfGH5Ux1MEDL2j2swvX64QS4odX", "fee": 5000000, "feeAssetId": null, "timestamp": 1629376587097, "version": 2, "chainId": 84, "sender": "3MvCLdwRiQSNrhgumfFunsbyUJUw6ViTMwB", "senderPublicKey": "9Vbnf3b9hhuCerzPXf38mLo8mUGTPNVW3jtQRbymjaSw", "proofs": [ "2BBpkKLBnFJNzF74RhDuhLYFgH9BQG8BRN1oTtCBSHDh1Ti7A7mWLXpNWbppNbh7BNdDzVKF3KtzzAZMhAEmHxrP" ], "script": "base64:AAIFAAAAAAAAADoIAhIGCgQBAQEBEgMKAQESAwoBARIDCgEBEgMKAQESAwoBARIECgIBCBIFCgMBCAgSAwoBARIDCgEBAAAALAAAAAAQaW5jdWJhdG9yQWRkcmVzcwEAAAAaAVQu1YzRxAHn1ekAzs1AJJ6xFAc06V7PK6oAAAAADmJyZWVkZXJBZGRyZXNzAQAAABoBVC7VjNHEAefV6QDOzUAknrEUBzTpXs8rqgAAAAAOZmFybWluZ0FkZHJlc3MBAAAAGgFU8jY5wCvKx9IdZ1jq9byeNi+peiAgajPTAAAAAAtlZ2dzQXNzZXRJZAEAAAAgJQJlzPcEaMi+AVmReOVYWjhmFBOtSkxKt/4FF0gXFoMAAAAACG1ha2VyRmVlAAAAAAAAAAABAAAAAAh0YWtlckZlZQAAAAAAAAAAAQAAAAAFU0xPVFMAAAAAAAAAAAoAAAAAB1dBSVRJTkcAAAAAAAAAAAUAAAAADHN0ZXBEdXJhdGlvbgAAAAAAAAAAAwEAAAANdHJ5R2V0SW50ZWdlcgAAAAEAAAADa2V5BAAAAAckbWF0Y2gwCQAEGgAAAAIFAAAAB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QAAAAlzZW5kUHJpemUAAAAEBQAAAAZnYW1lSWQIBQAAAAFpAAAABmNhbGxlcgIAAAAFbWFrZXIJAQAAABBnZXRXaW5uZXJFeHBpcmVkAAAAAQUAAAAIZ2FtZVN0ZXADCQAAAAAAAAIFAAAADWNhbGxlckFkZHJlc3MJAQAAAAxnZXRHYW1lVGFrZXIAAAABBQAAAAZnYW1lSWQJAQAAAAlzZW5kUHJpemUAAAAEBQAAAAZnYW1lSWQIBQAAAAFpAAAABmNhbGxlcgIAAAAFdGFrZXIJAQAAABBnZXRXaW5uZXJFeHBpcmVkAAAAAQUAAAAIZ2FtZVN0ZXAJAAACAAAAAQIAAAAWSW52YWxpZCBjYWxsZXIgYWRkcmVzcwAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5GsaIKA==", "height": 1665244, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: CBwC6AtuALBkQ92ondLn5A3mtvhJ5UGhbJwNHYZ29pDv Next: GZimgHcdbPNpBBjH8Pque7HKwwUd7FMekniimPBTyazv Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let incubatorAddress = base58' | |
4 | + | let incubatorAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh' | |
5 | 5 | ||
6 | - | let breederAddress = base58' | |
6 | + | let breederAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh' | |
7 | 7 | ||
8 | - | let farmingAddress = base58'' | |
8 | + | let farmingAddress = base58'3NBznG19rEYUAcnukTRTtwJHBVKQLbobVdC' | |
9 | 9 | ||
10 | - | let eggsAssetId = base58' | |
10 | + | let eggsAssetId = base58'3VUCuh9dWqe54SdzzNUkXhFXpc8UQynnJVh42B7MjNzN' | |
11 | 11 | ||
12 | 12 | let makerFee = 1 | |
13 | 13 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | - | let incubatorAddress = base58' | |
4 | + | let incubatorAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh' | |
5 | 5 | ||
6 | - | let breederAddress = base58' | |
6 | + | let breederAddress = base58'3MtBigTsaeevrcJAEwVcr4quwkqcrtnjoAh' | |
7 | 7 | ||
8 | - | let farmingAddress = base58'' | |
8 | + | let farmingAddress = base58'3NBznG19rEYUAcnukTRTtwJHBVKQLbobVdC' | |
9 | 9 | ||
10 | - | let eggsAssetId = base58' | |
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) = if (getPrizeSent(gameId, playerRole)) | |
195 | 195 | then throw("You have already got the prize") | |
196 | 196 | else if ((winner == playerRole)) | |
197 | 197 | then [BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, (getBetEggs(gameId) * 2), eggsAssetId)] | |
198 | 198 | else if ((winner == "draw")) | |
199 | 199 | then [BooleanEntry(getPrizeSentKey(gameId, playerRole), true), ScriptTransfer(playerAddress, getBetEggs(gameId), eggsAssetId)] | |
200 | 200 | else throw("You lose and don't have any prize") | |
201 | 201 | ||
202 | 202 | ||
203 | 203 | @Callable(i) | |
204 | 204 | func makeGame (slot,rarityRangeWorst,rarityRangeMedium,rarityRangeBest) = { | |
205 | 205 | let callerAddress = toBase58String(i.caller.bytes) | |
206 | 206 | let slotGameId = getSlot(slot) | |
207 | 207 | let payment = value(i.payments[0]) | |
208 | 208 | let eggs = (payment.amount - makerFee) | |
209 | 209 | let gameId = getNextGameId() | |
210 | 210 | if ((payment.assetId != eggsAssetId)) | |
211 | 211 | then throw(("You can attach only EGGs with the following asset id: " + toBase58String(eggsAssetId))) | |
212 | 212 | else if ((0 > eggs)) | |
213 | 213 | then throw("Not enough EGGs") | |
214 | 214 | else if ((eggs == 0)) | |
215 | 215 | then throw("You can't bet 0 EGGs") | |
216 | 216 | else if ((getUserCurrentGame(callerAddress) != 0)) | |
217 | 217 | then throw("You already have an active game") | |
218 | 218 | else if (if ((0 > slot)) | |
219 | 219 | then true | |
220 | 220 | else (slot >= SLOTS)) | |
221 | 221 | then throw("Invalid slot") | |
222 | 222 | else if ((slotGameId != 0)) | |
223 | 223 | then throw("This slot is busy") | |
224 | 224 | else if (if ((1 > rarityRangeWorst)) | |
225 | 225 | then true | |
226 | 226 | else (rarityRangeWorst > 5)) | |
227 | 227 | then throw("Insufficient rarity range for the worst duck") | |
228 | 228 | else if (if ((1 > rarityRangeMedium)) | |
229 | 229 | then true | |
230 | 230 | else (rarityRangeMedium > 5)) | |
231 | 231 | then throw("Insufficient rarity range for the medium duck") | |
232 | 232 | else if (if ((1 > rarityRangeBest)) | |
233 | 233 | then true | |
234 | 234 | else (rarityRangeBest > 5)) | |
235 | 235 | then throw("Insufficient rarity range for the best duck") | |
236 | 236 | else if ((rarityRangeWorst >= rarityRangeMedium)) | |
237 | 237 | then throw("The medium duck must be better than the worst one") | |
238 | 238 | else if ((rarityRangeMedium >= rarityRangeBest)) | |
239 | 239 | then throw("The best duck must be better than the medium one") | |
240 | 240 | 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))] | |
241 | 241 | } | |
242 | 242 | ||
243 | 243 | ||
244 | 244 | ||
245 | 245 | @Callable(i) | |
246 | 246 | func takeGame (slot) = { | |
247 | 247 | let callerAddress = toBase58String(i.caller.bytes) | |
248 | 248 | let gameId = getSlot(slot) | |
249 | 249 | let payment = value(i.payments[0]) | |
250 | 250 | if ((getSlot(slot) == 0)) | |
251 | 251 | then throw("This slot is empty") | |
252 | 252 | else if ((payment.assetId != eggsAssetId)) | |
253 | 253 | then throw(("You can attach only EGG tokens with the following asset id: " + toBase58String(eggsAssetId))) | |
254 | 254 | else if ((payment.amount != (getBetEggs(gameId) + takerFee))) | |
255 | 255 | then throw("Insufficient eggs amount") | |
256 | 256 | else if ((getGameTaker(gameId) != "")) | |
257 | 257 | then throw("This game is already taken") | |
258 | 258 | else if ((height >= getGameWaitingEndHeight(gameId))) | |
259 | 259 | then throw("This game is expired") | |
260 | 260 | else [IntegerEntry(getUserCurrentGameKey(callerAddress), gameId), StringEntry(getGameTakerKey(gameId), callerAddress), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration)), IntegerEntry(getSlotKey(slot), 0)] | |
261 | 261 | } | |
262 | 262 | ||
263 | 263 | ||
264 | 264 | ||
265 | 265 | @Callable(i) | |
266 | 266 | func kickGame (slot) = { | |
267 | 267 | let gameId = getSlot(slot) | |
268 | 268 | if (if ((0 > slot)) | |
269 | 269 | then true | |
270 | 270 | else (slot >= SLOTS)) | |
271 | 271 | then throw("Invalid slot") | |
272 | 272 | else if ((gameId == 0)) | |
273 | 273 | then throw("Slot is empty") | |
274 | 274 | else if ((getGameWaitingEndHeight(gameId) > height)) | |
275 | 275 | then throw("Waiting is not finished yet") | |
276 | 276 | else if ((getGameTaker(gameId) != "")) | |
277 | 277 | then throw("This game is started") | |
278 | 278 | else { | |
279 | 279 | let maker = getGameMaker(gameId) | |
280 | 280 | [IntegerEntry(getUserCurrentGameKey(maker), 0), IntegerEntry(getSlotKey(slot), 0), ScriptTransfer(Address(toBytes(maker)), (getBetEggs(gameId) + makerFee), eggsAssetId)] | |
281 | 281 | } | |
282 | 282 | } | |
283 | 283 | ||
284 | 284 | ||
285 | 285 | ||
286 | 286 | @Callable(i) | |
287 | 287 | func pickWorstDuck (gameId) = { | |
288 | 288 | let callerAddress = toBase58String(i.caller.bytes) | |
289 | 289 | let assetId = value(value(i.payments[0]).assetId) | |
290 | 290 | let gameStep = getGameStep(gameId) | |
291 | 291 | if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress))) | |
292 | 292 | then (value(assetInfo(assetId)).issuer != Address(incubatorAddress)) | |
293 | 293 | else false) | |
294 | 294 | then throw("Invalid NFT") | |
295 | 295 | else if ((gameStep == 0)) | |
296 | 296 | then if ((callerAddress != getGameTaker(gameId))) | |
297 | 297 | then throw("It is the taker's turn to pick now") | |
298 | 298 | else { | |
299 | 299 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
300 | 300 | if ((invokeRes == invokeRes)) | |
301 | 301 | then { | |
302 | 302 | let rarity = match invokeRes { | |
303 | 303 | case r: Int => | |
304 | 304 | r | |
305 | 305 | case _ => | |
306 | 306 | throw("Incorrect invoke result") | |
307 | 307 | } | |
308 | 308 | pickDuck(gameId, "taker", i.caller, assetId, rarity, "worst", 0) | |
309 | 309 | } | |
310 | 310 | else throw("Strict value is not equal to itself.") | |
311 | 311 | } | |
312 | 312 | else if ((gameStep == 1)) | |
313 | 313 | then if ((callerAddress != getGameMaker(gameId))) | |
314 | 314 | then throw("It is the maker's turn to pick now") | |
315 | 315 | else { | |
316 | 316 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
317 | 317 | if ((invokeRes == invokeRes)) | |
318 | 318 | then { | |
319 | 319 | let rarity = match invokeRes { | |
320 | 320 | case r: Int => | |
321 | 321 | r | |
322 | 322 | case _ => | |
323 | 323 | throw("Incorrect invoke result") | |
324 | 324 | } | |
325 | 325 | pickDuck(gameId, "maker", i.caller, assetId, rarity, "worst", 1) | |
326 | 326 | } | |
327 | 327 | else throw("Strict value is not equal to itself.") | |
328 | 328 | } | |
329 | 329 | else throw("The worst duck has already been picked") | |
330 | 330 | } | |
331 | 331 | ||
332 | 332 | ||
333 | 333 | ||
334 | 334 | @Callable(i) | |
335 | 335 | func pickMediumtDuck (gameId) = { | |
336 | 336 | let callerAddress = toBase58String(i.caller.bytes) | |
337 | 337 | let assetId = value(value(i.payments[0]).assetId) | |
338 | 338 | let gameStep = getGameStep(gameId) | |
339 | 339 | if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress))) | |
340 | 340 | then (value(assetInfo(assetId)).issuer != Address(incubatorAddress)) | |
341 | 341 | else false) | |
342 | 342 | then throw("Invalid NFT") | |
343 | 343 | else if ((2 > gameStep)) | |
344 | 344 | then throw("The medium duck must be picked after the worst one") | |
345 | 345 | else if ((gameStep == 2)) | |
346 | 346 | then if ((callerAddress != getGameMaker(gameId))) | |
347 | 347 | then throw("It is the maker's turn to pick now") | |
348 | 348 | else { | |
349 | 349 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
350 | 350 | if ((invokeRes == invokeRes)) | |
351 | 351 | then { | |
352 | 352 | let rarity = match invokeRes { | |
353 | 353 | case r: Int => | |
354 | 354 | r | |
355 | 355 | case _ => | |
356 | 356 | throw("Incorrect invoke result") | |
357 | 357 | } | |
358 | 358 | pickDuck(gameId, "maker", i.caller, assetId, rarity, "medium", 2) | |
359 | 359 | } | |
360 | 360 | else throw("Strict value is not equal to itself.") | |
361 | 361 | } | |
362 | 362 | else if ((gameStep == 3)) | |
363 | 363 | then if ((callerAddress != getGameTaker(gameId))) | |
364 | 364 | then throw("It is the taker's turn to pick now") | |
365 | 365 | else { | |
366 | 366 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
367 | 367 | if ((invokeRes == invokeRes)) | |
368 | 368 | then { | |
369 | 369 | let rarity = match invokeRes { | |
370 | 370 | case r: Int => | |
371 | 371 | r | |
372 | 372 | case _ => | |
373 | 373 | throw("Incorrect invoke result") | |
374 | 374 | } | |
375 | 375 | pickDuck(gameId, "taker", i.caller, assetId, rarity, "medium", 3) | |
376 | 376 | } | |
377 | 377 | else throw("Strict value is not equal to itself.") | |
378 | 378 | } | |
379 | 379 | else throw("The medium duck has already been picked") | |
380 | 380 | } | |
381 | 381 | ||
382 | 382 | ||
383 | 383 | ||
384 | 384 | @Callable(i) | |
385 | 385 | func pickBestDuck (gameId) = { | |
386 | 386 | let callerAddress = toBase58String(i.caller.bytes) | |
387 | 387 | let assetId = value(value(i.payments[0]).assetId) | |
388 | 388 | let gameStep = getGameStep(gameId) | |
389 | 389 | if (if ((value(assetInfo(assetId)).issuer != Address(breederAddress))) | |
390 | 390 | then (value(assetInfo(assetId)).issuer != Address(incubatorAddress)) | |
391 | 391 | else false) | |
392 | 392 | then throw("Invalid NFT") | |
393 | 393 | else if ((4 > gameStep)) | |
394 | 394 | then throw("The best duck must be picked after the worst and the medium ones") | |
395 | 395 | else if ((gameStep == 4)) | |
396 | 396 | then if ((callerAddress != getGameTaker(gameId))) | |
397 | 397 | then throw("It is the taker's turn to pick now") | |
398 | 398 | else { | |
399 | 399 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
400 | 400 | if ((invokeRes == invokeRes)) | |
401 | 401 | then { | |
402 | 402 | let rarity = match invokeRes { | |
403 | 403 | case r: Int => | |
404 | 404 | r | |
405 | 405 | case _ => | |
406 | 406 | throw("Incorrect invoke result") | |
407 | 407 | } | |
408 | 408 | pickDuck(gameId, "taker", i.caller, assetId, rarity, "best", 4) | |
409 | 409 | } | |
410 | 410 | else throw("Strict value is not equal to itself.") | |
411 | 411 | } | |
412 | 412 | else if ((gameStep == 5)) | |
413 | 413 | then if ((callerAddress != getGameMaker(gameId))) | |
414 | 414 | then throw("It is the maker's turn to pick now") | |
415 | 415 | else { | |
416 | 416 | let invokeRes = invoke(Address(farmingAddress), "getAssetRarityCallable", [assetId], nil) | |
417 | 417 | if ((invokeRes == invokeRes)) | |
418 | 418 | then { | |
419 | 419 | let rarity = match invokeRes { | |
420 | 420 | case r: Int => | |
421 | 421 | r | |
422 | 422 | case _ => | |
423 | 423 | throw("Incorrect invoke result") | |
424 | 424 | } | |
425 | 425 | pickDuck(gameId, "maker", i.caller, assetId, rarity, "best", 5) | |
426 | 426 | } | |
427 | 427 | else throw("Strict value is not equal to itself.") | |
428 | 428 | } | |
429 | 429 | else throw("The best duck has already been picked") | |
430 | 430 | } | |
431 | 431 | ||
432 | 432 | ||
433 | 433 | ||
434 | 434 | @Callable(i) | |
435 | 435 | func commit (gameId,hash) = { | |
436 | 436 | let callerAddress = toBase58String(i.caller.bytes) | |
437 | 437 | let gameStep = getGameStep(gameId) | |
438 | 438 | if ((6 > gameStep)) | |
439 | 439 | then throw("Ducks hasn't been picked yet") | |
440 | 440 | else if ((gameStep == 6)) | |
441 | 441 | then if ((callerAddress != getGameMaker(gameId))) | |
442 | 442 | then throw("It is the maker's turn to commit now") | |
443 | 443 | else [StringEntry(getCommitKey(gameId, "maker"), hash), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))] | |
444 | 444 | else if ((gameStep == 7)) | |
445 | 445 | then if ((callerAddress != getGameTaker(gameId))) | |
446 | 446 | then throw("It is the taker's turn to commit now") | |
447 | 447 | else [StringEntry(getCommitKey(gameId, "taker"), hash), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))] | |
448 | 448 | else throw("Commit is finished") | |
449 | 449 | } | |
450 | 450 | ||
451 | 451 | ||
452 | 452 | ||
453 | 453 | @Callable(i) | |
454 | 454 | func reveal (gameId,duckOrder,salt) = { | |
455 | 455 | let callerAddress = toBase58String(i.caller.bytes) | |
456 | 456 | let gameStep = getGameStep(gameId) | |
457 | 457 | if ((8 > gameStep)) | |
458 | 458 | then throw("Reveal is not started") | |
459 | 459 | else if (if (if (if (if (if ((duckOrder != "worst,medium,best")) | |
460 | 460 | then true | |
461 | 461 | else (duckOrder != "worst,best,medium")) | |
462 | 462 | then true | |
463 | 463 | else (duckOrder != "medium,worst,best")) | |
464 | 464 | then true | |
465 | 465 | else (duckOrder != "medium,best,worst")) | |
466 | 466 | then true | |
467 | 467 | else (duckOrder != "best,worst,medium")) | |
468 | 468 | then true | |
469 | 469 | else (duckOrder != "best,medium,worst")) | |
470 | 470 | then throw("Invalid duckOrder") | |
471 | 471 | else if ((gameStep == 8)) | |
472 | 472 | then if ((callerAddress != getGameMaker(gameId))) | |
473 | 473 | then throw("It is the maker's turn to reveal now") | |
474 | 474 | else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "maker"))) | |
475 | 475 | then throw("reveal data is not valid") | |
476 | 476 | else [StringEntry(getDuckOrderKey(gameId, "maker"), duckOrder), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))] | |
477 | 477 | else if ((gameStep == 9)) | |
478 | 478 | then if ((callerAddress != getGameTaker(gameId))) | |
479 | 479 | then throw("It is the taker's turn to reveal now") | |
480 | 480 | else if ((toBase58String(sha256(toBytes((duckOrder + salt)))) != getCommit(gameId, "taker"))) | |
481 | 481 | then throw("reveal data is not valid") | |
482 | 482 | else [StringEntry(getDuckOrderKey(gameId, "taker"), duckOrder), IntegerEntry(getGameStepKey(gameId), (gameStep + 1)), IntegerEntry(getGameOverHeightKey(gameId), (height + stepDuration))] | |
483 | 483 | else throw("Reveal is finished") | |
484 | 484 | } | |
485 | 485 | ||
486 | 486 | ||
487 | 487 | ||
488 | 488 | @Callable(i) | |
489 | 489 | func getPrize (gameId) = { | |
490 | 490 | let callerAddress = toBase58String(i.caller.bytes) | |
491 | 491 | let gameStep = getGameStep(gameId) | |
492 | 492 | if ((gameStep != 10)) | |
493 | 493 | then throw("Game is not finished") | |
494 | 494 | else if ((callerAddress == getGameMaker(gameId))) | |
495 | 495 | then sendPrize(gameId, i.caller, "maker", getWinner(gameId)) | |
496 | 496 | else if ((callerAddress == getGameTaker(gameId))) | |
497 | 497 | then sendPrize(gameId, i.caller, "taker", getWinner(gameId)) | |
498 | 498 | else throw("Invalid caller address") | |
499 | 499 | } | |
500 | 500 | ||
501 | 501 | ||
502 | 502 | ||
503 | 503 | @Callable(i) | |
504 | 504 | func getPrizeExpired (gameId) = { | |
505 | 505 | let callerAddress = toBase58String(i.caller.bytes) | |
506 | 506 | let gameStep = getGameStep(gameId) | |
507 | 507 | if ((gameStep == 10)) | |
508 | 508 | then throw("Game is finished, call getPrize instead") | |
509 | 509 | else if ((getGameOverHeight(gameId) > height)) | |
510 | 510 | then throw("Game is not expired") | |
511 | 511 | else if ((callerAddress == getGameMaker(gameId))) | |
512 | 512 | then sendPrize(gameId, i.caller, "maker", getWinnerExpired(gameStep)) | |
513 | 513 | else if ((callerAddress == getGameTaker(gameId))) | |
514 | 514 | then sendPrize(gameId, i.caller, "taker", getWinnerExpired(gameStep)) | |
515 | 515 | else throw("Invalid caller address") | |
516 | 516 | } | |
517 | 517 | ||
518 | 518 | ||
519 | 519 | @Verifier(tx) | |
520 | 520 | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
521 | 521 |
github/deemru/w8io/026f985 54.49 ms ◑