tx · 3Kipi8SojfZffmAH1aaffTiDeUGtrai7TX2YYkgo2QPq

3Mwpu1wuygknW9T6Fiwey36EVgWHq3JA374:  -0.01400000 Waves

2019.08.26 11:11 [647872] smart account 3Mwpu1wuygknW9T6Fiwey36EVgWHq3JA374 > SELF 0.00000000 Waves

{ "type": 13, "id": "3Kipi8SojfZffmAH1aaffTiDeUGtrai7TX2YYkgo2QPq", "fee": 1400000, "feeAssetId": null, "timestamp": 1566807070880, "version": 1, "sender": "3Mwpu1wuygknW9T6Fiwey36EVgWHq3JA374", "senderPublicKey": "DemU5FgQnMdjKkZvS84MvT6TSVu64wNaq8Dd8fQZRzcX", "proofs": [ "4ZPoRSiGSHnFwqzXkuxMh47aJC6PCBQoHRHCnbYq7apVnEGqdCbpinAp96JDHcKicopwbwVQy4f7c7oWJWfqdy3M" ], "script": "base64:AAIDAAAAAAAAAAAAAAAAAAAAAwAAAAFpAQAAAAZjcmVhdGUAAAAABAAAAANwbXQIBQAAAAFpAAAAB3BheW1lbnQEAAAABmFtb3VudAQAAAAHJG1hdGNoMAUAAAADcG10AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9BdHRhY2hlZFBheW1lbnQEAAAAAXAFAAAAByRtYXRjaDAIBQAAAAFwAAAABmFtb3VudAAAAAAAAAAAAAQAAAAHYXNzZXRJZAQAAAAHJG1hdGNoMAUAAAADcG10AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9BdHRhY2hlZFBheW1lbnQEAAAAAXAFAAAAByRtYXRjaDAEAAAAByRtYXRjaDEIBQAAAAFwAAAAB2Fzc2V0SWQDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAACkJ5dGVWZWN0b3IEAAAAAWIFAAAAByRtYXRjaDEFAAAAAWIBAAAAAAEAAAAABAAAAAlpbml0Q2VsbHMJAAEsAAAAAgIAAABwbm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ubm5ub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ZToJAAGkAAAAAQUAAAAGZ2FtZUlkAgAAAAxfbW92ZV9udW1iZXIJAABkAAAAAgUAAAAKbW92ZU51bWJlcgAAAAAAAAAAAQkABEwAAAACCQEAAAAJRGF0YUVudHJ5AAAAAgkAASwAAAACCQABLAAAAAICAAAABWdhbWU6CQABpAAAAAEFAAAABmdhbWVJZAIAAAANX21vdmVfYWRkcmVzcwkABCUAAAABBQAAAA9uZXh0TW92ZUFkZHJlc3MFAAAAA25pbAAAAABXD8EZ", "chainId": 84, "height": 647872, "spentComplexity": 0 } View: original | compacted Prev: 7TLLFrCRmc1MUAahE2P8LotaNYpVSxMZf19ksEAXANfx Next: CttuE8ENyQC5Xy9Kw5wbEHjvYHqDCS1JV2jBaKbyFyyR Diff:
OldNewDifferences
44
55
66 @Callable(i)
7-func createGame () = {
7+func create () = {
88 let pmt = i.payment
99 let amount = match pmt {
1010 case p: AttachedPayment =>
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 3 #-}
22 {-# SCRIPT_TYPE ACCOUNT #-}
33 {-# CONTENT_TYPE DAPP #-}
44
55
66 @Callable(i)
7-func createGame () = {
7+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 =>
1919 b
2020 case _ =>
2121 base58''
2222 }
2323 case _ =>
2424 base58''
2525 }
2626 let initCells = ("nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn" + "nnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn")
2727 let games = valueOrErrorMessage(getInteger(this, "games"), "Invalid games number")
2828 let gameId = (games + 1)
2929 WriteSet([DataEntry("games", (games + 1)), DataEntry((("game:" + toString(gameId)) + "_cells"), initCells), DataEntry((("game:" + toString(gameId)) + "_status"), "wait"), DataEntry((("game:" + toString(gameId)) + "_player1_address"), toBase58String(i.caller.bytes)), DataEntry((("game:" + toString(gameId)) + "_player2_address"), "null"), DataEntry((("game:" + toString(gameId)) + "_payment_amount"), amount), DataEntry((("game:" + toString(gameId)) + "_payment_asset"), assetId), DataEntry((("game:" + toString(gameId)) + "_move_address"), toBase58String(i.caller.bytes)), DataEntry((("game:" + toString(gameId)) + "_move_number"), 1), DataEntry((("game:" + toString(gameId)) + "_winner"), "null")])
3030 }
3131
3232
3333
3434 @Callable(i)
3535 func join (gameId) = {
3636 let gameStatus = valueOrErrorMessage(getString(this, (("game:" + toString(gameId)) + "_status")), "There is no game with the specified number")
3737 if ((gameStatus == "wait"))
3838 then {
3939 let player1 = getStringValue(this, (("game:" + toString(gameId)) + "_player1_address"))
4040 if ((toBase58String(i.caller.bytes) != player1))
4141 then {
4242 let gameAmount = getIntegerValue(this, (("game:" + toString(gameId)) + "_payment_amount"))
4343 let gameAsset = getBinaryValue(this, (("game:" + toString(gameId)) + "_payment_asset"))
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 =>
5555 b
5656 case _ =>
5757 base58''
5858 }
5959 case _ =>
6060 base58''
6161 }
6262 if (if ((paymentAmount == gameAmount))
6363 then (paymentAsset == gameAsset)
6464 else false)
6565 then WriteSet([DataEntry((("game:" + toString(gameId)) + "_status"), "play"), DataEntry((("game:" + toString(gameId)) + "_player2_address"), toBase58String(i.caller.bytes))])
6666 else throw("Invalid game payment")
6767 }
6868 else throw("You can't play with yourself")
6969 }
7070 else throw("The game is already running or completed")
7171 }
7272
7373
7474
7575 @Callable(i)
7676 func move (gameId,row,col) = {
7777 let gameStatus = valueOrErrorMessage(getString(this, (("game:" + toString(gameId)) + "_status")), "There is no game with the specified number")
7878 let player1 = addressFromStringValue(getStringValue(this, (("game:" + toString(gameId)) + "_player1_address")))
7979 let player2 = addressFromStringValue(getStringValue(this, (("game:" + toString(gameId)) + "_player2_address")))
8080 if (if ((i.caller != player1))
8181 then (i.caller != player2)
8282 else false)
8383 then throw()
8484 else if ((gameStatus != "play"))
8585 then throw("The game is not started or completed")
8686 else {
8787 let moveAddress = addressFromString(getStringValue(this, ((("game:" + toString(gameId)) + "_") + "_move_address")))
8888 let moveColor = if ((moveAddress == player1))
8989 then "b"
9090 else if ((moveAddress == player2))
9191 then "w"
9292 else throw("Invalid move address")
9393 let moveNumber = getIntegerValue(this, (("game:" + toString(gameId)) + "_move_number"))
9494 let cells = valueOrErrorMessage(getString(this, (("game:" + toString(gameId)) + "_cells")), "Invalid cells number")
9595 if ((moveAddress != i.caller))
9696 then throw("Not your turn")
9797 else if ((takeRight(take(cells, (((row * 15) + col) + 1)), 1) != "n"))
9898 then throw("The cell is occupied")
9999 else {
100100 let newCells = if (if (if (if ((row > 14))
101101 then true
102102 else (0 > row))
103103 then true
104104 else (col > 14))
105105 then true
106106 else (0 > col))
107107 then throw("Out of bounds")
108108 else ((take(cells, ((row * 15) + col)) + moveColor) + takeRight(cells, (size(cells) - (((row * 15) + col) + 1))))
109109 let targetLines = ((((((((((((((((((((((((((((((((((((if ((col >= 4))
110110 then takeRight(take(cells, (((row * 15) + (col - 4)) + 1)), 1)
111111 else "") + (if ((col >= 3))
112112 then takeRight(take(cells, (((row * 15) + (col - 3)) + 1)), 1)
113113 else "")) + (if ((col >= 2))
114114 then takeRight(take(cells, (((row * 15) + (col - 2)) + 1)), 1)
115115 else "")) + (if ((col >= 1))
116116 then takeRight(take(cells, (((row * 15) + (col - 1)) + 1)), 1)
117117 else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if ((13 >= col))
118118 then takeRight(take(cells, (((row * 15) + (col + 1)) + 1)), 1)
119119 else "")) + (if ((12 >= col))
120120 then takeRight(take(cells, (((row * 15) + (col + 2)) + 1)), 1)
121121 else "")) + (if ((11 >= col))
122122 then takeRight(take(cells, (((row * 15) + (col + 3)) + 1)), 1)
123123 else "")) + (if ((10 >= col))
124124 then takeRight(take(cells, (((row * 15) + (col + 4)) + 1)), 1)
125125 else "")) + (if ((row >= 4))
126126 then takeRight(take(cells, ((((row - 4) * 15) + col) + 1)), 1)
127127 else "")) + (if ((row >= 3))
128128 then takeRight(take(cells, ((((row - 3) * 15) + col) + 1)), 1)
129129 else "")) + (if ((row >= 2))
130130 then takeRight(take(cells, ((((row - 2) * 15) + col) + 1)), 1)
131131 else "")) + (if ((row >= 1))
132132 then takeRight(take(cells, ((((row - 1) * 15) + col) + 1)), 1)
133133 else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if ((13 >= row))
134134 then takeRight(take(cells, ((((row + 1) * 15) + col) + 1)), 1)
135135 else "")) + (if ((12 >= row))
136136 then takeRight(take(cells, ((((row + 2) * 15) + col) + 1)), 1)
137137 else "")) + (if ((11 >= row))
138138 then takeRight(take(cells, ((((row + 3) * 15) + col) + 1)), 1)
139139 else "")) + (if ((10 >= row))
140140 then takeRight(take(cells, ((((row + 4) * 15) + col) + 1)), 1)
141141 else "")) + (if (if ((row >= 4))
142142 then (10 >= col)
143143 else false)
144144 then takeRight(take(cells, ((((row - 4) * 15) + (col + 4)) + 1)), 1)
145145 else "")) + (if (if ((row >= 3))
146146 then (11 >= col)
147147 else false)
148148 then takeRight(take(cells, ((((row - 3) * 15) + (col + 3)) + 1)), 1)
149149 else "")) + (if (if ((row >= 2))
150150 then (12 >= col)
151151 else false)
152152 then takeRight(take(cells, ((((row - 2) * 15) + (col + 2)) + 1)), 1)
153153 else "")) + (if (if ((row >= 1))
154154 then (13 >= col)
155155 else false)
156156 then takeRight(take(cells, ((((row - 1) * 15) + (col + 1)) + 1)), 1)
157157 else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if (if ((13 >= row))
158158 then (col >= 1)
159159 else false)
160160 then takeRight(take(cells, ((((row + 1) * 15) + (col - 1)) + 1)), 1)
161161 else "")) + (if (if ((12 >= row))
162162 then (col >= 2)
163163 else false)
164164 then takeRight(take(cells, ((((row + 2) * 15) + (col - 2)) + 1)), 1)
165165 else "")) + (if (if ((11 >= row))
166166 then (col >= 3)
167167 else false)
168168 then takeRight(take(cells, ((((row + 3) * 15) + (col - 3)) + 1)), 1)
169169 else "")) + (if (if ((10 >= row))
170170 then (col >= 4)
171171 else false)
172172 then takeRight(take(cells, ((((row + 4) * 15) + (col - 4)) + 1)), 1)
173173 else "")) + (if (if ((row >= 4))
174174 then (col >= 4)
175175 else false)
176176 then takeRight(take(cells, ((((row - 4) * 15) + (col - 4)) + 1)), 1)
177177 else "")) + (if (if ((row >= 3))
178178 then (col >= 3)
179179 else false)
180180 then takeRight(take(cells, ((((row - 3) * 15) + (col - 3)) + 1)), 1)
181181 else "")) + (if (if ((row >= 2))
182182 then (col >= 2)
183183 else false)
184184 then takeRight(take(cells, ((((row - 2) * 15) + (col - 2)) + 1)), 1)
185185 else "")) + (if (if ((row >= 1))
186186 then (col >= 1)
187187 else false)
188188 then takeRight(take(cells, ((((row - 1) * 15) + (col - 1)) + 1)), 1)
189189 else "")) + takeRight(take(cells, (((row * 15) + col) + 1)), 1)) + (if (if ((13 >= row))
190190 then (13 >= col)
191191 else false)
192192 then takeRight(take(cells, ((((row + 1) * 15) + (col + 1)) + 1)), 1)
193193 else "")) + (if (if ((12 >= row))
194194 then (12 >= col)
195195 else false)
196196 then takeRight(take(cells, ((((row + 2) * 15) + (col + 2)) + 1)), 1)
197197 else "")) + (if (if ((11 >= row))
198198 then (11 >= col)
199199 else false)
200200 then takeRight(take(cells, ((((row + 3) * 15) + (col + 3)) + 1)), 1)
201201 else "")) + (if (if ((10 >= row))
202202 then (10 >= col)
203203 else false)
204204 then takeRight(take(cells, ((((row + 4) * 15) + (col + 4)) + 1)), 1)
205205 else ""))
206206 let win = if (if ((moveColor != "b"))
207207 then (moveColor != "w")
208208 else false)
209209 then throw("invalid color in check function")
210210 else match indexOf(targetLines, ((((moveColor + moveColor) + moveColor) + moveColor) + moveColor)) {
211211 case _: Int =>
212212 true
213213 case _ =>
214214 false
215215 }
216216 let filled = (moveNumber == 225)
217217 let paymentAmount = getIntegerValue(this, (("game:" + toString(gameId)) + "_payment_amount"))
218218 let paymentAsset = fromBase58String(getStringValue(this, (("game:" + toString(gameId)) + "_payment_asset")))
219219 if (win)
220220 then ScriptResult(WriteSet([DataEntry((("game:" + toString(gameId)) + "_status"), "over"), DataEntry((("game:" + toString(gameId)) + "_cells"), newCells), DataEntry((("game:" + toString(gameId)) + "_winner"), toBase58String(i.caller.bytes))]), TransferSet([if ((paymentAsset == base58''))
221221 then ScriptTransfer(i.caller, (paymentAmount * 2), unit)
222222 else ScriptTransfer(i.caller, (paymentAmount * 2), paymentAsset)]))
223223 else if (filled)
224224 then ScriptResult(WriteSet([DataEntry((("game:" + toString(gameId)) + "_status"), "over"), DataEntry((("game:" + toString(gameId)) + "_cells"), newCells)]), TransferSet([if ((paymentAsset == base58''))
225225 then ScriptTransfer(player1, paymentAmount, unit)
226226 else ScriptTransfer(player1, paymentAmount, paymentAsset), if ((paymentAsset == base58''))
227227 then ScriptTransfer(player2, paymentAmount, unit)
228228 else ScriptTransfer(player2, paymentAmount, paymentAsset)]))
229229 else {
230230 let nextMoveAddress = if ((moveAddress == player1))
231231 then player2
232232 else if ((moveAddress == player2))
233233 then player1
234234 else throw("Invalid move address")
235235 WriteSet([DataEntry((("game:" + toString(gameId)) + "_cells"), newCells), DataEntry((("game:" + toString(gameId)) + "_move_number"), (moveNumber + 1)), DataEntry((("game:" + toString(gameId)) + "_move_address"), toString(nextMoveAddress))])
236236 }
237237 }
238238 }
239239 }
240240
241241

github/deemru/w8io/026f985 
56.75 ms