tx · XN8VUsQTzJD3rebUGQKm5yyp1mV3W1pL2ee3F2JmB2s 3Mr1J95HgTFuj93Uh61WS1PBrxc5hSx5uE5: -0.01000000 Waves 2024.07.17 13:51 [3197939] smart account 3Mr1J95HgTFuj93Uh61WS1PBrxc5hSx5uE5 > SELF 0.00000000 Waves
{ "type": 13, "id": "XN8VUsQTzJD3rebUGQKm5yyp1mV3W1pL2ee3F2JmB2s", "fee": 1000000, "feeAssetId": null, "timestamp": 1721213534589, "version": 2, "chainId": 84, "sender": "3Mr1J95HgTFuj93Uh61WS1PBrxc5hSx5uE5", "senderPublicKey": "DhKSnv34wE65np8uDd8E6ygEbNsn6fHx9p7q4hJTcgRw", "proofs": [ "5TC2ms4YUHqsXMbX6J4tdigYnhwCoBHChXiMG44n8EWS9WWAZM7tkdh64UGeg8j7A6ndzfbx8RcpYY6rEM5RgXHS" ], "script": "base64:AAIFAAAAAAAAAA0IAhIDCgEIEgQKAggIAAAACAAAAAAMQkFJX0NPTlRSQUNUAgAAACMzTjl0S2l4enFUWVduRVhReHJEUTVwQlRHdlFkNnNGc3ZtVgAAAAAMQkFJX0FTU0VUX0lEAQAAACCT4XI4cQSbauiaYx8EJLdkU5csPrxmC4N0r2i7JI3iQgAAAAAGUExBWUVSAgAAAAExAAAAAAJBSQIAAAABMgAAAAAOV0lOTklOR19BTU9VTlQAAAAAAAX14QABAAAABmNoYXJBdAAAAAIAAAADc3RyAAAAAWkJAAGRAAAAAgkABLUAAAACBQAAAANzdHICAAAAAAUAAAABaQEAAAASY2hlY2tJZk1vdmVJc1ZhbGlkAAAAAgAAAAZnYW1lSWQAAAAFYm9hcmQEAAAADGN1cnJlbnRCb2FyZAQAAAAHJG1hdGNoMAkABCIAAAABCQABLAAAAAICAAAADWN1cnJlbnRCb2FyZF8FAAAABmdhbWVJZAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAGU3RyaW5nBAAAAAFzBQAAAAckbWF0Y2gwBQAAAAFzAgAAAAkwMDAwMDAwM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bnRCb2FyZF8FAAAABmdhbWVJZAUAAAAFYm9hcmQJAARMAAAAAgkBAAAAC1N0cmluZ0VudHJ5AAAAAgkAASwAAAACAgAAAAd3aW5uZXJfBQAAAAZnYW1lSWQCAAAABnBsYXllcgkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAZzZW5kZXIFAAAADldJTk5JTkdfQU1PVU5UBQAAAAxCQUlfQVNTRVRfSUQFAAAAA25pbAQAAAAIbmV4dE1vdmUJAAP8AAAABAkBAAAAB0FkZHJlc3MAAAABCQACWQAAAAEFAAAADEJBSV9DT05UUkFDVAIAAAAUcmVnaXN0ZXJUYXNrQ2FsbGJhY2sJAARMAAAAAgkAASwAAAACCQABLAAAAAIFAAAABmdhbWVJZAIAAAABXwUAAAAFYm9hcmQJAARMAAAAAgIAAAAJdGljdGFjdG9lCQAETAAAAAICAAAACGNhbGxiYWNrBQAAAANuaWwJAARMAAAAAgkBAAAAD0F0dGFjaGVkUGF5bWVudAAAAAIFAAAADEJBSV9BU1NFVF9JRAAAAAAAAJiWgAUAAAADbmlsCQAETAAAAAIJAQAAAAtTdHJpbmdFbnRyeQAAAAIJAAEsAAAAAgIAAAANY3VycmVudEJvYXJkXwUAAAAGZ2FtZUlkBQAAAAVib2FyZAkABEwAAAACCQEAAAALU3RyaW5nRW50cnkAAAACCQABLAAAAAICAAAACmluaXRpYXRvcl8FAAAABmdhbWVJZAkABCUAAAABBQAAAAZzZW5kZXIFAAAAA25pbAAAAAEAAAACdHgBAAAABnZlcmlmeQAAAAAJAAH0AAAAAwgFAAAAAnR4AAAACWJvZHlCeXRlcwkAAZEAAAACCAUAAAACdHgAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAACdHgAAAAPc2VuZGVyUHVibGljS2V5S5UVJQ==", "height": 3197939, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: none Next: SPqetXGRipro9J8gFUUwvLjRGBWDRrTpZY4e6uSDfgY Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 5 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | let BAI_CONTRACT = "3N9tKixzqTYWnEXQxrDQ5pBTGvQd6sFsvmV" | |
5 | + | ||
6 | + | let BAI_ASSET_ID = base58'AxGKQRxKo4F2EbhrRq6N2tdLsxtMnpzQsS4QemV6V1W1' | |
7 | + | ||
8 | + | let PLAYER = "1" | |
9 | + | ||
10 | + | let AI = "2" | |
11 | + | ||
12 | + | let WINNING_AMOUNT = 100000000 | |
13 | + | ||
14 | + | func charAt (str,i) = split(str, "")[i] | |
15 | + | ||
16 | + | ||
17 | + | func checkIfMoveIsValid (gameId,board) = { | |
18 | + | let currentBoard = match getString(("currentBoard_" + gameId)) { | |
19 | + | case s: String => | |
20 | + | s | |
21 | + | case _ => | |
22 | + | "000000000" | |
23 | + | } | |
24 | + | let firstSelected = if ((charAt(board, 0) != charAt(currentBoard, 0))) | |
25 | + | then 1 | |
26 | + | else 0 | |
27 | + | let secondSelected = if ((charAt(board, 1) != charAt(currentBoard, 1))) | |
28 | + | then 1 | |
29 | + | else 0 | |
30 | + | let thirdSelected = if ((charAt(board, 2) != charAt(currentBoard, 2))) | |
31 | + | then 1 | |
32 | + | else 0 | |
33 | + | let fourthSelected = if ((charAt(board, 3) != charAt(currentBoard, 3))) | |
34 | + | then 1 | |
35 | + | else 0 | |
36 | + | let fifthSelected = if ((charAt(board, 4) != charAt(currentBoard, 4))) | |
37 | + | then 1 | |
38 | + | else 0 | |
39 | + | let sixthSelected = if ((charAt(board, 5) != charAt(currentBoard, 5))) | |
40 | + | then 1 | |
41 | + | else 0 | |
42 | + | let seventhSelected = if ((charAt(board, 6) != charAt(currentBoard, 6))) | |
43 | + | then 1 | |
44 | + | else 0 | |
45 | + | let eighthSelected = if ((charAt(board, 7) != charAt(currentBoard, 7))) | |
46 | + | then 1 | |
47 | + | else 0 | |
48 | + | let ninthSelected = if ((charAt(board, 8) != charAt(currentBoard, 8))) | |
49 | + | then 1 | |
50 | + | else 0 | |
51 | + | let firstPositionCorrect = if (if ((charAt(board, 0) == charAt(currentBoard, 0))) | |
52 | + | then true | |
53 | + | else (charAt(board, 0) == "0")) | |
54 | + | then true | |
55 | + | else false | |
56 | + | let secondPositionCorrect = if (if ((charAt(board, 1) == charAt(currentBoard, 1))) | |
57 | + | then true | |
58 | + | else (charAt(board, 1) == "0")) | |
59 | + | then true | |
60 | + | else false | |
61 | + | let thirdPositionCorrect = if (if ((charAt(board, 2) == charAt(currentBoard, 2))) | |
62 | + | then true | |
63 | + | else (charAt(board, 2) == "0")) | |
64 | + | then true | |
65 | + | else false | |
66 | + | let fourthPositionCorrect = if (if ((charAt(board, 3) == charAt(currentBoard, 3))) | |
67 | + | then true | |
68 | + | else (charAt(board, 3) == "0")) | |
69 | + | then true | |
70 | + | else false | |
71 | + | let fifthPositionCorrect = if (if ((charAt(board, 4) == charAt(currentBoard, 4))) | |
72 | + | then true | |
73 | + | else (charAt(board, 4) == "0")) | |
74 | + | then true | |
75 | + | else false | |
76 | + | let sixthPositionCorrect = if (if ((charAt(board, 5) == charAt(currentBoard, 5))) | |
77 | + | then true | |
78 | + | else (charAt(board, 5) == "0")) | |
79 | + | then true | |
80 | + | else false | |
81 | + | let seventhPositionCorrect = if (if ((charAt(board, 6) == charAt(currentBoard, 6))) | |
82 | + | then true | |
83 | + | else (charAt(board, 6) == "0")) | |
84 | + | then true | |
85 | + | else false | |
86 | + | let eighthPositionCorrect = if (if ((charAt(board, 7) == charAt(currentBoard, 7))) | |
87 | + | then true | |
88 | + | else (charAt(board, 7) == "0")) | |
89 | + | then true | |
90 | + | else false | |
91 | + | let ninthPositionCorrect = if (if ((charAt(board, 8) == charAt(currentBoard, 8))) | |
92 | + | then true | |
93 | + | else (charAt(board, 8) == "0")) | |
94 | + | then true | |
95 | + | else false | |
96 | + | let noOldPositionOverwritten = if (if (if (if (if (if (if (if (firstPositionCorrect) | |
97 | + | then secondPositionCorrect | |
98 | + | else false) | |
99 | + | then thirdPositionCorrect | |
100 | + | else false) | |
101 | + | then fourthPositionCorrect | |
102 | + | else false) | |
103 | + | then fifthPositionCorrect | |
104 | + | else false) | |
105 | + | then sixthPositionCorrect | |
106 | + | else false) | |
107 | + | then seventhPositionCorrect | |
108 | + | else false) | |
109 | + | then eighthPositionCorrect | |
110 | + | else false) | |
111 | + | then ninthPositionCorrect | |
112 | + | else false | |
113 | + | let countMoves = ((((((((firstSelected + secondSelected) + thirdSelected) + fourthSelected) + fifthSelected) + sixthSelected) + seventhSelected) + eighthSelected) + ninthSelected) | |
114 | + | let onlyOneMove = (countMoves == 1) | |
115 | + | if (noOldPositionOverwritten) | |
116 | + | then onlyOneMove | |
117 | + | else false | |
118 | + | } | |
119 | + | ||
120 | + | ||
121 | + | func checkIfPlayerHasWon (gameId,board,player) = { | |
122 | + | let currentBoard = match getString(("currentBoard_" + gameId)) { | |
123 | + | case s: String => | |
124 | + | s | |
125 | + | case _ => | |
126 | + | "000000000" | |
127 | + | } | |
128 | + | let winningCombinations = [[0, 1, 2], [3, 4, 5], [6, 7, 8], [0, 3, 6], [1, 4, 7], [2, 5, 8], [0, 4, 8], [2, 4, 6]] | |
129 | + | let topRow = if (if ((charAt(currentBoard, winningCombinations[0][0]) == player)) | |
130 | + | then (charAt(currentBoard, winningCombinations[0][1]) == player) | |
131 | + | else false) | |
132 | + | then (charAt(currentBoard, winningCombinations[0][2]) == player) | |
133 | + | else false | |
134 | + | let middleRow = if (if ((charAt(currentBoard, winningCombinations[1][0]) == player)) | |
135 | + | then (charAt(currentBoard, winningCombinations[1][1]) == player) | |
136 | + | else false) | |
137 | + | then (charAt(currentBoard, winningCombinations[1][2]) == player) | |
138 | + | else false | |
139 | + | let bottomRow = if (if ((charAt(currentBoard, winningCombinations[2][0]) == player)) | |
140 | + | then (charAt(currentBoard, winningCombinations[2][1]) == player) | |
141 | + | else false) | |
142 | + | then (charAt(currentBoard, winningCombinations[2][2]) == player) | |
143 | + | else false | |
144 | + | let leftColumn = if (if ((charAt(currentBoard, winningCombinations[3][0]) == player)) | |
145 | + | then (charAt(currentBoard, winningCombinations[3][1]) == player) | |
146 | + | else false) | |
147 | + | then (charAt(currentBoard, winningCombinations[3][2]) == player) | |
148 | + | else false | |
149 | + | let middleColumn = if (if ((charAt(currentBoard, winningCombinations[4][0]) == player)) | |
150 | + | then (charAt(currentBoard, winningCombinations[4][1]) == player) | |
151 | + | else false) | |
152 | + | then (charAt(currentBoard, winningCombinations[4][2]) == player) | |
153 | + | else false | |
154 | + | let rightColumn = if (if ((charAt(currentBoard, winningCombinations[5][0]) == player)) | |
155 | + | then (charAt(currentBoard, winningCombinations[5][1]) == player) | |
156 | + | else false) | |
157 | + | then (charAt(currentBoard, winningCombinations[5][2]) == player) | |
158 | + | else false | |
159 | + | let diagonalOne = if (if ((charAt(currentBoard, winningCombinations[6][0]) == player)) | |
160 | + | then (charAt(currentBoard, winningCombinations[6][1]) == player) | |
161 | + | else false) | |
162 | + | then (charAt(currentBoard, winningCombinations[6][2]) == player) | |
163 | + | else false | |
164 | + | let diagonalTwo = if (if ((charAt(currentBoard, winningCombinations[7][0]) == player)) | |
165 | + | then (charAt(currentBoard, winningCombinations[7][1]) == player) | |
166 | + | else false) | |
167 | + | then (charAt(currentBoard, winningCombinations[7][2]) == player) | |
168 | + | else false | |
169 | + | if (if (if (if (if (if (if (topRow) | |
170 | + | then true | |
171 | + | else middleRow) | |
172 | + | then true | |
173 | + | else bottomRow) | |
174 | + | then true | |
175 | + | else leftColumn) | |
176 | + | then true | |
177 | + | else middleRow) | |
178 | + | then true | |
179 | + | else rightColumn) | |
180 | + | then true | |
181 | + | else diagonalOne) | |
182 | + | then true | |
183 | + | else diagonalTwo | |
184 | + | } | |
185 | + | ||
186 | + | ||
187 | + | @Callable(i) | |
188 | + | func callback (gameIdAndBoard) = { | |
189 | + | let parts = split(gameIdAndBoard, "_") | |
190 | + | let gameId = parts[0] | |
191 | + | let board = parts[1] | |
192 | + | let moveOfAIIsValid = checkIfMoveIsValid(gameId, board) | |
193 | + | if (!(moveOfAIIsValid)) | |
194 | + | then throw("Illegal move!") | |
195 | + | else { | |
196 | + | let aiHasWon = checkIfPlayerHasWon(gameId, board, AI) | |
197 | + | if (aiHasWon) | |
198 | + | then [StringEntry(("currentBoard_" + gameId), board), StringEntry(("winner_" + gameId), "ai")] | |
199 | + | else [StringEntry(("currentBoard_" + gameId), board)] | |
200 | + | } | |
201 | + | } | |
202 | + | ||
203 | + | ||
204 | + | ||
205 | + | @Callable(i) | |
206 | + | func playTTT (game,board) = { | |
207 | + | let numberOfPayments = size(i.payments) | |
208 | + | if ((numberOfPayments != 1)) | |
209 | + | then throw("Payment necessary!") | |
210 | + | else { | |
211 | + | let payment = i.payments[0] | |
212 | + | let fee = payment.amount | |
213 | + | let feeAssetId = payment.assetId | |
214 | + | let minFee = match getInteger(Address(fromBase58String(BAI_CONTRACT)), "price_tictactoe") { | |
215 | + | case n: Int => | |
216 | + | n | |
217 | + | case _ => | |
218 | + | 0 | |
219 | + | } | |
220 | + | if (if ((feeAssetId != BAI_ASSET_ID)) | |
221 | + | then true | |
222 | + | else (minFee > fee)) | |
223 | + | then throw("Payment of the minimal BAI amount necessary!") | |
224 | + | else { | |
225 | + | let sender = i.caller | |
226 | + | let gameId = if ((size(game) == 0)) | |
227 | + | then toBase58String(i.transactionId) | |
228 | + | else game | |
229 | + | let currentBoard = match getString(("currentBoard_" + gameId)) { | |
230 | + | case s: String => | |
231 | + | s | |
232 | + | case _ => | |
233 | + | board | |
234 | + | } | |
235 | + | let initiator = match getString(("initiator_" + gameId)) { | |
236 | + | case s: String => | |
237 | + | s | |
238 | + | case _ => | |
239 | + | sender | |
240 | + | } | |
241 | + | if ((sender != initiator)) | |
242 | + | then throw("Only initiator is allowed to make moves!") | |
243 | + | else { | |
244 | + | let moveOfPlayerIsValid = checkIfMoveIsValid(gameId, board) | |
245 | + | if (!(moveOfPlayerIsValid)) | |
246 | + | then throw("Illegal move!") | |
247 | + | else { | |
248 | + | let playerHasWon = checkIfPlayerHasWon(gameId, board, PLAYER) | |
249 | + | if (playerHasWon) | |
250 | + | then [StringEntry(("currentBoard_" + gameId), board), StringEntry(("winner_" + gameId), "player"), ScriptTransfer(sender, WINNING_AMOUNT, BAI_ASSET_ID)] | |
251 | + | else { | |
252 | + | let nextMove = invoke(Address(fromBase58String(BAI_CONTRACT)), "registerTaskCallback", [((gameId + "_") + board), "tictactoe", "callback"], [AttachedPayment(BAI_ASSET_ID, 10000000)]) | |
253 | + | [StringEntry(("currentBoard_" + gameId), board), StringEntry(("initiator_" + gameId), toString(sender))] | |
254 | + | } | |
255 | + | } | |
256 | + | } | |
257 | + | } | |
258 | + | } | |
259 | + | } | |
260 | + | ||
261 | + | ||
262 | + | @Verifier(tx) | |
263 | + | func verify () = sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
264 | + |
github/deemru/w8io/169f3d6 22.07 ms ◑