tx · 6MeEyf6L7yDW2cKPYbmMTSCQVfBFKvXYnLhZb58YUzh9 3MwrLGBvP5Gs1jTdj3V5nj9nEjBZQZ7WrfQ: -0.01000000 Waves 2018.12.19 11:28 [411495] smart account 3MwrLGBvP5Gs1jTdj3V5nj9nEjBZQZ7WrfQ > SELF 0.00000000 Waves
{ "type": 13, "id": "6MeEyf6L7yDW2cKPYbmMTSCQVfBFKvXYnLhZb58YUzh9", "fee": 1000000, "feeAssetId": null, "timestamp": 1545208125629, "version": 1, "sender": "3MwrLGBvP5Gs1jTdj3V5nj9nEjBZQZ7WrfQ", "senderPublicKey": "63PSrVzpS4gqmoi1G7hhCSbr2dFZGhWe8kDMLoppm662", "proofs": [ "34Vk6geSU3iZbq37b8h6gQrtpvxJxTZoGdRwZd9R2XHMcAt9TS27U63Gb8yKqduG6hdQpz7KYEe27hb3FGbRrMoe" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAACWhlaWdodEtleQIAAAAGaGVpZ2h0BAAAAAZzdGFnZTECAAAACnAyTW92ZUhhc2gEAAAABnN0YWdlMgIAAAAGcDJNb3ZlBAAAAAR3YXZlAAAAAAAF9eEABAAAAA9wbGF5ZXIxTW92ZUhhc2gJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAJtZQIAAAAKcDFNb3ZlSGFzaAQAAAAIbWF0Y2hLZXkJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAJtZQIAAAAIbWF0Y2hLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAABmRhdGFUeAUAAAAHJG1hdGNoMAQAAAAOZGF0YVR4RGF0YUlzT2sDCQEAAAAJaXNEZWZpbmVkAAAAAQkABBIAAAACCAUAAAAGZGF0YVR4AAAABGRhdGEFAAAABnN0YWdlMQQAAAAJb2xkSGVpZ2h0AwkBAAAACWlzRGVmaW5lZA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AAAIBQAAAAlwMnBheW1lbnQAAAAPc2VuZGVyUHVibGljS2V5BwcHBwUAAAAOZGF0YVR4RGF0YUlzT2sHAhwpaQ==", "chainId": 84, "height": 411495, "spentComplexity": 0 } View: original | compacted Prev: none Next: none Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 1 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let me = tx.sender | |
4 | + | let heightKey = "height" | |
5 | + | let stage1 = "p2MoveHash" | |
6 | + | let stage2 = "p2Move" | |
7 | + | let wave = 100000000 | |
8 | + | let player1MoveHash = extract(getBinary(me, "p1MoveHash")) | |
9 | + | let matchKey = extract(getBinary(me, "matchKey")) | |
10 | + | match tx { | |
11 | + | case dataTx: DataTransaction => | |
12 | + | let dataTxDataIsOk = if (isDefined(getBinary(dataTx.data, stage1))) | |
13 | + | then { | |
14 | + | let oldHeight = if (isDefined(getInteger(me, heightKey))) | |
15 | + | then extract(getInteger(me, heightKey)) | |
16 | + | else 9223372036854775807 | |
17 | + | let canWriteP2Move = if (!(isDefined(getBinary(me, stage1)))) | |
18 | + | then true | |
19 | + | else (-3 > (oldHeight - height)) | |
20 | + | let isDataSizeValid = (size(dataTx.data) == 3) | |
21 | + | let isDataTxSignatureValid = sigVerify(dataTx.bodyBytes, dataTx.proofs[0], extract(getBinary(dataTx.data, "player2Key"))) | |
22 | + | let isHeightFieldCorrect = if (if ((height == extract(getInteger(dataTx.data, heightKey)))) | |
23 | + | then true | |
24 | + | else ((height - 1) == extract(getInteger(dataTx.data, heightKey)))) | |
25 | + | then true | |
26 | + | else ((height + 1) == extract(getInteger(dataTx.data, heightKey))) | |
27 | + | if (if (if (canWriteP2Move) | |
28 | + | then isDataSizeValid | |
29 | + | else false) | |
30 | + | then isDataTxSignatureValid | |
31 | + | else false) | |
32 | + | then isHeightFieldCorrect | |
33 | + | else false | |
34 | + | } | |
35 | + | else if (isDefined(getBinary(dataTx.data, stage2))) | |
36 | + | then if (if (if (if (!(isDefined(getBinary(me, stage2)))) | |
37 | + | then (size(dataTx.data) == 2) | |
38 | + | else false) | |
39 | + | then (size(extract(getBinary(dataTx.data, stage2))) == 32) | |
40 | + | else false) | |
41 | + | then (sha256(extract(getBinary(dataTx.data, stage2))) == extract(getBinary(me, stage1))) | |
42 | + | else false) | |
43 | + | then match transactionById(extract(getBinary(dataTx.data, "payment"))) { | |
44 | + | case p2payment: TransferTransaction => | |
45 | + | if (if (if ((p2payment.amount == (1 * wave))) | |
46 | + | then (p2payment.recipient == me) | |
47 | + | else false) | |
48 | + | then (p2payment.senderPublicKey == extract(getBinary(me, "player2Key"))) | |
49 | + | else false) | |
50 | + | then sigVerify(p2payment.bodyBytes, p2payment.proofs[0], p2payment.senderPublicKey) | |
51 | + | else false | |
52 | + | case _ => | |
53 | + | false | |
54 | + | } | |
55 | + | else false | |
56 | + | else false | |
57 | + | dataTxDataIsOk | |
58 | + | case _ => | |
59 | + | false | |
60 | + | } |
github/deemru/w8io/169f3d6 30.52 ms ◑