tx · E3uPGP65BAoqzShvPr6QufJd9YQoRJMVwP3jxZ9qLwko 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv: -1.00000000 Waves 2019.02.22 07:31 [506001] smart asset 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv > SELF 0.00000000 exchange
{ "type": 15, "id": "E3uPGP65BAoqzShvPr6QufJd9YQoRJMVwP3jxZ9qLwko", "fee": 100000000, "feeAssetId": null, "timestamp": 1550809877767, "version": 1, "sender": "3N6mVEULck7uViUaDo1wi98wch9XzYNXriv", "senderPublicKey": "GMCkL2F7fYotQtrpQq5sjNm5cjpR7CSfawr9kMSKLHVs", "proofs": [ "LCsu7oiGw8rq5aTNFHgZrSVnisWcLZhvAJttECw5mqTPUGjj1P8nD8W1Qa2a4wwrXLUA7SKScfRjqQ9qiA2dSsg" ], "assetId": "CdAw5Uu1A9RT6jafc9cQSUy16naaYjzYgcVWDY8xGw8z", "script": "base64:AQQAAAAKaGVpZ2h0RGlmZgAAAAAAAAAAAwQAAAAOcHJpY2VEaWZmQ29uc3QAAAAAAAACisgEAAAAD2V4cGlyYXRpb25Ib3VycwAAAAAAAAAAGAQAAAANbWF4RXhwaXJhdGlvbgkAAGgAAAACCQAAaAAAAAIJAABoAAAAAgUAAAAPZXhwaXJhdGlvbkhvdXJzAAAAAAAAAAA8AAAAAAAAAAA8AAAAAAAAAAPoBAAAAAtzdGFydEhlaWdodAAAAAAAAAe4iwQAAAAGY3ljbGVzCQAAaQAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtzdGFydEhlaWdodAUAAAAKaGVpZ2h0RGlmZgQAAAAJcHJpY2VEaWZmCQAAaAAAAAIFAAAADnByaWNlRGlmZkNvbnN0BQAAAAZjeWNsZXMEAAAADXN0YXJ0QnV5UHJpY2UAAAAAAAD+T+gEAAAAC21pbkJ1eVByaWNlCQAAZAAAAAIFAAAADXN0YXJ0QnV5UHJpY2UFAAAACXByaWNlRGlmZgQAAAAMbWF4QnV5QW1vdW50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XQJAQAAAAV0aHJvdwAAAAAGAwUAAAADYnV5AwkAAGYAAAACCAgFAAAAAWUAAAAIYnV5T3JkZXIAAAAGYW1vdW50BQAAAAxtYXhCdXlBbW91bnQJAQAAAAV0aHJvdwAAAAADAwkAAGYAAAACCAgFAAAAAWUAAAAIYnV5T3JkZXIAAAAFcHJpY2UFAAAAC21pbkJ1eVByaWNlBgkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAWUAAAAIYnV5T3JkZXIAAAAJYXNzZXRQYWlyAAAACnByaWNlQXNzZXQJAQAAAAV0aHJvdwAAAAAGBwMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAF01hc3NUcmFuc2ZlclRyYW5zYWN0aW9uBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABNUcmFuc2ZlclRyYW5zYWN0aW9uBAAAAAF0BQAAAAckbWF0Y2gwBgYDlI+X", "chainId": 84, "height": 506001, "spentComplexity": 0 } View: original | compacted Prev: none Next: DKReoPU7wSiW9c17WrusTAtcrMb7VhUhJ11Yg4WoCjX Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 1 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let heightDiff = 3 | |
4 | + | let priceDiffConst = 166600 | |
5 | + | let expirationHours = 24 | |
6 | + | let maxExpiration = (((expirationHours * 60) * 60) * 1000) | |
7 | + | let startHeight = 505995 | |
8 | + | let cycles = ((height - startHeight) / heightDiff) | |
9 | + | let priceDiff = (priceDiffConst * cycles) | |
10 | + | let startBuyPrice = 16666600 | |
11 | + | let minBuyPrice = (startBuyPrice + priceDiff) | |
12 | + | let maxBuyAmount = 66600000000 | |
13 | + | let startSellPrice = 16666900 | |
14 | + | let minSellPrice = (startSellPrice + priceDiff) | |
15 | + | let minSellAmount = 600000000 | |
16 | + | match tx { | |
17 | + | case e: ExchangeTransaction => | |
18 | + | if (((e.sellOrder.expiration - e.sellOrder.timestamp) > maxExpiration)) | |
19 | + | then throw() | |
20 | + | else { | |
21 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
22 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
23 | + | if (sell) | |
24 | + | then if ((minSellAmount > e.sellOrder.amount)) | |
25 | + | then throw() | |
26 | + | else if (if ((minSellPrice > e.sellOrder.price)) | |
27 | + | then true | |
28 | + | else isDefined(e.sellOrder.assetPair.priceAsset)) | |
29 | + | then throw() | |
30 | + | else true | |
31 | + | else if (buy) | |
32 | + | then if ((e.buyOrder.amount > maxBuyAmount)) | |
33 | + | then throw() | |
34 | + | else if (if ((e.buyOrder.price > minBuyPrice)) | |
35 | + | then true | |
36 | + | else isDefined(e.buyOrder.assetPair.priceAsset)) | |
37 | + | then throw() | |
38 | + | else true | |
39 | + | else false | |
40 | + | } | |
41 | + | case t: MassTransferTransaction|BurnTransaction|TransferTransaction => | |
42 | + | true | |
43 | + | case _ => | |
44 | + | true | |
45 | + | } |
github/deemru/w8io/169f3d6 26.58 ms ◑