tx · B5fJ3c3LuQDmJmCDbBSusth7HCQ1B3o5bKUwvT6rFvpU 3MypDvVCAuJeZ6TpPpcmwi2FaRxFUSUkLx7: -0.01000000 Waves 2019.09.08 13:00 [666948] smart account 3MypDvVCAuJeZ6TpPpcmwi2FaRxFUSUkLx7 > SELF 0.00000000 Waves
{ "type": 13, "id": "B5fJ3c3LuQDmJmCDbBSusth7HCQ1B3o5bKUwvT6rFvpU", "fee": 1000000, "feeAssetId": null, "timestamp": 1567935472058, "version": 1, "sender": "3MypDvVCAuJeZ6TpPpcmwi2FaRxFUSUkLx7", "senderPublicKey": "Cv3xSd2ankhDcqBfBHybjYZNcDCbXHV9HtUXPD1Na9jU", "proofs": [ "2UzKDXv4WfP8i65ZigtZ69tcGwfYfKN1q6bBCUstR5DeofKcY7ojDpttwpTar38VGnSLs2ya9LBmFTQeh1gZpM38" ], "script": "base64:AgQAAAAQbWF0Y2hlclB1YmxpY0tleQEAAAAABAAAAAdkYXlTaXplCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAD6AAAAAAAAAAAPAAAAAAAAAAAPAQAAAAJZGF5TWFyZ2luCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAD6AAAAAAAAAAAPAAAAAAAAAAAHgQAAAALdHJhZGVNYXJnaW4JAABoAAAAAgkAAGgAAAACAAAAAAAAAAPoAAAAAAAAAAA8AAAAAAAAAAAKBAAAAA1kZXRlY3RvckdyYWNlCQAAaAAAAAIJAABoAAAAAgAAAAAAAAAD6AAAAAAAAAAAPAAAAAAAAAAACgQAAAAHJG1hdGNoMAUAAAACdHgDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0RhdGFUcmFuc2FjdGlvbgQAAAABZAUAAAAHJG1hdGNoMAQAAAAKZXhjaGFuZ2VUeAkBAAAAB2V4dHJhY3QAAAABBAAAAAckbWF0Y2gxCQAD6AAAAAEJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAMJAAABAAAAAgUAAAAHJG1hdG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QABkQAAAAIIBQAAAAJ0eAAAAAZwcm9vZnMAAAAAAAAAAAAHCQAAAAAAAAIICQABkQAAAAIIBQAAAAFkAAAABGRhdGEAAAAAAAAAAAEAAAADa2V5CQABLAAAAAIFAAAABnByZWZpeAIAAAAKX21heF9wcmljZQcJAAAAAAAAAggJAAGRAAAAAggFAAAAAWQAAAAEZGF0YQAAAAAAAAAAAQAAAAV2YWx1ZQgFAAAACmV4Y2hhbmdlVHgAAAAFcHJpY2UHCQAB9AAAAAMIBQAAAAJ0eAAAAAlib2R5Qnl0ZXMJAAGRAAAAAggFAAAAAnR4AAAABnByb29mcwAAAAAAAAAAAAgFAAAAAnR4AAAAD3NlbmRlclB1YmxpY0tleQZwCjk=", "chainId": 84, "height": 666948, "spentComplexity": 0 } View: original | compacted Prev: none Next: Yuhn1h5Tnz9N7pg9e5vNkFuTxzFWGhZJ4A7W9r25rEf Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 2 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let matcherPublicKey = base58'' | |
4 | + | let daySize = ((1000 * 60) * 60) | |
5 | + | let dayMargin = ((1000 * 60) * 30) | |
6 | + | let tradeMargin = ((1000 * 60) * 10) | |
7 | + | let detectorGrace = ((1000 * 60) * 10) | |
8 | + | match tx { | |
9 | + | case d: DataTransaction => | |
10 | + | let exchangeTx = extract( match transactionById(tx.proofs[0]) { | |
11 | + | case e: ExchangeTransaction => | |
12 | + | e | |
13 | + | case _ => | |
14 | + | unit | |
15 | + | }) | |
16 | + | let day = (exchangeTx.timestamp / daySize) | |
17 | + | let tradePeriodStart = (((day + 1) * daySize) - tradeMargin) | |
18 | + | let tradePeriodEnd = ((day + 1) * daySize) | |
19 | + | let prefix = ("day_" + toString(day)) | |
20 | + | let maxPrice = match getInteger(tx.sender, (prefix + "_max_price")) { | |
21 | + | case i: Int => | |
22 | + | i | |
23 | + | case _ => | |
24 | + | 0 | |
25 | + | } | |
26 | + | if (if (if (if (if (if (if ((size(d.data) == 2)) | |
27 | + | then (exchangeTx.price > maxPrice) | |
28 | + | else false) | |
29 | + | then (exchangeTx.timestamp >= tradePeriodStart) | |
30 | + | else false) | |
31 | + | then (tradePeriodEnd >= exchangeTx.timestamp) | |
32 | + | else false) | |
33 | + | then (d.data[0].key == (prefix + "_max_txid")) | |
34 | + | else false) | |
35 | + | then (d.data[0].value == toBase58String(tx.proofs[0])) | |
36 | + | else false) | |
37 | + | then (d.data[1].key == (prefix + "_max_price")) | |
38 | + | else false) | |
39 | + | then (d.data[1].value == exchangeTx.price) | |
40 | + | else false | |
41 | + | case _ => | |
42 | + | sigVerify(tx.bodyBytes, tx.proofs[0], tx.senderPublicKey) | |
43 | + | } |
github/deemru/w8io/026f985 12.46 ms ◑