tx · 3k3LLASwsWdedCafc9oUw7RKxWV7EAkS5c74aGjuyecd 3MxUatsqdn9o8DKxmh5vp6Y2vb3Zok12wrv: -0.01000000 Waves 2019.11.05 13:01 [751437] smart account 3MxUatsqdn9o8DKxmh5vp6Y2vb3Zok12wrv > SELF 0.00000000 Waves
{ "type": 13, "id": "3k3LLASwsWdedCafc9oUw7RKxWV7EAkS5c74aGjuyecd", "fee": 1000000, "feeAssetId": null, "timestamp": 1572942125073, "version": 1, "sender": "3MxUatsqdn9o8DKxmh5vp6Y2vb3Zok12wrv", "senderPublicKey": "GyH41mG6hmFF9GeLfvkDzfZZ1CNGMNR4RMQFrxcHkS8k", "proofs": [ "5VN2C7BVKaqR2PmfnFLVeG1bmp8zbGCwgYWfjSMX4nuwQZ6vL8komhGuGMTxPpjBrMt1rDnNy5L1AZYVDCKL4vDw" ], "script": "base64:AAIDAAAAAAAAABAIARIAEgMKAQgSBQoDCAEBAAAAAAAAAAMAAAABaQEAAAAGY3JlYXRlAAAAAAQAAAADcG10CAUAAAABaQAAAAdwYXltZW50BAAAAAZhbW91bnQEAAAAByRtYXRjaDAFAAAAA3BtdAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQXR0YWNoZWRQYXltZW50BAAAAAFwBQAAAAckbWF0Y2gwCAUAAAABcAAAAAZhbW91bnQAAAAAAAAAAAAEAAAAB2Fzc2V0SWQEAAAAByRtYXRjaDAFAAAAA3BtdAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQXR0YWNoZWRQYXltZW50BAAAAAFwBQAAAAckbWF0Y2gwBAAAAAckbWF0Y2gxCAUAAAABcAAAAAdhc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAAApCeXRlVmVjdG9yBAAAAAFiBQAAAAckbWF0Y2gxBQAAAAFiAQAAAAABAAAAAAQAAAAJaW5pdENlbGxzCQABLAAAAAICAAAAcG5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5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gMDBQAAAAN3aW4GBQAAAAZmaWxsZWQJAAGRAAAAAgUAAAABZAAAAAAAAAAABwkAAaQAAAABCQAAZAAAAAIFAAAACm1vdmVOdW1iZXIAAAAAAAAAAAECAAAAAToDBQAAAAN3aW4JAAJYAAAAAQgIBQAAAAFpAAAABmNhbGxlcgAAAAVieXRlcwkAAZEAAAACBQAAAAFkAAAAAAAAAAAIBAAAAA10cmFuc2ZlckFzc2V0AwkAAAAAAAACBQAAAAVhc3NldAEAAAAABQAAAAR1bml0BQAAAAVhc3NldAQAAAAJdHJhbnNmZXJzAwUAAAADd2luCQAETAAAAAIJAQAAAA5TY3JpcHRUcmFuc2ZlcgAAAAMIBQAAAAFpAAAABmNhbGxlcgkAAGgAAAACBQAAAAZhbW91bnQAAAAAAAAAAAIFAAAADXRyYW5zZmVyQXNzZXQFAAAAA25pbAMFAAAABmZpbGxlZAkABEwAAAACCQEAAAAOU2NyaXB0VHJhbnNmZXIAAAADBQAAAAdwbGF5ZXIxBQAAAAZhbW91bnQFAAAADXRyYW5zZmVyQXNzZXQJAARMAAAAAgkBAAAADlNjcmlwdFRyYW5zZmVyAAAAAwUAAAAHcGxheWVyMgUAAAAGYW1vdW50BQAAAA10cmFuc2ZlckFzc2V0BQAAAANuaWwFAAAAA25pbAkBAAAADFNjcmlwdFJlc3VsdAAAAAIJAQAAAAhXcml0ZVNldAAAAAEJAARMAAAAAgkBAAAACURhdGFFbnRyeQAAAAIFAAAABmdhbWVJZAUAAAAHbmV3RGF0YQUAAAADbmlsCQEAAAALVHJhbnNmZXJTZXQAAAABBQAAAAl0cmFuc2ZlcnMAAAAA/q+2wQ==", "chainId": 84, "height": 751437, "spentComplexity": 0 } View: original | compacted Prev: none Next: AEwWN74twFgRjD8wynqh9f8zWB2PmezyvW2UCaMTMt6F Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 3 #-} | |
2 | + | {-# SCRIPT_TYPE ACCOUNT #-} | |
3 | + | {-# CONTENT_TYPE DAPP #-} | |
4 | + | ||
5 | + | ||
6 | + | @Callable(i) | |
7 | + | func create () = { | |
8 | + | let pmt = i.payment | |
9 | + | let amount = match pmt { | |
10 | + | case p: AttachedPayment => | |
11 | + | p.amount | |
12 | + | case _ => | |
13 | + | 0 | |
14 | + | } | |
15 | + | let assetId = match pmt { | |
16 | + | case p: AttachedPayment => | |
17 | + | match p.assetId { | |
18 | + | case b: ByteVector => | |
19 | + | b | |
20 | + | case _ => | |
21 | + | base58'' | |
22 | + | } | |
23 | + | case _ => | |
24 | + | base58'' | |
25 | + | } | |
26 | + | let initCells = ("nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" + "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn") | |
27 | + | let gameId = toBase58String(i.transactionId) | |
28 | + | let caller = toBase58String(i.caller.bytes) | |
29 | + | let data = (((((((((initCells + ":wait:") + caller) + ":unit:") + toString(amount)) + ":") + toBase58String(assetId)) + ":") + caller) + ":1:unit") | |
30 | + | WriteSet([DataEntry(gameId, "test")]) | |
31 | + | } | |
32 | + | ||
33 | + | ||
34 | + | ||
35 | + | @Callable(i) | |
36 | + | func join (gameId) = { | |
37 | + | let data = valueOrErrorMessage(getString(this, gameId), "Invalid game id") | |
38 | + | let d = split(data, ":") | |
39 | + | if ((d[1] != "wait")) | |
40 | + | then throw("The game is already running or completed") | |
41 | + | else if ((d[2] == toBase58String(i.caller.bytes))) | |
42 | + | then throw("You can't play with yourself") | |
43 | + | else { | |
44 | + | let pmt = i.payment | |
45 | + | let paymentAmount = match pmt { | |
46 | + | case p: AttachedPayment => | |
47 | + | p.amount | |
48 | + | case _ => | |
49 | + | 0 | |
50 | + | } | |
51 | + | let paymentAsset = match pmt { | |
52 | + | case p: AttachedPayment => | |
53 | + | match p.assetId { | |
54 | + | case b: ByteVector => | |
55 | + | b | |
56 | + | case _ => | |
57 | + | base58'' | |
58 | + | } | |
59 | + | case _ => | |
60 | + | base58'' | |
61 | + | } | |
62 | + | if (if ((paymentAmount != parseInt(d[4]))) | |
63 | + | then true | |
64 | + | else (paymentAsset != fromBase58String(d[5]))) | |
65 | + | then throw("Invalid game payment") | |
66 | + | else { | |
67 | + | let newData = ((((((((((((((d[0] + ":play:") + d[2]) + ":") + toBase58String(i.caller.bytes)) + ":") + d[4]) + ":") + d[5]) + ":") + d[6]) + ":") + d[7]) + ":") + d[8]) | |
68 | + | WriteSet([DataEntry(gameId, newData)]) | |
69 | + | } | |
70 | + | } | |
71 | + | } | |
72 | + | ||
73 | + | ||
74 | + | ||
75 | + | @Callable(i) | |
76 | + | func move (gameId,row,col) = { | |
77 | + | let data = valueOrErrorMessage(getString(this, gameId), "Invalid game id") | |
78 | + | let d = split(data, ":") | |
79 | + | let oldCells = d[0] | |
80 | + | let status = d[1] | |
81 | + | let player1 = addressFromStringValue(d[2]) | |
82 | + | let player2 = addressFromStringValue(d[3]) | |
83 | + | let amount = parseIntValue(d[4]) | |
84 | + | let asset = fromBase58String(d[5]) | |
85 | + | let moveAddress = addressFromString(d[6]) | |
86 | + | let moveNumber = parseIntValue(d[7]) | |
87 | + | if (if ((i.caller != player1)) | |
88 | + | then (i.caller != player2) | |
89 | + | else false) | |
90 | + | then throw("You aren't a game member") | |
91 | + | else if ((status != "play")) | |
92 | + | then throw("The game is not started or completed") | |
93 | + | else { | |
94 | + | let moveColor = if ((moveAddress == player1)) | |
95 | + | then "b" | |
96 | + | else if ((moveAddress == player2)) | |
97 | + | then "w" | |
98 | + | else throw("Invalid move address") | |
99 | + | if ((moveAddress != i.caller)) | |
100 | + | then throw("Not your turn") | |
101 | + | else if ((takeRight(take(oldCells, (((row * 15) + col) + 1)), 1) != "n")) | |
102 | + | then throw("The cell is occupied") | |
103 | + | else if (if (if (if ((row > 14)) | |
104 | + | then true | |
105 | + | else (0 > row)) | |
106 | + | then true | |
107 | + | else (col > 14)) | |
108 | + | then true | |
109 | + | else (0 > col)) | |
110 | + | then throw("Out of bounds") | |
111 | + | else { | |
112 | + | let cells = ((take(oldCells, ((row * 15) + col)) + moveColor) + takeRight(oldCells, (size(oldCells) - (((row * 15) + col) + 1)))) | |
113 | + | let targetLines = ((((((((((((((((((((((((((((((((((((if ((col >= 4)) | |
114 | + | then takeRight(take(cells, (((row * 15) + (col - 4)) + 1)), 1) | |
115 | + | else "") + (if ((col >= 3)) | |
116 | + | then takeRight(take(cells, (((row * 15) + (col - 3)) + 1)), 1) | |
117 | + | else "")) + (if ((col >= 2)) | |
118 | + | then takeRight(take(cells, (((row * 15) + (col - 2)) + 1)), 1) | |
119 | + | else "")) + (if ((col >= 1)) | |
120 | + | then takeRight(take(cells, (((row * 15) + (col - 1)) + 1)), 1) | |
121 | + | else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if ((13 >= col)) | |
122 | + | then takeRight(take(cells, (((row * 15) + (col + 1)) + 1)), 1) | |
123 | + | else "")) + (if ((12 >= col)) | |
124 | + | then takeRight(take(cells, (((row * 15) + (col + 2)) + 1)), 1) | |
125 | + | else "")) + (if ((11 >= col)) | |
126 | + | then takeRight(take(cells, (((row * 15) + (col + 3)) + 1)), 1) | |
127 | + | else "")) + (if ((10 >= col)) | |
128 | + | then takeRight(take(cells, (((row * 15) + (col + 4)) + 1)), 1) | |
129 | + | else "")) + (if ((row >= 4)) | |
130 | + | then takeRight(take(cells, ((((row - 4) * 15) + col) + 1)), 1) | |
131 | + | else "")) + (if ((row >= 3)) | |
132 | + | then takeRight(take(cells, ((((row - 3) * 15) + col) + 1)), 1) | |
133 | + | else "")) + (if ((row >= 2)) | |
134 | + | then takeRight(take(cells, ((((row - 2) * 15) + col) + 1)), 1) | |
135 | + | else "")) + (if ((row >= 1)) | |
136 | + | then takeRight(take(cells, ((((row - 1) * 15) + col) + 1)), 1) | |
137 | + | else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if ((13 >= row)) | |
138 | + | then takeRight(take(cells, ((((row + 1) * 15) + col) + 1)), 1) | |
139 | + | else "")) + (if ((12 >= row)) | |
140 | + | then takeRight(take(cells, ((((row + 2) * 15) + col) + 1)), 1) | |
141 | + | else "")) + (if ((11 >= row)) | |
142 | + | then takeRight(take(cells, ((((row + 3) * 15) + col) + 1)), 1) | |
143 | + | else "")) + (if ((10 >= row)) | |
144 | + | then takeRight(take(cells, ((((row + 4) * 15) + col) + 1)), 1) | |
145 | + | else "")) + (if (if ((row >= 4)) | |
146 | + | then (10 >= col) | |
147 | + | else false) | |
148 | + | then takeRight(take(cells, ((((row - 4) * 15) + (col + 4)) + 1)), 1) | |
149 | + | else "")) + (if (if ((row >= 3)) | |
150 | + | then (11 >= col) | |
151 | + | else false) | |
152 | + | then takeRight(take(cells, ((((row - 3) * 15) + (col + 3)) + 1)), 1) | |
153 | + | else "")) + (if (if ((row >= 2)) | |
154 | + | then (12 >= col) | |
155 | + | else false) | |
156 | + | then takeRight(take(cells, ((((row - 2) * 15) + (col + 2)) + 1)), 1) | |
157 | + | else "")) + (if (if ((row >= 1)) | |
158 | + | then (13 >= col) | |
159 | + | else false) | |
160 | + | then takeRight(take(cells, ((((row - 1) * 15) + (col + 1)) + 1)), 1) | |
161 | + | else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if (if ((13 >= row)) | |
162 | + | then (col >= 1) | |
163 | + | else false) | |
164 | + | then takeRight(take(cells, ((((row + 1) * 15) + (col - 1)) + 1)), 1) | |
165 | + | else "")) + (if (if ((12 >= row)) | |
166 | + | then (col >= 2) | |
167 | + | else false) | |
168 | + | then takeRight(take(cells, ((((row + 2) * 15) + (col - 2)) + 1)), 1) | |
169 | + | else "")) + (if (if ((11 >= row)) | |
170 | + | then (col >= 3) | |
171 | + | else false) | |
172 | + | then takeRight(take(cells, ((((row + 3) * 15) + (col - 3)) + 1)), 1) | |
173 | + | else "")) + (if (if ((10 >= row)) | |
174 | + | then (col >= 4) | |
175 | + | else false) | |
176 | + | then takeRight(take(cells, ((((row + 4) * 15) + (col - 4)) + 1)), 1) | |
177 | + | else "")) + (if (if ((row >= 4)) | |
178 | + | then (col >= 4) | |
179 | + | else false) | |
180 | + | then takeRight(take(cells, ((((row - 4) * 15) + (col - 4)) + 1)), 1) | |
181 | + | else "")) + (if (if ((row >= 3)) | |
182 | + | then (col >= 3) | |
183 | + | else false) | |
184 | + | then takeRight(take(cells, ((((row - 3) * 15) + (col - 3)) + 1)), 1) | |
185 | + | else "")) + (if (if ((row >= 2)) | |
186 | + | then (col >= 2) | |
187 | + | else false) | |
188 | + | then takeRight(take(cells, ((((row - 2) * 15) + (col - 2)) + 1)), 1) | |
189 | + | else "")) + (if (if ((row >= 1)) | |
190 | + | then (col >= 1) | |
191 | + | else false) | |
192 | + | then takeRight(take(cells, ((((row - 1) * 15) + (col - 1)) + 1)), 1) | |
193 | + | else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if (if ((13 >= row)) | |
194 | + | then (13 >= col) | |
195 | + | else false) | |
196 | + | then takeRight(take(cells, ((((row + 1) * 15) + (col + 1)) + 1)), 1) | |
197 | + | else "")) + (if (if ((12 >= row)) | |
198 | + | then (12 >= col) | |
199 | + | else false) | |
200 | + | then takeRight(take(cells, ((((row + 2) * 15) + (col + 2)) + 1)), 1) | |
201 | + | else "")) + (if (if ((11 >= row)) | |
202 | + | then (11 >= col) | |
203 | + | else false) | |
204 | + | then takeRight(take(cells, ((((row + 3) * 15) + (col + 3)) + 1)), 1) | |
205 | + | else "")) + (if (if ((10 >= row)) | |
206 | + | then (10 >= col) | |
207 | + | else false) | |
208 | + | then takeRight(take(cells, ((((row + 4) * 15) + (col + 4)) + 1)), 1) | |
209 | + | else "")) | |
210 | + | if (if ((moveColor != "b")) | |
211 | + | then (moveColor != "w") | |
212 | + | else false) | |
213 | + | then throw("invalid color in check function") | |
214 | + | else { | |
215 | + | let win = match indexOf(targetLines, ((((moveColor + moveColor) + moveColor) + moveColor) + moveColor)) { | |
216 | + | case _: Int => | |
217 | + | true | |
218 | + | case _ => | |
219 | + | false | |
220 | + | } | |
221 | + | let filled = (moveNumber == 225) | |
222 | + | let nextMoveAddress = if ((moveAddress == player1)) | |
223 | + | then player2 | |
224 | + | else if ((moveAddress == player2)) | |
225 | + | then player1 | |
226 | + | else throw("Invalid move address") | |
227 | + | let newData = ((((((((((((((((cells + ":") + (if (if (win) | |
228 | + | then true | |
229 | + | else filled) | |
230 | + | then "over" | |
231 | + | else d[1])) + ":") + d[2]) + ":") + d[3]) + ":") + d[4]) + ":") + d[5]) + ":") + (if (if (win) | |
232 | + | then true | |
233 | + | else filled) | |
234 | + | then d[6] | |
235 | + | else toString(nextMoveAddress))) + ":") + (if (if (win) | |
236 | + | then true | |
237 | + | else filled) | |
238 | + | then d[7] | |
239 | + | else toString((moveNumber + 1)))) + ":") + (if (win) | |
240 | + | then toBase58String(i.caller.bytes) | |
241 | + | else d[8])) | |
242 | + | let transferAsset = if ((asset == base58'')) | |
243 | + | then unit | |
244 | + | else asset | |
245 | + | let transfers = if (win) | |
246 | + | then [ScriptTransfer(i.caller, (amount * 2), transferAsset)] | |
247 | + | else if (filled) | |
248 | + | then [ScriptTransfer(player1, amount, transferAsset), ScriptTransfer(player2, amount, transferAsset)] | |
249 | + | else nil | |
250 | + | ScriptResult(WriteSet([DataEntry(gameId, newData)]), TransferSet(transfers)) | |
251 | + | } | |
252 | + | } | |
253 | + | } | |
254 | + | } | |
255 | + | ||
256 | + |
github/deemru/w8io/026f985 28.76 ms ◑