tx · HqL8HBcy5qa1oM5M4H5x3Su6o821nhZgKe2Y571FMALc 3MyYhAddeGYkGVN94JvatcNLhWucNCc3C9G: -0.01000000 Waves 2018.12.18 18:58 [410486] smart account 3MyYhAddeGYkGVN94JvatcNLhWucNCc3C9G > SELF 0.00000000 Waves
{ "type": 13, "id": "HqL8HBcy5qa1oM5M4H5x3Su6o821nhZgKe2Y571FMALc", "fee": 1000000, "feeAssetId": null, "timestamp": 1545148761472, "version": 1, "sender": "3MyYhAddeGYkGVN94JvatcNLhWucNCc3C9G", "senderPublicKey": "DXgthmjeCpeGvL1XS3JVmoPchv7bddrMamyVGHHQHLTv", "proofs": [ "2y5wp9qAjWnijWjy6qWocSQjK2SzcrxEQBbQDHDLXtnJSdt1asNGt4xWSD9jSPpNpfXu9oytjwMwUcEJBWzhhyA4" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAACWhlaWdodEtleQIAAAAGaGVpZ2h0BAAAAAZzdGFnZTECAAAACnAyTW92ZUluaXQEAAAABnN0YWdlMgIAAAAKcDJNb3ZlSGFzaAQAAAAEd2F2ZQAAAAAABfXhAAQAAAAPcGxheWVyMU1vdmVIYXNoCQEAAAAHZXh0cmFjdAAAAAEJAAQcAAAAAgUAAAACbWUCAAAACnAxTW92ZUhhc2gEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAABmRhdGFUeAUAAAAHJG1hdGNoMAQAAAANZGF0YVR4RmVlSXNPawkAAAAAAAACCAUAAAAGZGF0YVR4AAAAA2ZlZQkAAGQAAAACCQAAaAAAAAIAAAAAAAAAw1AJAAGQAAAAAQgFAAAABmRhdGFUeAAAAARkYXRhAAAAAAAABhqABAAAAA5kYXRhVHhEYXRhSXNPawMJAQAAAAlpc0RlZmluZWQAAAABCQAEEgAAAAIIBQAAAAZkYXRhVHgAAAAEZGF0YQUAAAAGc3RhZ2UxBAA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AHZXh0cmFjdAAAAAEJAAQSAAAAAggFAAAABmRhdGFUeAAAAARkYXRhBQAAAAZzdGFnZTIAAAAAAAAAACAHBAAAAAckbWF0Y2gxCQAD6AAAAAEJAQAAAAdleHRyYWN0AAAAAQkABBIAAAACCAUAAAAGZGF0YVR4AAAABGRhdGECAAAAB3BheW1lbnQDCQAAAQAAAAIFAAAAByRtYXRjaDECAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAACXAycGF5bWVudAUAAAAHJG1hdGNoMQMDAwkAAAAAAAACCAUAAAAJcDJwYXltZW50AAAABmFtb3VudAkAAGgAAAACAAAAAAAAAAABBQAAAAR3YXZlCQAAAAAAAAIIBQAAAAlwMnBheW1lbnQAAAAJcmVjaXBpZW50BQAAAAJtZQcJAAAAAAAAAggFAAAACXAycGF5bWVudAAAAA9zZW5kZXJQdWJsaWNLZXkJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAJtZQIAAAAKcGxheWVyMktleQcJAAH0AAAAAwgFAAAACXAycGF5bWVudAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAACXAycGF5bWVudAAAAAZwcm9vZnMAAAAAAAAAAAAIBQAAAAlwMnBheW1lbnQAAAAPc2VuZGVyUHVibGljS2V5BwcHBwMFAAAADWRhdGFUeEZlZUlzT2sFAAAADmRhdGFUeERhdGFJc09rBwdOzn6n", "chainId": 84, "height": 410486, "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 = "p2MoveInit" | |
6 | + | let stage2 = "p2MoveHash" | |
7 | + | let wave = 100000000 | |
8 | + | let player1MoveHash = extract(getBinary(me, "p1MoveHash")) | |
9 | + | match tx { | |
10 | + | case dataTx: DataTransaction => | |
11 | + | let dataTxFeeIsOk = (dataTx.fee == ((50000 * size(dataTx.data)) + 400000)) | |
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 | + | if (if (if (if (!(isDefined(getBinary(me, stage1)))) | |
18 | + | then true | |
19 | + | else (-3 > (oldHeight - height))) | |
20 | + | then (size(dataTx.data) == 3) | |
21 | + | else false) | |
22 | + | then sigVerify(dataTx.bodyBytes, dataTx.proofs[0], extract(getBinary(dataTx.data, "player2Key"))) | |
23 | + | else false) | |
24 | + | then if (if ((height == getInteger(dataTx.data, heightKey))) | |
25 | + | then true | |
26 | + | else ((height - 1) == getInteger(dataTx.data, heightKey))) | |
27 | + | then true | |
28 | + | else ((height + 1) == getInteger(dataTx.data, heightKey)) | |
29 | + | else false | |
30 | + | } | |
31 | + | else if (isDefined(getBinary(dataTx.data, stage2))) | |
32 | + | then if (if (if (!(isDefined(getBinary(me, stage2)))) | |
33 | + | then (size(dataTx.data) == 2) | |
34 | + | else false) | |
35 | + | then (size(extract(getBinary(dataTx.data, stage2))) == 32) | |
36 | + | else false) | |
37 | + | then match transactionById(extract(getBinary(dataTx.data, "payment"))) { | |
38 | + | case p2payment: TransferTransaction => | |
39 | + | if (if (if ((p2payment.amount == (1 * wave))) | |
40 | + | then (p2payment.recipient == me) | |
41 | + | else false) | |
42 | + | then (p2payment.senderPublicKey == extract(getBinary(me, "player2Key"))) | |
43 | + | else false) | |
44 | + | then sigVerify(p2payment.bodyBytes, p2payment.proofs[0], p2payment.senderPublicKey) | |
45 | + | else false | |
46 | + | case _ => | |
47 | + | false | |
48 | + | } | |
49 | + | else false | |
50 | + | else false | |
51 | + | if (dataTxFeeIsOk) | |
52 | + | then dataTxDataIsOk | |
53 | + | else false | |
54 | + | case _ => | |
55 | + | false | |
56 | + | } |
github/deemru/w8io/169f3d6 21.27 ms ◑