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