tx · HuHAD4EcWTGEfkn7rJGHat1i9pJU6hMYFZJY1wouyVyp

3MxUatsqdn9o8DKxmh5vp6Y2vb3Zok12wrv:  -0.01400000 Waves

2019.11.05 15:35 [751603] smart account 3MxUatsqdn9o8DKxmh5vp6Y2vb3Zok12wrv > SELF 0.00000000 Waves

{ "type": 13, "id": "HuHAD4EcWTGEfkn7rJGHat1i9pJU6hMYFZJY1wouyVyp", "fee": 1400000, "feeAssetId": null, "timestamp": 1572957441813, "version": 1, "sender": "3MxUatsqdn9o8DKxmh5vp6Y2vb3Zok12wrv", "senderPublicKey": "GyH41mG6hmFF9GeLfvkDzfZZ1CNGMNR4RMQFrxcHkS8k", "proofs": [ "2TjrcjKzkuaxDa9ZriS7YJCFMYEgUiMTG2UyAqytar8VyCBWHCzpP1TGH484UZCbMDEPs1mkMJKJhuZp2jQ1yUK7" ], "script": "base64:AAIDAAAAAAAAABAIARIAEgMKAQgSBQoDCAEBAAAAAAAAAAMAAAABaQEAAAAGY3JlYXRlAAAAAAQAAAADcG10CAUAAAABaQAAAAdwYXltZW50BAAAAAZhbW91bnQEAAAAByRtYXRjaDAFAAAAA3BtdAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQXR0YWNoZWRQYXltZW50BAAAAAFwBQAAAAckbWF0Y2gwCAUAAAABcAAAAAZhbW91bnQAAAAAAAAAAAAEAAAAB2Fzc2V0SWQEAAAAByRtYXRjaDAFAAAAA3BtdAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQXR0YWNoZWRQYXltZW50BAAAAAFwBQAAAAckbWF0Y2gwBAAAAAckbWF0Y2gxCAUAAAABcAAAAAdhc3NldElkAwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAAApCeXRlVmVjdG9yBAAAAAFiBQAAAAckbWF0Y2gxCQACWAAAAAEFAAAAAWICAAAABVdBVkVTAgAAAAR1bml0BAAAAAlpbml0Q2VsbHMJAAEsAAAAAgIAAABwbm5ubm5ubm5ubm5ubm5ubm5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uc2ZlcnMAAAAAJtVVbw==", "chainId": 84, "height": 751603, "spentComplexity": 0 } View: original | compacted Prev: AEwWN74twFgRjD8wynqh9f8zWB2PmezyvW2UCaMTMt6F Next: 4FNAn1uTq1yUXueTwnJsP6qaq4o2EYTJw9pq3CRiPdrN Diff:
OldNewDifferences
1616 case p: AttachedPayment =>
1717 match p.assetId {
1818 case b: ByteVector =>
19- b
19+ toBase58String(b)
2020 case _ =>
21- base58''
21+ "WAVES"
2222 }
2323 case _ =>
24- base58''
24+ "unit"
2525 }
2626 let initCells = ("nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" + "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn")
2727 let gameId = toBase58String(i.transactionId)
2828 let caller = toBase58String(i.caller.bytes)
29- let data = (((((((((initCells + ":wait:") + caller) + ":unit:") + toString(amount)) + ":") + toBase58String(assetId)) + ":") + caller) + ":1:unit")
30- WriteSet([DataEntry(gameId, data)])
29+ let data = (((((((((initCells + ":wait:") + caller) + ":unit:") + toString(amount)) + ":") + assetId) + ":") + caller) + ":1:unit")
30+ WriteSet([DataEntry(("game:" + gameId), data)])
3131 }
3232
3333
3434
3535 @Callable(i)
3636 func join (gameId) = {
37- let data = valueOrErrorMessage(getString(this, gameId), "Invalid game id")
37+ let data = valueOrErrorMessage(getString(this, ("game:" + gameId)), "Invalid game id")
3838 let d = split(data, ":")
3939 if ((d[1] != "wait"))
4040 then throw("The game is already running or completed")
5252 case p: AttachedPayment =>
5353 match p.assetId {
5454 case b: ByteVector =>
55- b
55+ toBase58String(b)
5656 case _ =>
57- base58''
57+ "WAVES"
5858 }
5959 case _ =>
60- base58''
60+ "WAVES"
6161 }
6262 if (if ((paymentAmount != parseInt(d[4])))
6363 then true
64- else (paymentAsset != fromBase58String(d[5])))
64+ else (paymentAsset != d[5]))
6565 then throw("Invalid game payment")
6666 else {
6767 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)])
68+ WriteSet([DataEntry(("game:" + gameId), newData)])
6969 }
7070 }
7171 }
7474
7575 @Callable(i)
7676 func move (gameId,row,col) = {
77- let data = valueOrErrorMessage(getString(this, gameId), "Invalid game id")
77+ let data = valueOrErrorMessage(getString(this, ("game:" + gameId)), "Invalid game id")
7878 let d = split(data, ":")
7979 let oldCells = d[0]
8080 let status = d[1]
8181 let player1 = addressFromStringValue(d[2])
8282 let player2 = addressFromStringValue(d[3])
8383 let amount = parseIntValue(d[4])
84- let asset = fromBase58String(d[5])
84+ let asset = if ((d[5] == "WAVES"))
85+ then unit
86+ else fromBase58String(d[5])
8587 let moveAddress = addressFromString(d[6])
8688 let moveNumber = parseIntValue(d[7])
8789 if (if ((i.caller != player1))
239241 else toString((moveNumber + 1)))) + ":") + (if (win)
240242 then toBase58String(i.caller.bytes)
241243 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)]
244+ let transfers = if (if (win)
245+ then (amount > 0)
246+ else false)
247+ then [ScriptTransfer(i.caller, (amount * 2), asset)]
248+ else if (if (filled)
249+ then (amount > 0)
250+ else false)
251+ then [ScriptTransfer(player1, amount, asset), ScriptTransfer(player2, amount, asset)]
249252 else nil
250- ScriptResult(WriteSet([DataEntry(gameId, newData)]), TransferSet(transfers))
253+ ScriptResult(WriteSet([DataEntry(("game:" + gameId), newData)]), TransferSet(transfers))
251254 }
252255 }
253256 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
77 func create () = {
88 let pmt = i.payment
99 let amount = match pmt {
1010 case p: AttachedPayment =>
1111 p.amount
1212 case _ =>
1313 0
1414 }
1515 let assetId = match pmt {
1616 case p: AttachedPayment =>
1717 match p.assetId {
1818 case b: ByteVector =>
19- b
19+ toBase58String(b)
2020 case _ =>
21- base58''
21+ "WAVES"
2222 }
2323 case _ =>
24- base58''
24+ "unit"
2525 }
2626 let initCells = ("nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" + "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn")
2727 let gameId = toBase58String(i.transactionId)
2828 let caller = toBase58String(i.caller.bytes)
29- let data = (((((((((initCells + ":wait:") + caller) + ":unit:") + toString(amount)) + ":") + toBase58String(assetId)) + ":") + caller) + ":1:unit")
30- WriteSet([DataEntry(gameId, data)])
29+ let data = (((((((((initCells + ":wait:") + caller) + ":unit:") + toString(amount)) + ":") + assetId) + ":") + caller) + ":1:unit")
30+ WriteSet([DataEntry(("game:" + gameId), data)])
3131 }
3232
3333
3434
3535 @Callable(i)
3636 func join (gameId) = {
37- let data = valueOrErrorMessage(getString(this, gameId), "Invalid game id")
37+ let data = valueOrErrorMessage(getString(this, ("game:" + gameId)), "Invalid game id")
3838 let d = split(data, ":")
3939 if ((d[1] != "wait"))
4040 then throw("The game is already running or completed")
4141 else if ((d[2] == toBase58String(i.caller.bytes)))
4242 then throw("You can't play with yourself")
4343 else {
4444 let pmt = i.payment
4545 let paymentAmount = match pmt {
4646 case p: AttachedPayment =>
4747 p.amount
4848 case _ =>
4949 0
5050 }
5151 let paymentAsset = match pmt {
5252 case p: AttachedPayment =>
5353 match p.assetId {
5454 case b: ByteVector =>
55- b
55+ toBase58String(b)
5656 case _ =>
57- base58''
57+ "WAVES"
5858 }
5959 case _ =>
60- base58''
60+ "WAVES"
6161 }
6262 if (if ((paymentAmount != parseInt(d[4])))
6363 then true
64- else (paymentAsset != fromBase58String(d[5])))
64+ else (paymentAsset != d[5]))
6565 then throw("Invalid game payment")
6666 else {
6767 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)])
68+ WriteSet([DataEntry(("game:" + gameId), newData)])
6969 }
7070 }
7171 }
7272
7373
7474
7575 @Callable(i)
7676 func move (gameId,row,col) = {
77- let data = valueOrErrorMessage(getString(this, gameId), "Invalid game id")
77+ let data = valueOrErrorMessage(getString(this, ("game:" + gameId)), "Invalid game id")
7878 let d = split(data, ":")
7979 let oldCells = d[0]
8080 let status = d[1]
8181 let player1 = addressFromStringValue(d[2])
8282 let player2 = addressFromStringValue(d[3])
8383 let amount = parseIntValue(d[4])
84- let asset = fromBase58String(d[5])
84+ let asset = if ((d[5] == "WAVES"))
85+ then unit
86+ else fromBase58String(d[5])
8587 let moveAddress = addressFromString(d[6])
8688 let moveNumber = parseIntValue(d[7])
8789 if (if ((i.caller != player1))
8890 then (i.caller != player2)
8991 else false)
9092 then throw("You aren't a game member")
9193 else if ((status != "play"))
9294 then throw("The game is not started or completed")
9395 else {
9496 let moveColor = if ((moveAddress == player1))
9597 then "b"
9698 else if ((moveAddress == player2))
9799 then "w"
98100 else throw("Invalid move address")
99101 if ((moveAddress != i.caller))
100102 then throw("Not your turn")
101103 else if ((takeRight(take(oldCells, (((row * 15) + col) + 1)), 1) != "n"))
102104 then throw("The cell is occupied")
103105 else if (if (if (if ((row > 14))
104106 then true
105107 else (0 > row))
106108 then true
107109 else (col > 14))
108110 then true
109111 else (0 > col))
110112 then throw("Out of bounds")
111113 else {
112114 let cells = ((take(oldCells, ((row * 15) + col)) + moveColor) + takeRight(oldCells, (size(oldCells) - (((row * 15) + col) + 1))))
113115 let targetLines = ((((((((((((((((((((((((((((((((((((if ((col >= 4))
114116 then takeRight(take(cells, (((row * 15) + (col - 4)) + 1)), 1)
115117 else "") + (if ((col >= 3))
116118 then takeRight(take(cells, (((row * 15) + (col - 3)) + 1)), 1)
117119 else "")) + (if ((col >= 2))
118120 then takeRight(take(cells, (((row * 15) + (col - 2)) + 1)), 1)
119121 else "")) + (if ((col >= 1))
120122 then takeRight(take(cells, (((row * 15) + (col - 1)) + 1)), 1)
121123 else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if ((13 >= col))
122124 then takeRight(take(cells, (((row * 15) + (col + 1)) + 1)), 1)
123125 else "")) + (if ((12 >= col))
124126 then takeRight(take(cells, (((row * 15) + (col + 2)) + 1)), 1)
125127 else "")) + (if ((11 >= col))
126128 then takeRight(take(cells, (((row * 15) + (col + 3)) + 1)), 1)
127129 else "")) + (if ((10 >= col))
128130 then takeRight(take(cells, (((row * 15) + (col + 4)) + 1)), 1)
129131 else "")) + (if ((row >= 4))
130132 then takeRight(take(cells, ((((row - 4) * 15) + col) + 1)), 1)
131133 else "")) + (if ((row >= 3))
132134 then takeRight(take(cells, ((((row - 3) * 15) + col) + 1)), 1)
133135 else "")) + (if ((row >= 2))
134136 then takeRight(take(cells, ((((row - 2) * 15) + col) + 1)), 1)
135137 else "")) + (if ((row >= 1))
136138 then takeRight(take(cells, ((((row - 1) * 15) + col) + 1)), 1)
137139 else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if ((13 >= row))
138140 then takeRight(take(cells, ((((row + 1) * 15) + col) + 1)), 1)
139141 else "")) + (if ((12 >= row))
140142 then takeRight(take(cells, ((((row + 2) * 15) + col) + 1)), 1)
141143 else "")) + (if ((11 >= row))
142144 then takeRight(take(cells, ((((row + 3) * 15) + col) + 1)), 1)
143145 else "")) + (if ((10 >= row))
144146 then takeRight(take(cells, ((((row + 4) * 15) + col) + 1)), 1)
145147 else "")) + (if (if ((row >= 4))
146148 then (10 >= col)
147149 else false)
148150 then takeRight(take(cells, ((((row - 4) * 15) + (col + 4)) + 1)), 1)
149151 else "")) + (if (if ((row >= 3))
150152 then (11 >= col)
151153 else false)
152154 then takeRight(take(cells, ((((row - 3) * 15) + (col + 3)) + 1)), 1)
153155 else "")) + (if (if ((row >= 2))
154156 then (12 >= col)
155157 else false)
156158 then takeRight(take(cells, ((((row - 2) * 15) + (col + 2)) + 1)), 1)
157159 else "")) + (if (if ((row >= 1))
158160 then (13 >= col)
159161 else false)
160162 then takeRight(take(cells, ((((row - 1) * 15) + (col + 1)) + 1)), 1)
161163 else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if (if ((13 >= row))
162164 then (col >= 1)
163165 else false)
164166 then takeRight(take(cells, ((((row + 1) * 15) + (col - 1)) + 1)), 1)
165167 else "")) + (if (if ((12 >= row))
166168 then (col >= 2)
167169 else false)
168170 then takeRight(take(cells, ((((row + 2) * 15) + (col - 2)) + 1)), 1)
169171 else "")) + (if (if ((11 >= row))
170172 then (col >= 3)
171173 else false)
172174 then takeRight(take(cells, ((((row + 3) * 15) + (col - 3)) + 1)), 1)
173175 else "")) + (if (if ((10 >= row))
174176 then (col >= 4)
175177 else false)
176178 then takeRight(take(cells, ((((row + 4) * 15) + (col - 4)) + 1)), 1)
177179 else "")) + (if (if ((row >= 4))
178180 then (col >= 4)
179181 else false)
180182 then takeRight(take(cells, ((((row - 4) * 15) + (col - 4)) + 1)), 1)
181183 else "")) + (if (if ((row >= 3))
182184 then (col >= 3)
183185 else false)
184186 then takeRight(take(cells, ((((row - 3) * 15) + (col - 3)) + 1)), 1)
185187 else "")) + (if (if ((row >= 2))
186188 then (col >= 2)
187189 else false)
188190 then takeRight(take(cells, ((((row - 2) * 15) + (col - 2)) + 1)), 1)
189191 else "")) + (if (if ((row >= 1))
190192 then (col >= 1)
191193 else false)
192194 then takeRight(take(cells, ((((row - 1) * 15) + (col - 1)) + 1)), 1)
193195 else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if (if ((13 >= row))
194196 then (13 >= col)
195197 else false)
196198 then takeRight(take(cells, ((((row + 1) * 15) + (col + 1)) + 1)), 1)
197199 else "")) + (if (if ((12 >= row))
198200 then (12 >= col)
199201 else false)
200202 then takeRight(take(cells, ((((row + 2) * 15) + (col + 2)) + 1)), 1)
201203 else "")) + (if (if ((11 >= row))
202204 then (11 >= col)
203205 else false)
204206 then takeRight(take(cells, ((((row + 3) * 15) + (col + 3)) + 1)), 1)
205207 else "")) + (if (if ((10 >= row))
206208 then (10 >= col)
207209 else false)
208210 then takeRight(take(cells, ((((row + 4) * 15) + (col + 4)) + 1)), 1)
209211 else ""))
210212 if (if ((moveColor != "b"))
211213 then (moveColor != "w")
212214 else false)
213215 then throw("invalid color in check function")
214216 else {
215217 let win = match indexOf(targetLines, ((((moveColor + moveColor) + moveColor) + moveColor) + moveColor)) {
216218 case _: Int =>
217219 true
218220 case _ =>
219221 false
220222 }
221223 let filled = (moveNumber == 225)
222224 let nextMoveAddress = if ((moveAddress == player1))
223225 then player2
224226 else if ((moveAddress == player2))
225227 then player1
226228 else throw("Invalid move address")
227229 let newData = ((((((((((((((((cells + ":") + (if (if (win)
228230 then true
229231 else filled)
230232 then "over"
231233 else d[1])) + ":") + d[2]) + ":") + d[3]) + ":") + d[4]) + ":") + d[5]) + ":") + (if (if (win)
232234 then true
233235 else filled)
234236 then d[6]
235237 else toString(nextMoveAddress))) + ":") + (if (if (win)
236238 then true
237239 else filled)
238240 then d[7]
239241 else toString((moveNumber + 1)))) + ":") + (if (win)
240242 then toBase58String(i.caller.bytes)
241243 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)]
244+ let transfers = if (if (win)
245+ then (amount > 0)
246+ else false)
247+ then [ScriptTransfer(i.caller, (amount * 2), asset)]
248+ else if (if (filled)
249+ then (amount > 0)
250+ else false)
251+ then [ScriptTransfer(player1, amount, asset), ScriptTransfer(player2, amount, asset)]
249252 else nil
250- ScriptResult(WriteSet([DataEntry(gameId, newData)]), TransferSet(transfers))
253+ ScriptResult(WriteSet([DataEntry(("game:" + gameId), newData)]), TransferSet(transfers))
251254 }
252255 }
253256 }
254257 }
255258
256259

github/deemru/w8io/026f985 
105.95 ms