tx · 5B2wxWqD8QipG1NwR7BD4JXrdE4xLSXgFcEjR9AF4JQM 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv: -1.00000000 Waves 2019.02.22 07:41 [506009] smart asset 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv > SELF 0.00000000 exchange
{ "type": 15, "id": "5B2wxWqD8QipG1NwR7BD4JXrdE4xLSXgFcEjR9AF4JQM", "fee": 100000000, "feeAssetId": null, "timestamp": 1550810496750, "version": 1, "sender": "3N6mVEULck7uViUaDo1wi98wch9XzYNXriv", "senderPublicKey": "GMCkL2F7fYotQtrpQq5sjNm5cjpR7CSfawr9kMSKLHVs", "proofs": [ "3SLonHkrbpFAcwKo1DxyWAHw2aeZEvuWrNkycH7UBCXyhBvukC4ibpJFsBgY5CktXYfyNAcAPUc1EMzY2XL8ngCp" ], "assetId": "CdAw5Uu1A9RT6jafc9cQSUy16naaYjzYgcVWDY8xGw8z", "script": "base64:AQQAAAAKaGVpZ2h0RGlmZgAAAAAAAAAAAwQAAAAOcHJpY2VEaWZmQ29uc3QAAAAAAAACisgEAAAAD2V4cGlyYXRpb25Ib3VycwAAAAAAAAAAGAQAAAANbWF4RXhwaXJhdGlvbgkAAGgAAAACCQAAaAAAAAIJAABoAAAAAgUAAAAPZXhwaXJhdGlvbkhvdXJzAAAAAAAAAAA8AAAAAAAAAAA8AAAAAAAAAAPoBAAAAAtzdGFydEhlaWdodAAAAAAAAAe4iwQAAAAGY3ljbGVzCQAAaQAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtzdGFydEhlaWdodAUAAAAKaGVpZ2h0RGlmZgQAAAAJcHJpY2VEaWZmCQAAaAAAAAIFAAAADnByaWNlRGlmZkNvbnN0BQAAAAZjeWNsZXMEAAAADXN0YXJ0QnV5UHJpY2UAAAAAAAD+URQEAAAAC21pbkJ1eVByaWNlBQAAAA1zdGFydEJ1eVByaWNlBAAAAAxtYXhCdXlBbW91bnQAAAAAD4GrWgAEAAAADnN0YXJ0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AAAQUAAAANYnV5UHJpY2VFcnJvcgYHAwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXTWFzc1RyYW5zZmVyVHJhbnNhY3Rpb24GAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24GCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAE1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDAGBlCTxXI=", "chainId": 84, "height": 506009, "spentComplexity": 0 } View: original | compacted Prev: BXvF1Lfc9erY3zvY151dQ5xCRZTetQaMrQZwXckNVKqM Next: HVqcWcF5JzypzU56WBu6ZmW9AkjAToe3gfjve1PK5iTz Diff:
Old | New | Differences | |
---|---|---|---|
7 | 7 | let startHeight = 505995 | |
8 | 8 | let cycles = ((height - startHeight) / heightDiff) | |
9 | 9 | let priceDiff = (priceDiffConst * cycles) | |
10 | - | let startBuyPrice = | |
11 | - | let minBuyPrice = | |
10 | + | let startBuyPrice = 16666900 | |
11 | + | let minBuyPrice = startBuyPrice | |
12 | 12 | let maxBuyAmount = 66600000000 | |
13 | 13 | let startSellPrice = 16666900 | |
14 | 14 | let minSellPrice = (startSellPrice + priceDiff) |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let heightDiff = 3 | |
4 | 4 | let priceDiffConst = 166600 | |
5 | 5 | let expirationHours = 24 | |
6 | 6 | let maxExpiration = (((expirationHours * 60) * 60) * 1000) | |
7 | 7 | let startHeight = 505995 | |
8 | 8 | let cycles = ((height - startHeight) / heightDiff) | |
9 | 9 | let priceDiff = (priceDiffConst * cycles) | |
10 | - | let startBuyPrice = | |
11 | - | let minBuyPrice = | |
10 | + | let startBuyPrice = 16666900 | |
11 | + | let minBuyPrice = startBuyPrice | |
12 | 12 | let maxBuyAmount = 66600000000 | |
13 | 13 | let startSellPrice = 16666900 | |
14 | 14 | let minSellPrice = (startSellPrice + priceDiff) | |
15 | 15 | let minSellAmount = 600000000 | |
16 | 16 | let expirationError = "Expiration must be <= 24 hours" | |
17 | 17 | let buyAmountError = ("Buy amount must be <= " + toString((maxBuyAmount / 100000000))) | |
18 | 18 | let buyPriceError = (((("Buy price must be <= " + toString(minBuyPrice)) + " wavelets (cycles: ") + toString(cycles)) + ")") | |
19 | 19 | let sellAmountError = ("Sell amount must be >= " + toString((minSellAmount / 100000000))) | |
20 | 20 | let sellPriceError = (((("Sell price must be >= " + toString(minSellPrice)) + " wavelets (cycles: ") + toString(cycles)) + ")") | |
21 | 21 | match tx { | |
22 | 22 | case e: ExchangeTransaction => | |
23 | 23 | if (((e.sellOrder.expiration - e.sellOrder.timestamp) > maxExpiration)) | |
24 | 24 | then throw(expirationError) | |
25 | 25 | else { | |
26 | 26 | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
27 | 27 | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
28 | 28 | if (sell) | |
29 | 29 | then if ((minSellAmount > e.sellOrder.amount)) | |
30 | 30 | then throw(sellAmountError) | |
31 | 31 | else if (if ((minSellPrice > e.sellOrder.price)) | |
32 | 32 | then true | |
33 | 33 | else isDefined(e.sellOrder.assetPair.priceAsset)) | |
34 | 34 | then throw(sellPriceError) | |
35 | 35 | else true | |
36 | 36 | else if (buy) | |
37 | 37 | then if ((e.buyOrder.amount > maxBuyAmount)) | |
38 | 38 | then throw(buyAmountError) | |
39 | 39 | else if (if ((e.buyOrder.price > minBuyPrice)) | |
40 | 40 | then true | |
41 | 41 | else isDefined(e.buyOrder.assetPair.priceAsset)) | |
42 | 42 | then throw(buyPriceError) | |
43 | 43 | else true | |
44 | 44 | else false | |
45 | 45 | } | |
46 | 46 | case t: MassTransferTransaction|BurnTransaction|TransferTransaction => | |
47 | 47 | true | |
48 | 48 | case _ => | |
49 | 49 | true | |
50 | 50 | } |
github/deemru/w8io/169f3d6 37.73 ms ◑