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