tx · GyKh7FGVCAL4xcc72iDjBMLCv6WMi88iLnkMvbLfHEkS 3Mr1J95HgTFuj93Uh61WS1PBrxc5hSx5uE5: -0.05000000 Waves 2024.10.24 19:22 [3341146] smart account 3Mr1J95HgTFuj93Uh61WS1PBrxc5hSx5uE5 > SELF 0.00000000 Waves
{ "type": 13, "id": "GyKh7FGVCAL4xcc72iDjBMLCv6WMi88iLnkMvbLfHEkS", "fee": 5000000, "feeAssetId": null, "timestamp": 1729786989843, "version": 2, "chainId": 84, "sender": "3Mr1J95HgTFuj93Uh61WS1PBrxc5hSx5uE5", "senderPublicKey": "DhKSnv34wE65np8uDd8E6ygEbNsn6fHx9p7q4hJTcgRw", "proofs": [ "6MGvViZzpWHifAHnWGFvuhW6rdCLUbBQUT1JJVaXMhNp4c7aPE9B1Af8zTnmUiAXtrk3M5tDSwM3HmSQuwAWDVp" ], "script": "base64:AAIFAAAAAAAAAA4IAhIECgIICBIECgIICAAAAAkAAAAADEJBSV9DT05UUkFDVAIAAAAjM045dEtpeHpxVFlXbkVYUXhyRFE1cEJUR3ZRZDZzRnN2bVYAAAAADEJBSV9BU1NFVF9JRAEAAAAgGMGX12UJiok9PVOZ4zl0iQKDmCaJ5oNRADPu0Fi+6RcAAAAABlBMQVlFUgIAAAABMQAAAAACQUkCAAAAATIAAAAADldJTk5JTkdfQU1PVU5UBAAAAAckbWF0Y2gwCQAEHwAAAAECAAAADndpbm5pbmdfYW1vdW50AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAANJbnQEAAAAAWkFAAAAByRtYXRjaDAFAAAAAWkAAAAAAB3NZQABAAAABmNoYXJBdAAAAAIAAAADc3RyAAAAAWkJAAGRAAAAAgkABLUAAAACBQAAAANzdHICAAAAAAUAAAABaQEAAAASY2hlY2tJZk1vdmVJc1ZhbGlkAAAAAgAAAAZnYW1lSWQAAAAFYm9hcmQEAAAADGN1cnJlbnRCb2FyZAQAAAAHJG1hdGNoMAkABCIAAAABCQABLAAAAAICAAAADWN1c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mVudEJvYXJkXwUAAAAGZ2FtZUlkBQAAAAVib2FyZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAACmluaXRpYXRvcl8FAAAABmdhbWVJZAkABCUAAAABBQAAAAZzZW5kZXIJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAAd3aW5uZXJfBQAAAAZnYW1lSWQCAAAABG5vbmUJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAAxuZXh0X3BsYXllcl8FAAAABmdhbWVJZAUAAAACQUkFAAAAA25pbAkAAAIAAAABAgAAACRTdHJpY3QgdmFsdWUgaXMgbm90IGVxdWFsIHRvIGl0c2VsZi4AAAABAAAAAnR4AQAAAAZ2ZXJpZnkAAAAACQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleT1SSA0=", "height": 3341146, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 83MTpnBtpe2b2riaztqLGWQUA7HTtdsefpSdDEUvsYtc Next: RXm9pnESJMDuwdX8Z2Y8FDSFG2Stu88QQA75N47qMkC Diff:
Old | New | Differences | |
---|---|---|---|
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV" | |
5 | 5 | ||
6 | - | let b = base58' | |
6 | + | let b = base58'2fdzyHvXGCqaz1XA8m9fodemmP9giVBcpe4Jq9F63oFL' | |
7 | 7 | ||
8 | 8 | let c = "1" | |
9 | 9 | ||
226 | 226 | ||
227 | 227 | ||
228 | 228 | @Callable(g) | |
229 | - | func callback (ae) = { | |
230 | - | let | |
231 | - | let k = | |
232 | - | let l = | |
233 | - | let | |
229 | + | func callback (ae,af) = { | |
230 | + | let ag = split(af, "_") | |
231 | + | let k = ag[0] | |
232 | + | let l = ag[1] | |
233 | + | let ah = { | |
234 | 234 | let f = getString(("next_player_" + k)) | |
235 | 235 | if ($isInstanceOf(f, "String")) | |
236 | 236 | then { | |
239 | 239 | } | |
240 | 240 | else "" | |
241 | 241 | } | |
242 | - | let | |
243 | - | if (!( | |
242 | + | let ai = j(k, l) | |
243 | + | if (!(ai)) | |
244 | 244 | then throw("Illegal move!") | |
245 | - | else if (( | |
245 | + | else if ((ah != d)) | |
246 | 246 | then throw("Player has to move first!") | |
247 | 247 | else { | |
248 | - | let | |
249 | - | if ( | |
248 | + | let aj = J(k, l, d) | |
249 | + | if (aj) | |
250 | 250 | then [StringEntry(("currentBoard_" + k), l), StringEntry(("winner_" + k), "ai")] | |
251 | 251 | else [StringEntry(("currentBoard_" + k), l), StringEntry(("next_player_" + k), c)] | |
252 | 252 | } | |
255 | 255 | ||
256 | 256 | ||
257 | 257 | @Callable(g) | |
258 | - | func playTTT ( | |
259 | - | let | |
260 | - | if (( | |
258 | + | func playTTT (ak,l) = { | |
259 | + | let al = size(g.payments) | |
260 | + | if ((al != 1)) | |
261 | 261 | then throw("Payment necessary!") | |
262 | 262 | else { | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
263 | + | let am = g.payments[0] | |
264 | + | let an = am.amount | |
265 | + | let ao = am.assetId | |
266 | + | let ap = { | |
267 | 267 | let f = getInteger(Address(fromBase58String(a)), "price_tictactoe") | |
268 | 268 | if ($isInstanceOf(f, "Int")) | |
269 | 269 | then { | |
270 | - | let | |
271 | - | | |
270 | + | let aq = f | |
271 | + | aq | |
272 | 272 | } | |
273 | 273 | else 0 | |
274 | 274 | } | |
275 | - | if (if (( | |
275 | + | if (if ((ao != b)) | |
276 | 276 | then true | |
277 | - | else ( | |
277 | + | else (ap > an)) | |
278 | 278 | then throw("Payment of the minimal BAI amount necessary!") | |
279 | 279 | else { | |
280 | - | let | |
281 | - | let k = if ((size( | |
280 | + | let ar = g.caller | |
281 | + | let k = if ((size(ak) == 0)) | |
282 | 282 | then toBase58String(g.transactionId) | |
283 | - | else | |
284 | - | let | |
283 | + | else ak | |
284 | + | let ah = { | |
285 | 285 | let f = getString(("next_player_" + k)) | |
286 | 286 | if ($isInstanceOf(f, "String")) | |
287 | 287 | then { | |
290 | 290 | } | |
291 | 291 | else c | |
292 | 292 | } | |
293 | - | if (( | |
293 | + | if ((ah != c)) | |
294 | 294 | then throw("AI hast to move first!") | |
295 | 295 | else { | |
296 | 296 | let m = { | |
302 | 302 | } | |
303 | 303 | else l | |
304 | 304 | } | |
305 | - | let | |
305 | + | let as = { | |
306 | 306 | let f = getString(("initiator_" + k)) | |
307 | 307 | if ($isInstanceOf(f, "String")) | |
308 | 308 | then { | |
309 | 309 | let n = f | |
310 | 310 | n | |
311 | 311 | } | |
312 | - | else toString( | |
312 | + | else toString(ar) | |
313 | 313 | } | |
314 | - | if ((toString( | |
314 | + | if ((toString(ar) != as)) | |
315 | 315 | then throw("Only initiator is allowed to make moves!") | |
316 | 316 | else { | |
317 | - | let | |
318 | - | if (!( | |
317 | + | let at = j(k, l) | |
318 | + | if (!(at)) | |
319 | 319 | then throw("Illegal move!") | |
320 | 320 | else { | |
321 | - | let | |
322 | - | let | |
323 | - | if ( | |
324 | - | then [StringEntry(("currentBoard_" + k), l), StringEntry(("winner_" + k), "player"), ScriptTransfer( | |
325 | - | else if (( | |
321 | + | let au = J(k, l, c) | |
322 | + | let av = U(l) | |
323 | + | if (au) | |
324 | + | then [StringEntry(("currentBoard_" + k), l), StringEntry(("winner_" + k), "player"), ScriptTransfer(ar, e, b)] | |
325 | + | else if ((av == 0)) | |
326 | 326 | then [StringEntry(("currentBoard_" + k), l), StringEntry(("winner_" + k), "draw")] | |
327 | 327 | else { | |
328 | - | let | |
329 | - | if (( | |
330 | - | then [StringEntry(("currentBoard_" + k), l), StringEntry(("initiator_" + k), toString( | |
328 | + | let aw = invoke(Address(fromBase58String(a)), "registerTaskCallback", [((k + "_") + l), "tictactoe", "callback"], [AttachedPayment(b, 10000000)]) | |
329 | + | if ((aw == aw)) | |
330 | + | then [StringEntry(("currentBoard_" + k), l), StringEntry(("initiator_" + k), toString(ar)), StringEntry(("winner_" + k), "none"), StringEntry(("next_player_" + k), d)] | |
331 | 331 | else throw("Strict value is not equal to itself.") | |
332 | 332 | } | |
333 | 333 | } | |
338 | 338 | } | |
339 | 339 | ||
340 | 340 | ||
341 | - | @Verifier( | |
342 | - | func | |
341 | + | @Verifier(ax) | |
342 | + | func ay () = sigVerify(ax.bodyBytes, ax.proofs[0], ax.senderPublicKey) | |
343 | 343 |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 5 #-} | |
2 | 2 | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | 3 | {-# CONTENT_TYPE DAPP #-} | |
4 | 4 | let a = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV" | |
5 | 5 | ||
6 | - | let b = base58' | |
6 | + | let b = base58'2fdzyHvXGCqaz1XA8m9fodemmP9giVBcpe4Jq9F63oFL' | |
7 | 7 | ||
8 | 8 | let c = "1" | |
9 | 9 | ||
10 | 10 | let d = "2" | |
11 | 11 | ||
12 | 12 | let e = { | |
13 | 13 | let f = getInteger("winning_amount") | |
14 | 14 | if ($isInstanceOf(f, "Int")) | |
15 | 15 | then { | |
16 | 16 | let g = f | |
17 | 17 | g | |
18 | 18 | } | |
19 | 19 | else 500000000 | |
20 | 20 | } | |
21 | 21 | ||
22 | 22 | func h (i,g) = split(i, "")[g] | |
23 | 23 | ||
24 | 24 | ||
25 | 25 | func j (k,l) = { | |
26 | 26 | let m = { | |
27 | 27 | let f = getString(("currentBoard_" + k)) | |
28 | 28 | if ($isInstanceOf(f, "String")) | |
29 | 29 | then { | |
30 | 30 | let n = f | |
31 | 31 | n | |
32 | 32 | } | |
33 | 33 | else "000000000" | |
34 | 34 | } | |
35 | 35 | let o = if ((h(l, 0) != h(m, 0))) | |
36 | 36 | then 1 | |
37 | 37 | else 0 | |
38 | 38 | let p = if ((h(l, 1) != h(m, 1))) | |
39 | 39 | then 1 | |
40 | 40 | else 0 | |
41 | 41 | let q = if ((h(l, 2) != h(m, 2))) | |
42 | 42 | then 1 | |
43 | 43 | else 0 | |
44 | 44 | let r = if ((h(l, 3) != h(m, 3))) | |
45 | 45 | then 1 | |
46 | 46 | else 0 | |
47 | 47 | let s = if ((h(l, 4) != h(m, 4))) | |
48 | 48 | then 1 | |
49 | 49 | else 0 | |
50 | 50 | let t = if ((h(l, 5) != h(m, 5))) | |
51 | 51 | then 1 | |
52 | 52 | else 0 | |
53 | 53 | let u = if ((h(l, 6) != h(m, 6))) | |
54 | 54 | then 1 | |
55 | 55 | else 0 | |
56 | 56 | let v = if ((h(l, 7) != h(m, 7))) | |
57 | 57 | then 1 | |
58 | 58 | else 0 | |
59 | 59 | let w = if ((h(l, 8) != h(m, 8))) | |
60 | 60 | then 1 | |
61 | 61 | else 0 | |
62 | 62 | let x = if (if ((h(l, 0) == h(m, 0))) | |
63 | 63 | then true | |
64 | 64 | else (h(m, 0) == "0")) | |
65 | 65 | then true | |
66 | 66 | else false | |
67 | 67 | let y = if (if ((h(l, 1) == h(m, 1))) | |
68 | 68 | then true | |
69 | 69 | else (h(m, 1) == "0")) | |
70 | 70 | then true | |
71 | 71 | else false | |
72 | 72 | let z = if (if ((h(l, 2) == h(m, 2))) | |
73 | 73 | then true | |
74 | 74 | else (h(m, 2) == "0")) | |
75 | 75 | then true | |
76 | 76 | else false | |
77 | 77 | let A = if (if ((h(l, 3) == h(m, 3))) | |
78 | 78 | then true | |
79 | 79 | else (h(m, 3) == "0")) | |
80 | 80 | then true | |
81 | 81 | else false | |
82 | 82 | let B = if (if ((h(l, 4) == h(m, 4))) | |
83 | 83 | then true | |
84 | 84 | else (h(m, 4) == "0")) | |
85 | 85 | then true | |
86 | 86 | else false | |
87 | 87 | let C = if (if ((h(l, 5) == h(m, 5))) | |
88 | 88 | then true | |
89 | 89 | else (h(m, 5) == "0")) | |
90 | 90 | then true | |
91 | 91 | else false | |
92 | 92 | let D = if (if ((h(l, 6) == h(m, 6))) | |
93 | 93 | then true | |
94 | 94 | else (h(m, 6) == "0")) | |
95 | 95 | then true | |
96 | 96 | else false | |
97 | 97 | let E = if (if ((h(l, 7) == h(m, 7))) | |
98 | 98 | then true | |
99 | 99 | else (h(m, 7) == "0")) | |
100 | 100 | then true | |
101 | 101 | else false | |
102 | 102 | let F = if (if ((h(l, 8) == h(m, 8))) | |
103 | 103 | then true | |
104 | 104 | else (h(m, 8) == "0")) | |
105 | 105 | then true | |
106 | 106 | else false | |
107 | 107 | let G = if (if (if (if (if (if (if (if (x) | |
108 | 108 | then y | |
109 | 109 | else false) | |
110 | 110 | then z | |
111 | 111 | else false) | |
112 | 112 | then A | |
113 | 113 | else false) | |
114 | 114 | then B | |
115 | 115 | else false) | |
116 | 116 | then C | |
117 | 117 | else false) | |
118 | 118 | then D | |
119 | 119 | else false) | |
120 | 120 | then E | |
121 | 121 | else false) | |
122 | 122 | then F | |
123 | 123 | else false | |
124 | 124 | let H = ((((((((o + p) + q) + r) + s) + t) + u) + v) + w) | |
125 | 125 | let I = (1 >= H) | |
126 | 126 | if ((H > 1)) | |
127 | 127 | then throw("More than move made!") | |
128 | 128 | else if (!(G)) | |
129 | 129 | then throw("Former position overwritten!") | |
130 | 130 | else if (G) | |
131 | 131 | then I | |
132 | 132 | else false | |
133 | 133 | } | |
134 | 134 | ||
135 | 135 | ||
136 | 136 | func J (k,l,K) = { | |
137 | 137 | let L = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]] | |
138 | 138 | let M = if (if ((h(l, L[0][0]) == K)) | |
139 | 139 | then (h(l, L[0][1]) == K) | |
140 | 140 | else false) | |
141 | 141 | then (h(l, L[0][2]) == K) | |
142 | 142 | else false | |
143 | 143 | let N = if (if ((h(l, L[1][0]) == K)) | |
144 | 144 | then (h(l, L[1][1]) == K) | |
145 | 145 | else false) | |
146 | 146 | then (h(l, L[1][2]) == K) | |
147 | 147 | else false | |
148 | 148 | let O = if (if ((h(l, L[2][0]) == K)) | |
149 | 149 | then (h(l, L[2][1]) == K) | |
150 | 150 | else false) | |
151 | 151 | then (h(l, L[2][2]) == K) | |
152 | 152 | else false | |
153 | 153 | let P = if (if ((h(l, L[3][0]) == K)) | |
154 | 154 | then (h(l, L[3][1]) == K) | |
155 | 155 | else false) | |
156 | 156 | then (h(l, L[3][2]) == K) | |
157 | 157 | else false | |
158 | 158 | let Q = if (if ((h(l, L[4][0]) == K)) | |
159 | 159 | then (h(l, L[4][1]) == K) | |
160 | 160 | else false) | |
161 | 161 | then (h(l, L[4][2]) == K) | |
162 | 162 | else false | |
163 | 163 | let R = if (if ((h(l, L[5][0]) == K)) | |
164 | 164 | then (h(l, L[5][1]) == K) | |
165 | 165 | else false) | |
166 | 166 | then (h(l, L[5][2]) == K) | |
167 | 167 | else false | |
168 | 168 | let S = if (if ((h(l, L[6][0]) == K)) | |
169 | 169 | then (h(l, L[6][1]) == K) | |
170 | 170 | else false) | |
171 | 171 | then (h(l, L[6][2]) == K) | |
172 | 172 | else false | |
173 | 173 | let T = if (if ((h(l, L[7][0]) == K)) | |
174 | 174 | then (h(l, L[7][1]) == K) | |
175 | 175 | else false) | |
176 | 176 | then (h(l, L[7][2]) == K) | |
177 | 177 | else false | |
178 | 178 | if (if (if (if (if (if (if (M) | |
179 | 179 | then true | |
180 | 180 | else N) | |
181 | 181 | then true | |
182 | 182 | else O) | |
183 | 183 | then true | |
184 | 184 | else P) | |
185 | 185 | then true | |
186 | 186 | else Q) | |
187 | 187 | then true | |
188 | 188 | else R) | |
189 | 189 | then true | |
190 | 190 | else S) | |
191 | 191 | then true | |
192 | 192 | else T | |
193 | 193 | } | |
194 | 194 | ||
195 | 195 | ||
196 | 196 | func U (l) = { | |
197 | 197 | let V = if ((h(l, 0) == "0")) | |
198 | 198 | then 1 | |
199 | 199 | else 0 | |
200 | 200 | let W = if ((h(l, 1) == "0")) | |
201 | 201 | then 1 | |
202 | 202 | else 0 | |
203 | 203 | let X = if ((h(l, 2) == "0")) | |
204 | 204 | then 1 | |
205 | 205 | else 0 | |
206 | 206 | let Y = if ((h(l, 3) == "0")) | |
207 | 207 | then 1 | |
208 | 208 | else 0 | |
209 | 209 | let Z = if ((h(l, 4) == "0")) | |
210 | 210 | then 1 | |
211 | 211 | else 0 | |
212 | 212 | let aa = if ((h(l, 5) == "0")) | |
213 | 213 | then 1 | |
214 | 214 | else 0 | |
215 | 215 | let ab = if ((h(l, 6) == "0")) | |
216 | 216 | then 1 | |
217 | 217 | else 0 | |
218 | 218 | let ac = if ((h(l, 7) == "0")) | |
219 | 219 | then 1 | |
220 | 220 | else 0 | |
221 | 221 | let ad = if ((h(l, 8) == "0")) | |
222 | 222 | then 1 | |
223 | 223 | else 0 | |
224 | 224 | ((((((((V + W) + X) + Y) + Z) + aa) + ab) + ac) + ad) | |
225 | 225 | } | |
226 | 226 | ||
227 | 227 | ||
228 | 228 | @Callable(g) | |
229 | - | func callback (ae) = { | |
230 | - | let | |
231 | - | let k = | |
232 | - | let l = | |
233 | - | let | |
229 | + | func callback (ae,af) = { | |
230 | + | let ag = split(af, "_") | |
231 | + | let k = ag[0] | |
232 | + | let l = ag[1] | |
233 | + | let ah = { | |
234 | 234 | let f = getString(("next_player_" + k)) | |
235 | 235 | if ($isInstanceOf(f, "String")) | |
236 | 236 | then { | |
237 | 237 | let n = f | |
238 | 238 | n | |
239 | 239 | } | |
240 | 240 | else "" | |
241 | 241 | } | |
242 | - | let | |
243 | - | if (!( | |
242 | + | let ai = j(k, l) | |
243 | + | if (!(ai)) | |
244 | 244 | then throw("Illegal move!") | |
245 | - | else if (( | |
245 | + | else if ((ah != d)) | |
246 | 246 | then throw("Player has to move first!") | |
247 | 247 | else { | |
248 | - | let | |
249 | - | if ( | |
248 | + | let aj = J(k, l, d) | |
249 | + | if (aj) | |
250 | 250 | then [StringEntry(("currentBoard_" + k), l), StringEntry(("winner_" + k), "ai")] | |
251 | 251 | else [StringEntry(("currentBoard_" + k), l), StringEntry(("next_player_" + k), c)] | |
252 | 252 | } | |
253 | 253 | } | |
254 | 254 | ||
255 | 255 | ||
256 | 256 | ||
257 | 257 | @Callable(g) | |
258 | - | func playTTT ( | |
259 | - | let | |
260 | - | if (( | |
258 | + | func playTTT (ak,l) = { | |
259 | + | let al = size(g.payments) | |
260 | + | if ((al != 1)) | |
261 | 261 | then throw("Payment necessary!") | |
262 | 262 | else { | |
263 | - | let | |
264 | - | let | |
265 | - | let | |
266 | - | let | |
263 | + | let am = g.payments[0] | |
264 | + | let an = am.amount | |
265 | + | let ao = am.assetId | |
266 | + | let ap = { | |
267 | 267 | let f = getInteger(Address(fromBase58String(a)), "price_tictactoe") | |
268 | 268 | if ($isInstanceOf(f, "Int")) | |
269 | 269 | then { | |
270 | - | let | |
271 | - | | |
270 | + | let aq = f | |
271 | + | aq | |
272 | 272 | } | |
273 | 273 | else 0 | |
274 | 274 | } | |
275 | - | if (if (( | |
275 | + | if (if ((ao != b)) | |
276 | 276 | then true | |
277 | - | else ( | |
277 | + | else (ap > an)) | |
278 | 278 | then throw("Payment of the minimal BAI amount necessary!") | |
279 | 279 | else { | |
280 | - | let | |
281 | - | let k = if ((size( | |
280 | + | let ar = g.caller | |
281 | + | let k = if ((size(ak) == 0)) | |
282 | 282 | then toBase58String(g.transactionId) | |
283 | - | else | |
284 | - | let | |
283 | + | else ak | |
284 | + | let ah = { | |
285 | 285 | let f = getString(("next_player_" + k)) | |
286 | 286 | if ($isInstanceOf(f, "String")) | |
287 | 287 | then { | |
288 | 288 | let n = f | |
289 | 289 | n | |
290 | 290 | } | |
291 | 291 | else c | |
292 | 292 | } | |
293 | - | if (( | |
293 | + | if ((ah != c)) | |
294 | 294 | then throw("AI hast to move first!") | |
295 | 295 | else { | |
296 | 296 | let m = { | |
297 | 297 | let f = getString(("currentBoard_" + k)) | |
298 | 298 | if ($isInstanceOf(f, "String")) | |
299 | 299 | then { | |
300 | 300 | let n = f | |
301 | 301 | n | |
302 | 302 | } | |
303 | 303 | else l | |
304 | 304 | } | |
305 | - | let | |
305 | + | let as = { | |
306 | 306 | let f = getString(("initiator_" + k)) | |
307 | 307 | if ($isInstanceOf(f, "String")) | |
308 | 308 | then { | |
309 | 309 | let n = f | |
310 | 310 | n | |
311 | 311 | } | |
312 | - | else toString( | |
312 | + | else toString(ar) | |
313 | 313 | } | |
314 | - | if ((toString( | |
314 | + | if ((toString(ar) != as)) | |
315 | 315 | then throw("Only initiator is allowed to make moves!") | |
316 | 316 | else { | |
317 | - | let | |
318 | - | if (!( | |
317 | + | let at = j(k, l) | |
318 | + | if (!(at)) | |
319 | 319 | then throw("Illegal move!") | |
320 | 320 | else { | |
321 | - | let | |
322 | - | let | |
323 | - | if ( | |
324 | - | then [StringEntry(("currentBoard_" + k), l), StringEntry(("winner_" + k), "player"), ScriptTransfer( | |
325 | - | else if (( | |
321 | + | let au = J(k, l, c) | |
322 | + | let av = U(l) | |
323 | + | if (au) | |
324 | + | then [StringEntry(("currentBoard_" + k), l), StringEntry(("winner_" + k), "player"), ScriptTransfer(ar, e, b)] | |
325 | + | else if ((av == 0)) | |
326 | 326 | then [StringEntry(("currentBoard_" + k), l), StringEntry(("winner_" + k), "draw")] | |
327 | 327 | else { | |
328 | - | let | |
329 | - | if (( | |
330 | - | then [StringEntry(("currentBoard_" + k), l), StringEntry(("initiator_" + k), toString( | |
328 | + | let aw = invoke(Address(fromBase58String(a)), "registerTaskCallback", [((k + "_") + l), "tictactoe", "callback"], [AttachedPayment(b, 10000000)]) | |
329 | + | if ((aw == aw)) | |
330 | + | then [StringEntry(("currentBoard_" + k), l), StringEntry(("initiator_" + k), toString(ar)), StringEntry(("winner_" + k), "none"), StringEntry(("next_player_" + k), d)] | |
331 | 331 | else throw("Strict value is not equal to itself.") | |
332 | 332 | } | |
333 | 333 | } | |
334 | 334 | } | |
335 | 335 | } | |
336 | 336 | } | |
337 | 337 | } | |
338 | 338 | } | |
339 | 339 | ||
340 | 340 | ||
341 | - | @Verifier( | |
342 | - | func | |
341 | + | @Verifier(ax) | |
342 | + | func ay () = sigVerify(ax.bodyBytes, ax.proofs[0], ax.senderPublicKey) | |
343 | 343 |
github/deemru/w8io/169f3d6 65.77 ms ◑