tx · BQQZXRLv3yUPtG3QZf6sTKQiUczFxq9zBAzwbUfRvBpj 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv: -1.00000000 Waves 2019.02.19 16:19 [502117] smart asset 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv > SELF 0.00000000 test666
{ "type": 15, "id": "BQQZXRLv3yUPtG3QZf6sTKQiUczFxq9zBAzwbUfRvBpj", "fee": 100000000, "feeAssetId": null, "timestamp": 1550582398599, "version": 1, "sender": "3N6mVEULck7uViUaDo1wi98wch9XzYNXriv", "senderPublicKey": "GMCkL2F7fYotQtrpQq5sjNm5cjpR7CSfawr9kMSKLHVs", "proofs": [ "vL8stx7oxkVDjXYRBk7DhXvWAKmiucXdy5P4jFm1xn85AWJBqn4NnZtbf1Z82KJkqGXcw4Yp3FZ2wfdREk9JCMg" ], "assetId": "5yjyBTmmUbpxnipdv8ZcS9gPn2bEXRo7fThXXruFiYXS", "script": "base64:AQQAAAAKaGVpZ2h0RGlmZgAAAAAAAAAABQQAAAAOcHJpY2VEaWZmQ29uc3QAAAAAAAACisgEAAAAD2V4cGlyYXRpb25Ib3VycwAAAAAAAAAAGAQAAAANbWF4RXhwaXJhdGlvbgkAAGgAAAACCQAAaAAAAAIJAABoAAAAAgUAAAAPZXhwaXJhdGlvbkhvdXJzAAAAAAAAAAA8AAAAAAAAAAA8AAAAAAAAAAPoBAAAAAtzdGFydEhlaWdodAAAAAAAAAepXwQAAAAGY3ljbGVzCQAAaQAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtzdGFydEhlaWdodAUAAAAKaGVpZ2h0RGlmZgQAAAAJcHJpY2VEaWZmCQAAaAAAAAIFAAAADnByaWNlRGlmZkNvbnN0BQAAAAZjeWNsZXMEAAAADXN0YXJ0QnV5UHJpY2UAAAAAAAD+T+gEAAAAC21pbkJ1eVByaWNlCQAAZAAAAAIFAAAADXN0YXJ0QnV5UHJpY2UFAAAACXByaWNlRGlmZgQAAAAMbWF4QnV5QW1vdW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hbnNhY3Rpb24EAAAAAXQFAAAAByRtYXRjaDADAwkBAAAACWlzRGVmaW5lZAAAAAEIBQAAAAF0AAAACmZlZUFzc2V0SWQGCQAAZgAAAAIFAAAAC3RyYW5zZmVyRmVlCAUAAAABdAAAAANmZWUJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAAD0ZlZSBtdXN0IGJlID49IAkAAaQAAAABBQAAAAt0cmFuc2ZlckZlZQIAAAAJIHdhdmVsZXRzBgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBAAAAAFiBQAAAAckbWF0Y2gwAwkAAGYAAAACBQAAAAdidXJuRmVlCAUAAAABYgAAAANmZWUJAAACAAAAAQkAASwAAAACCQABLAAAAAICAAAAD0ZlZSBtdXN0IGJlID49IAkAAaQAAAABBQAAAAdidXJuRmVlAgAAAAkgd2F2ZWxldHMGBjaHccQ=", "chainId": 84, "height": 502117, "spentComplexity": 0 } View: original | compacted Prev: FjRWvWdwpqxFP8btMCgGvwJweb9kMErWcxGC4ZS6enB6 Next: C6JDiXjxJZFPfyNvzT58eDGdP6sQYRTU3aoHNDJE4QUv Diff:
Old | New | Differences | |
---|---|---|---|
14 | 14 | let minSellPrice = (startSellPrice + priceDiff) | |
15 | 15 | let minSellAmount = 600000000 | |
16 | 16 | let expirationError = "Expiration must be <= 24 hours" | |
17 | - | let buyAmountError = ("Buy amount must be < " + toString((maxBuyAmount / 100000000))) | |
18 | - | let buyPriceError = (("Buy price must be | |
17 | + | let buyAmountError = ("Buy amount must be <= " + toString((maxBuyAmount / 100000000))) | |
18 | + | let buyPriceError = (("Buy price must be <= " + toString(minBuyPrice)) + " wavelets") | |
19 | 19 | let sellAmountError = ("Sell amount must be >= " + toString((minSellAmount / 100000000))) | |
20 | 20 | let sellPriceError = (("Sell price must be >= " + toString(minSellPrice)) + " wavelets") | |
21 | 21 | let transferFee = 6660000 | |
36 | 36 | then throw(sellPriceError) | |
37 | 37 | else true | |
38 | 38 | else if (buy) | |
39 | - | then if ((e.buyOrder.amount > | |
39 | + | then if ((e.buyOrder.amount > maxBuyAmount)) | |
40 | 40 | then throw(buyAmountError) | |
41 | 41 | else if (if ((e.buyOrder.price > minBuyPrice)) | |
42 | 42 | then true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let heightDiff = 5 | |
4 | 4 | let priceDiffConst = 166600 | |
5 | 5 | let expirationHours = 24 | |
6 | 6 | let maxExpiration = (((expirationHours * 60) * 60) * 1000) | |
7 | 7 | let startHeight = 502111 | |
8 | 8 | let cycles = ((height - startHeight) / heightDiff) | |
9 | 9 | let priceDiff = (priceDiffConst * cycles) | |
10 | 10 | let startBuyPrice = 16666600 | |
11 | 11 | let minBuyPrice = (startBuyPrice + priceDiff) | |
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 | - | let buyAmountError = ("Buy amount must be < " + toString((maxBuyAmount / 100000000))) | |
18 | - | let buyPriceError = (("Buy price must be | |
17 | + | let buyAmountError = ("Buy amount must be <= " + toString((maxBuyAmount / 100000000))) | |
18 | + | let buyPriceError = (("Buy price must be <= " + toString(minBuyPrice)) + " wavelets") | |
19 | 19 | let sellAmountError = ("Sell amount must be >= " + toString((minSellAmount / 100000000))) | |
20 | 20 | let sellPriceError = (("Sell price must be >= " + toString(minSellPrice)) + " wavelets") | |
21 | 21 | let transferFee = 6660000 | |
22 | 22 | let burnFee = 666000 | |
23 | 23 | match tx { | |
24 | 24 | case e: ExchangeTransaction => | |
25 | 25 | if (((e.sellOrder.expiration - e.sellOrder.timestamp) > maxExpiration)) | |
26 | 26 | then throw(expirationError) | |
27 | 27 | else { | |
28 | 28 | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
29 | 29 | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
30 | 30 | if (sell) | |
31 | 31 | then if ((minSellAmount > e.sellOrder.amount)) | |
32 | 32 | then throw(sellAmountError) | |
33 | 33 | else if (if ((minSellPrice > e.sellOrder.price)) | |
34 | 34 | then true | |
35 | 35 | else isDefined(e.sellOrder.assetPair.priceAsset)) | |
36 | 36 | then throw(sellPriceError) | |
37 | 37 | else true | |
38 | 38 | else if (buy) | |
39 | - | then if ((e.buyOrder.amount > | |
39 | + | then if ((e.buyOrder.amount > maxBuyAmount)) | |
40 | 40 | then throw(buyAmountError) | |
41 | 41 | else if (if ((e.buyOrder.price > minBuyPrice)) | |
42 | 42 | then true | |
43 | 43 | else isDefined(e.buyOrder.assetPair.priceAsset)) | |
44 | 44 | then throw(buyPriceError) | |
45 | 45 | else true | |
46 | 46 | else false | |
47 | 47 | } | |
48 | 48 | case t: TransferTransaction => | |
49 | 49 | if (if (isDefined(t.feeAssetId)) | |
50 | 50 | then true | |
51 | 51 | else (transferFee > t.fee)) | |
52 | 52 | then throw((("Fee must be >= " + toString(transferFee)) + " wavelets")) | |
53 | 53 | else true | |
54 | 54 | case b: BurnTransaction => | |
55 | 55 | if ((burnFee > b.fee)) | |
56 | 56 | then throw((("Fee must be >= " + toString(burnFee)) + " wavelets")) | |
57 | 57 | else true | |
58 | 58 | case _ => | |
59 | 59 | true | |
60 | 60 | } |
github/deemru/w8io/026f985 22.09 ms ◑