tx · J198HJFwNNUHi87kb527z5mrVreGWCdeGcvsvTW8BUSP 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv: -1.00000000 Waves 2019.02.19 14:44 [502031] smart asset 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv > SELF 0 test
{ "type": 15, "id": "J198HJFwNNUHi87kb527z5mrVreGWCdeGcvsvTW8BUSP", "fee": 100000000, "feeAssetId": null, "timestamp": 1550576710967, "version": 1, "sender": "3N6mVEULck7uViUaDo1wi98wch9XzYNXriv", "senderPublicKey": "GMCkL2F7fYotQtrpQq5sjNm5cjpR7CSfawr9kMSKLHVs", "proofs": [ "5xA768cRqQUtnmAPfGUKRnCdyxqibPtFkCF3Wk6WGjWe5EiZfjSscsPLKLSnhdsTp4okMjJNtK5VyJhoNuDYjkJW" ], "assetId": "9xhbLMfTA77TqF3X6DDwWe6mFhUpwCS5o7Z7gx8JFt8b", "script": "base64:AQQAAAAKaGVpZ2h0RGlmZgAAAAAAAAAGggQAAAAOcHJpY2VEaWZmQ29uc3QAAAAAAAACisgEAAAAD2V4cGlyYXRpb25Ib3VycwAAAAAAAAAAGAQAAAANbWF4RXhwaXJhdGlvbgkAAGgAAAACCQAAaAAAAAIJAABoAAAAAgUAAAAPZXhwaXJhdGlvbkhvdXJzAAAAAAAAAAA8AAAAAAAAAAA8AAAAAAAAAAPoBAAAAAtzdGFydEhlaWdodAAAAAAAAAeozwQAAAAJcHJpY2VEaWZmCQAAaQAAAAIJAABoAAAAAgUAAAAOcHJpY2VEaWZmQ29uc3QJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtzdGFydEhlaWdodAUAAAAKaGVpZ2h0RGlmZgQAAAANc3RhcnRCdXlQcmljZQAAAAAAAP5P6AQAAAALbWluQnV5UHJpY2UJAABkAAAAAgUAAAANc3RhcnRCdXlQcmljZQUAAAAJcHJpY2VEaWZmBAAAAAxtYXhCdXlBbW91bnQAAAAAAAAAApoEAAAADnN0YXJ0U2VsbFByaWNlAAAAAAAA/l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, "height": 502031, "spentComplexity": 0 } View: original | compacted Prev: none Next: FafttEBTvj7ecMoLdHbfY8qBkDika5TzucCkhxViub2x Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 1 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let heightDiff = 1666 | |
4 | + | let priceDiffConst = 166600 | |
5 | + | let expirationHours = 24 | |
6 | + | let maxExpiration = (((expirationHours * 60) * 60) * 1000) | |
7 | + | let startHeight = 501967 | |
8 | + | let priceDiff = ((priceDiffConst * (height - startHeight)) / heightDiff) | |
9 | + | let startBuyPrice = 16666600 | |
10 | + | let minBuyPrice = (startBuyPrice + priceDiff) | |
11 | + | let maxBuyAmount = 666 | |
12 | + | let startSellPrice = 16666900 | |
13 | + | let minSellPrice = (startSellPrice + priceDiff) | |
14 | + | let minSellAmount = 6 | |
15 | + | let transferFee = 6660000 | |
16 | + | let burnFee = 666000 | |
17 | + | let orderFee = 666000 | |
18 | + | match tx { | |
19 | + | case e: ExchangeTransaction => | |
20 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
21 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
22 | + | if (sell) | |
23 | + | then if (if ((minSellPrice > e.sellOrder.price)) | |
24 | + | then true | |
25 | + | else isDefined(e.sellOrder.assetPair.priceAsset)) | |
26 | + | then throw((("Sell price must be >= " + toString(minSellPrice)) + " wavelets")) | |
27 | + | else if ((minSellAmount > e.sellOrder.amount)) | |
28 | + | then throw(("Sell amount must be >= " + toString(minSellAmount))) | |
29 | + | else true | |
30 | + | else if (buy) | |
31 | + | then if (if ((minBuyPrice > e.buyOrder.price)) | |
32 | + | then true | |
33 | + | else isDefined(e.buyOrder.assetPair.priceAsset)) | |
34 | + | then throw((("Buy price must be >= " + toString(minBuyPrice)) + " wavelets")) | |
35 | + | else if ((e.buyOrder.amount >= maxBuyAmount)) | |
36 | + | then throw(("Buy amount must be < " + toString(maxBuyAmount))) | |
37 | + | else true | |
38 | + | else false | |
39 | + | case t: TransferTransaction => | |
40 | + | if (if (isDefined(t.feeAssetId)) | |
41 | + | then true | |
42 | + | else (transferFee > t.fee)) | |
43 | + | then throw((("Fee must be >= " + toString(transferFee)) + " wavelets")) | |
44 | + | else true | |
45 | + | case b: BurnTransaction => | |
46 | + | if ((burnFee > b.fee)) | |
47 | + | then throw((("Fee must be >= " + toString(burnFee)) + " wavelets")) | |
48 | + | else true | |
49 | + | case _ => | |
50 | + | true | |
51 | + | } |
github/deemru/w8io/169f3d6 22.89 ms ◑