tx · 7EQJYNEnbPBmQhuGd9cS6aERoAxeUbHhVj96ft9mZBTf 3NC8eLzh7s8TR3K3nER6urgjQCoqcW4awtM: -0.01000000 Waves 2018.12.18 19:37 [410524] smart account 3NC8eLzh7s8TR3K3nER6urgjQCoqcW4awtM > SELF 0.00000000 Waves
{ "type": 13, "id": "7EQJYNEnbPBmQhuGd9cS6aERoAxeUbHhVj96ft9mZBTf", "fee": 1000000, "feeAssetId": null, "timestamp": 1545151058630, "version": 1, "sender": "3NC8eLzh7s8TR3K3nER6urgjQCoqcW4awtM", "senderPublicKey": "5nVDXcJEJjLHcwxkzf8AEzkMofcE3FacjHvHHVnGvvB8", "proofs": [ "3fzL6keH1bnf2DefEpedRfmhthZKFiMmWbCuyaxcR1ioHxqkoUa8fEkLVT5iX7u86U7sGCLzS1ZYxc9op94iaxjq" ], "script": "base64:AQQAAAACbWUIBQAAAAJ0eAAAAAZzZW5kZXIEAAAACWhlaWdodEtleQIAAAAGaGVpZ2h0BAAAAAZzdGFnZTECAAAACnAyTW92ZUhhc2gEAAAABnN0YWdlMgIAAAAGcDJNb3ZlBAAAAAR3YXZlAAAAAAAF9eEABAAAAA9wbGF5ZXIxTW92ZUhhc2gJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAJtZQIAAAAKcDFNb3ZlSGFzaAQAAAAIbWF0Y2hLZXkJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAJtZQIAAAAIbWF0Y2hLZXkEAAAAByRtYXRjaDAFAAAAAnR4AwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9EYXRhVHJhbnNhY3Rpb24EAAAABmRhdGFUeAUAAAAHJG1hdGNoMAQAAAAOZGF0YVR4RGF0YUlzT2sDCQEAAAAJaXNEZWZpbmVkAAAAAQkABBIAAAACCAUAAAAGZGF0YVR4AAAABGRhdGEFAAAABnN0YWdlMQQAAAAJb2xkSGVpZ2h0AwkBAAAACWlzRGVmaW5lZAAAAAEJAAQaAAAAAgUAA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RhdGEFAAAABnN0YWdlMgAAAAAAAAAAIAcJAAAAAAAAAgkAAfcAAAABCQEAAAAHZXh0cmFjdAAAAAEJAAQSAAAAAggFAAAABmRhdGFUeAAAAARkYXRhBQAAAAZzdGFnZTIJAQAAAAdleHRyYWN0AAAAAQkABBwAAAACBQAAAAJtZQUAAAAGc3RhZ2UxBwQAAAAHJG1hdGNoMQkAA+gAAAABCQEAAAAHZXh0cmFjdAAAAAEJAAQSAAAAAggFAAAABmRhdGFUeAAAAARkYXRhAgAAAAdwYXltZW50AwkAAAEAAAACBQAAAAckbWF0Y2gxAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAlwMnBheW1lbnQFAAAAByRtYXRjaDEDAwMJAAAAAAAAAggFAAAACXAycGF5bWVudAAAAAZhbW91bnQJAABoAAAAAgAAAAAAAAAAAQUAAAAEd2F2ZQkAAAAAAAACCAUAAAAJcDJwYXltZW50AAAACXJlY2lwaWVudAUAAAACbWUHCQAAAAAAAAIIBQAAAAlwMnBheW1lbnQAAAAPc2VuZGVyUHVibGljS2V5CQEAAAAHZXh0cmFjdAAAAAEJAAQcAAAAAgUAAAACbWUCAAAACnBsYXllcjJLZXkHCQAB9AAAAAMIBQAAAAlwMnBheW1lbnQAAAAJYm9keUJ5dGVzCQABkQAAAAIIBQAAAAlwMnBheW1lbnQAAAAGcHJvb2ZzAAAAAAAAAAAACAUAAAAJcDJwYXltZW50AAAAD3NlbmRlclB1YmxpY0tleQcHBwcFAAAADmRhdGFUeERhdGFJc09rB7EoldI=", "chainId": 84, "height": 410524, "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 | + | 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 (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 (sha256(extract(getBinary(dataTx.data, stage2))) == extract(getBinary(me, stage1))) | |
38 | + | else false) | |
39 | + | then match transactionById(extract(getBinary(dataTx.data, "payment"))) { | |
40 | + | case p2payment: TransferTransaction => | |
41 | + | if (if (if ((p2payment.amount == (1 * wave))) | |
42 | + | then (p2payment.recipient == me) | |
43 | + | else false) | |
44 | + | then (p2payment.senderPublicKey == extract(getBinary(me, "player2Key"))) | |
45 | + | else false) | |
46 | + | then sigVerify(p2payment.bodyBytes, p2payment.proofs[0], p2payment.senderPublicKey) | |
47 | + | else false | |
48 | + | case _ => | |
49 | + | false | |
50 | + | } | |
51 | + | else false | |
52 | + | else false | |
53 | + | dataTxDataIsOk | |
54 | + | case _ => | |
55 | + | false | |
56 | + | } |
github/deemru/w8io/026f985 33.44 ms ◑