tx · 4FwY8LJRfBDe4hcfBUAdvHUPGveS9ttvTUZgP9pWQLbL

3MwpUQwpSfHV1rFfHqCuuYL7A9K8ursTQWk:  -0.01420000 Waves

2018.10.08 18:35 [366731] smart account 3MwpUQwpSfHV1rFfHqCuuYL7A9K8ursTQWk > SELF 0.00000000 Waves

{ "type": 13, "id": "4FwY8LJRfBDe4hcfBUAdvHUPGveS9ttvTUZgP9pWQLbL", "fee": 1420000, "feeAssetId": null, "timestamp": 1539013009565, "version": 1, "sender": "3MwpUQwpSfHV1rFfHqCuuYL7A9K8ursTQWk", "senderPublicKey": "5ydncg624xM6LmJKWJ26iZoy7XBdGx9JxcgqKMNhJPaz", "proofs": [ "3ugSh45UP7yh6RWLCTBTQ2fjsuHe24ykRFZPDAzufUUtzS2iYqYRuDeowVN53uKV11FGw4A8FLauudvBrkHuvoQN" ], "script": "base64:AQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAACZHQFAAAAByRtYXRjaDAEAAAADmdhbWVOb3RTdGFydGVkBAAAAAckbWF0Y2gxCQAEGgAAAAIIBQAAAAJkdAAAAAZzZW5kZXICAAAACWdhbWVTdGF0ZQMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAADSW50BAAAAAFpBQAAAAckbWF0Y2gxBwYEAAAADG9sZEdhbWVTdGF0ZQkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIIBQAAAAJkdAAAAAZzZW5kZXICAAAACWdhbWVTdGF0ZQQAAAAMbmV3R2FtZVN0YXRlCQEAAAAHZXh0cmFjdAAAAAEJAAQQAAAAAggFAAAAAmR0AAAABGRhdGECAAAACWdhbWVTdGF0ZQQAAAAJdmFsaWRTdGVwCQAAAAAAAAIJAABkAAAAAgUAAAAMb2xkR2FtZVN0YXRlAAAAAAAAAAABBQAAAAxuZXdHYW1lU3RhdGUEAAAAEmdhbWVJbml0aWFsaXphdGlvbgMDBQAA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AAAdleHRyYWN0AAAAAQkABBoAAAACCAUAAAACZHQAAAAGc2VuZGVyAgAAAAlnYW1lU3RhdGUAAAAAAAAAAAYJAAAAAAAAAgkBAAAAB2V4dHJhY3QAAAABCQAEEAAAAAIIBQAAAAJkdAAAAARkYXRhAgAAAAdjb21tYW5kAAAAAAAAAAAHBwkAAAAAAAACCQEAAAAHZXh0cmFjdAAAAAEJAAQTAAAAAggFAAAAAmR0AAAABGRhdGECAAAACWdhbWVTdGF0ZQIAAAAFZW5kZWQHAwMDAwMDAwUAAAASZ2FtZUluaXRpYWxpemF0aW9uBgUAAAATcGxheWVyc1JlZ2lzdHJhdGlvbgYFAAAAE3BsYXllcjFSZWdpc3RyYXRpb24GBQAAABNwbGF5ZXIyUmVnaXN0cmF0aW9uBgUAAAAJZ2FtZUJlZ2luBgUAAAAFbW92ZTEGBQAAAAVtb3ZlMgYFAAAAB2dhbWVFbmQG1qdttw==", "chainId": 84, "height": 366731, "spentComplexity": 0 } View: original | compacted Prev: EqHLx75VBAapRe79PTwqATPv6hhDHJPdnSzkkAYpozxb Next: FBZ9LCa1AhjgobA3745VTSjFDxyHbtA8JuRye1DsWwCo Diff:
OldNewDifferences
88 case _ =>
99 true
1010 }
11+ let oldGameState = extract(getInteger(dt.sender, "gameState"))
12+ let newGameState = extract(getInteger(dt.data, "gameState"))
13+ let validStep = ((oldGameState + 1) == newGameState)
1114 let gameInitialization = if (if (gameNotStarted)
1215 then (extract(getInteger(dt.data, "command")) == 0)
1316 else false)
1417 then (extract(getInteger(dt.data, "gameState")) == 0)
1518 else false
16- let playersRegistration = if (if (if (if ((extract(getInteger(dt.sender, "gameState")) == 0))
19+ let playersRegistration = if (if (if (validStep)
1720 then (extract(getInteger(dt.data, "command")) == 1)
18- else false)
19- then (extract(getInteger(dt.data, "gameState")) == 1)
2021 else false)
2122 then (extract(getString(dt.data, "player1")) == "")
2223 else false)
2324 then (extract(getString(dt.data, "player2")) == "")
2425 else false
25- let player1Registration = if (if (if ((extract(getInteger(dt.sender, "gameState")) == 1))
26+ let player1Registration = if (if (validStep)
2627 then (extract(getInteger(dt.data, "command")) == 2)
27- else false)
28- then (extract(getInteger(dt.data, "gameState")) == 2)
2928 else false)
3029 then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player1"))))
3130 else false
32- let player2Registration = if (if (if ((extract(getInteger(dt.sender, "gameState")) == 2))
31+ let player2Registration = if (if (validStep)
3332 then (extract(getInteger(dt.data, "command")) == 3)
34- else false)
35- then (extract(getInteger(dt.data, "gameState")) == 3)
3633 else false)
3734 then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player2"))))
3835 else false
39- if (if (if (gameInitialization)
36+ let gameBegin = if (validStep)
37+ then (extract(getInteger(dt.data, "command")) == 4)
38+ else false
39+ let move1 = if (if (if (validStep)
40+ then (extract(getInteger(dt.data, "command")) == 5)
41+ else false)
42+ then (2 >= extract(getInteger(dt.data, "move")))
43+ else false)
44+ then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player1"))))
45+ else false
46+ let move2 = if (if (if (validStep)
47+ then (extract(getInteger(dt.data, "command")) == 6)
48+ else false)
49+ then (2 >= extract(getInteger(dt.data, "move")))
50+ else false)
51+ then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player2"))))
52+ else false
53+ let gameEnd = if (if ((extract(getInteger(dt.sender, "gameState")) == 6))
54+ then (extract(getInteger(dt.data, "command")) == 7)
55+ else false)
56+ then (extract(getString(dt.data, "gameState")) == "ended")
57+ else false
58+ if (if (if (if (if (if (if (gameInitialization)
4059 then true
4160 else playersRegistration)
4261 then true
4362 else player1Registration)
4463 then true
45- else player2Registration
64+ else player2Registration)
65+ then true
66+ else gameBegin)
67+ then true
68+ else move1)
69+ then true
70+ else move2)
71+ then true
72+ else gameEnd
4673 case _ =>
4774 true
4875 }
Full:
OldNewDifferences
11 {-# STDLIB_VERSION 1 #-}
22 {-# CONTENT_TYPE EXPRESSION #-}
33 match tx {
44 case dt: DataTransaction =>
55 let gameNotStarted = match getInteger(dt.sender, "gameState") {
66 case i: Int =>
77 false
88 case _ =>
99 true
1010 }
11+ let oldGameState = extract(getInteger(dt.sender, "gameState"))
12+ let newGameState = extract(getInteger(dt.data, "gameState"))
13+ let validStep = ((oldGameState + 1) == newGameState)
1114 let gameInitialization = if (if (gameNotStarted)
1215 then (extract(getInteger(dt.data, "command")) == 0)
1316 else false)
1417 then (extract(getInteger(dt.data, "gameState")) == 0)
1518 else false
16- let playersRegistration = if (if (if (if ((extract(getInteger(dt.sender, "gameState")) == 0))
19+ let playersRegistration = if (if (if (validStep)
1720 then (extract(getInteger(dt.data, "command")) == 1)
18- else false)
19- then (extract(getInteger(dt.data, "gameState")) == 1)
2021 else false)
2122 then (extract(getString(dt.data, "player1")) == "")
2223 else false)
2324 then (extract(getString(dt.data, "player2")) == "")
2425 else false
25- let player1Registration = if (if (if ((extract(getInteger(dt.sender, "gameState")) == 1))
26+ let player1Registration = if (if (validStep)
2627 then (extract(getInteger(dt.data, "command")) == 2)
27- else false)
28- then (extract(getInteger(dt.data, "gameState")) == 2)
2928 else false)
3029 then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player1"))))
3130 else false
32- let player2Registration = if (if (if ((extract(getInteger(dt.sender, "gameState")) == 2))
31+ let player2Registration = if (if (validStep)
3332 then (extract(getInteger(dt.data, "command")) == 3)
34- else false)
35- then (extract(getInteger(dt.data, "gameState")) == 3)
3633 else false)
3734 then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player2"))))
3835 else false
39- if (if (if (gameInitialization)
36+ let gameBegin = if (validStep)
37+ then (extract(getInteger(dt.data, "command")) == 4)
38+ else false
39+ let move1 = if (if (if (validStep)
40+ then (extract(getInteger(dt.data, "command")) == 5)
41+ else false)
42+ then (2 >= extract(getInteger(dt.data, "move")))
43+ else false)
44+ then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player1"))))
45+ else false
46+ let move2 = if (if (if (validStep)
47+ then (extract(getInteger(dt.data, "command")) == 6)
48+ else false)
49+ then (2 >= extract(getInteger(dt.data, "move")))
50+ else false)
51+ then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player2"))))
52+ else false
53+ let gameEnd = if (if ((extract(getInteger(dt.sender, "gameState")) == 6))
54+ then (extract(getInteger(dt.data, "command")) == 7)
55+ else false)
56+ then (extract(getString(dt.data, "gameState")) == "ended")
57+ else false
58+ if (if (if (if (if (if (if (gameInitialization)
4059 then true
4160 else playersRegistration)
4261 then true
4362 else player1Registration)
4463 then true
45- else player2Registration
64+ else player2Registration)
65+ then true
66+ else gameBegin)
67+ then true
68+ else move1)
69+ then true
70+ else move2)
71+ then true
72+ else gameEnd
4673 case _ =>
4774 true
4875 }

github/deemru/w8io/169f3d6 
31.34 ms