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