tx · 5Hv5XwkwYmRt79KTgtsW19r6zo72R61FP5sjhT2BMXaF 3MwpUQwpSfHV1rFfHqCuuYL7A9K8ursTQWk: -0.01420000 Waves 2018.10.08 18:40 [366735] smart account 3MwpUQwpSfHV1rFfHqCuuYL7A9K8ursTQWk > SELF 0.00000000 Waves
{ "type": 13, "id": "5Hv5XwkwYmRt79KTgtsW19r6zo72R61FP5sjhT2BMXaF", "fee": 1420000, "feeAssetId": null, "timestamp": 1539013228268, "version": 1, "sender": "3MwpUQwpSfHV1rFfHqCuuYL7A9K8ursTQWk", "senderPublicKey": "5ydncg624xM6LmJKWJ26iZoy7XBdGx9JxcgqKMNhJPaz", "proofs": [ "5twdUon11YGztunXDz7Xe7AtucrEc2eUFYhfzt4PhpY2a6JKpEzzpXNrGow3XjjfQPAmitVgnPVVZQVCm2E1Kuuz" ], "script": "base64:AQQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAACZHQFAAAAByRtYXRjaDAEAAAADmdhbWVOb3RTdGFydGVkBAAAAAckbWF0Y2gxCQAEGgAAAAIIBQAAAAJkdAAAAAZzZW5kZXICAAAACWdhbWVTdGF0ZQMJAAABAAAAAgUAAAAHJG1hdGNoMQIAAAADSW50BAAAAAFpBQAAAAckbWF0Y2gxBwYEAAAADG9sZEdhbWVTdGF0ZQkBAAAAB2V4dHJhY3QAAAABCQAEGgAAAAIIBQAAAAJkdAAAAAZzZW5kZXICAAAACWdhbWVTdGF0ZQQAAAAMbmV3R2FtZVN0YXRlCQEAAAAHZXh0cmFjdAAAAAEJAAQQAAAAAggFAAAAAmR0AAAABGRhdGECAAAACWdhbWVTdGF0ZQQAAAAJdmFsaWRTdGVwCQAAAAAAAAIJAABkAAAAAgUAAAAMb2xkR2FtZVN0YXRlAAAAAAAAAAABBQAAAAxuZXdHYW1lU3RhdGUEAAAAEmdhbWVJbml0aWFsaXphdGlvbgMDBQAAAA5n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JAQAAAAdleHRyYWN0AAAAAQkABBoAAAACCAUAAAACZHQAAAAGc2VuZGVyAgAAAAlnYW1lU3RhdGUAAAAAAAAAAAYJAAAAAAAAAgkBAAAAB2V4dHJhY3QAAAABCQAEEAAAAAIIBQAAAAJkdAAAAARkYXRhAgAAAAdjb21tYW5kAAAAAAAAAAAHBwkAAAAAAAACCQEAAAAHZXh0cmFjdAAAAAEJAAQTAAAAAggFAAAAAmR0AAAABGRhdGECAAAACWdhbWVTdGF0ZQIAAAAFZW5kZWQHAwMDAwMDAwUAAAASZ2FtZUluaXRpYWxpemF0aW9uBgUAAAATcGxheWVyc1JlZ2lzdHJhdGlvbgYFAAAAE3BsYXllcjFSZWdpc3RyYXRpb24GBQAAABNwbGF5ZXIyUmVnaXN0cmF0aW9uBgUAAAAJZ2FtZUJlZ2luBgUAAAAFbW92ZTEGBQAAAAVtb3ZlMgYFAAAAB2dhbWVFbmQGC1MM3Q==", "chainId": 84, "height": 366735, "spentComplexity": 0 } View: original | compacted Prev: FBZ9LCa1AhjgobA3745VTSjFDxyHbtA8JuRye1DsWwCo Next: 81qQKoze3CsNWkaHSMk8tjhBoMjFWccJA3tHGhpVnqTk Diff:
Old | New | Differences | |
---|---|---|---|
41 | 41 | else false) | |
42 | 42 | then (2 >= extract(getInteger(dt.data, "move1"))) | |
43 | 43 | else false) | |
44 | - | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt. | |
44 | + | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.sender, "player1")))) | |
45 | 45 | else false | |
46 | 46 | let move2 = if (if (if (validStep) | |
47 | 47 | then (extract(getInteger(dt.data, "command")) == 6) | |
48 | 48 | else false) | |
49 | 49 | then (2 >= extract(getInteger(dt.data, "move2"))) | |
50 | 50 | else false) | |
51 | - | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt. | |
51 | + | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.sender, "player2")))) | |
52 | 52 | else false | |
53 | 53 | let gameEnd = if (if ((extract(getInteger(dt.sender, "gameState")) == 6)) | |
54 | 54 | then (extract(getInteger(dt.data, "command")) == 7) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | match tx { | |
4 | 4 | case dt: DataTransaction => | |
5 | 5 | let gameNotStarted = match getInteger(dt.sender, "gameState") { | |
6 | 6 | case i: Int => | |
7 | 7 | false | |
8 | 8 | case _ => | |
9 | 9 | true | |
10 | 10 | } | |
11 | 11 | let oldGameState = extract(getInteger(dt.sender, "gameState")) | |
12 | 12 | let newGameState = extract(getInteger(dt.data, "gameState")) | |
13 | 13 | let validStep = ((oldGameState + 1) == newGameState) | |
14 | 14 | let gameInitialization = if (if (gameNotStarted) | |
15 | 15 | then (extract(getInteger(dt.data, "command")) == 0) | |
16 | 16 | else false) | |
17 | 17 | then (extract(getInteger(dt.data, "gameState")) == 0) | |
18 | 18 | else false | |
19 | 19 | let playersRegistration = if (if (if (validStep) | |
20 | 20 | then (extract(getInteger(dt.data, "command")) == 1) | |
21 | 21 | else false) | |
22 | 22 | then (extract(getString(dt.data, "player1")) == "") | |
23 | 23 | else false) | |
24 | 24 | then (extract(getString(dt.data, "player2")) == "") | |
25 | 25 | else false | |
26 | 26 | let player1Registration = if (if (validStep) | |
27 | 27 | then (extract(getInteger(dt.data, "command")) == 2) | |
28 | 28 | else false) | |
29 | 29 | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player1")))) | |
30 | 30 | else false | |
31 | 31 | let player2Registration = if (if (validStep) | |
32 | 32 | then (extract(getInteger(dt.data, "command")) == 3) | |
33 | 33 | else false) | |
34 | 34 | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.data, "player2")))) | |
35 | 35 | else false | |
36 | 36 | let gameBegin = if (validStep) | |
37 | 37 | then (extract(getInteger(dt.data, "command")) == 4) | |
38 | 38 | else false | |
39 | 39 | let move1 = if (if (if (validStep) | |
40 | 40 | then (extract(getInteger(dt.data, "command")) == 5) | |
41 | 41 | else false) | |
42 | 42 | then (2 >= extract(getInteger(dt.data, "move1"))) | |
43 | 43 | else false) | |
44 | - | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt. | |
44 | + | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.sender, "player1")))) | |
45 | 45 | else false | |
46 | 46 | let move2 = if (if (if (validStep) | |
47 | 47 | then (extract(getInteger(dt.data, "command")) == 6) | |
48 | 48 | else false) | |
49 | 49 | then (2 >= extract(getInteger(dt.data, "move2"))) | |
50 | 50 | else false) | |
51 | - | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt. | |
51 | + | then sigVerify(dt.bodyBytes, dt.proofs[0], fromBase58String(extract(getString(dt.sender, "player2")))) | |
52 | 52 | else false | |
53 | 53 | let gameEnd = if (if ((extract(getInteger(dt.sender, "gameState")) == 6)) | |
54 | 54 | then (extract(getInteger(dt.data, "command")) == 7) | |
55 | 55 | else false) | |
56 | 56 | then (extract(getString(dt.data, "gameState")) == "ended") | |
57 | 57 | else false | |
58 | 58 | if (if (if (if (if (if (if (gameInitialization) | |
59 | 59 | then true | |
60 | 60 | else playersRegistration) | |
61 | 61 | then true | |
62 | 62 | else player1Registration) | |
63 | 63 | then true | |
64 | 64 | else player2Registration) | |
65 | 65 | then true | |
66 | 66 | else gameBegin) | |
67 | 67 | then true | |
68 | 68 | else move1) | |
69 | 69 | then true | |
70 | 70 | else move2) | |
71 | 71 | then true | |
72 | 72 | else gameEnd | |
73 | 73 | case _ => | |
74 | 74 | true | |
75 | 75 | } |
github/deemru/w8io/026f985 36.24 ms ◑