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