tx · dQoW4pmmDMtzXKPn2WorQbBeLp3isnr3XC7RrcvSMwH 3PDv1QR6XnyKQemtTvpsihoeqUqBX2Pc7Zp: -1.00000000 Waves 2019.05.08 18:44 [1517506] smart asset 3PDv1QR6XnyKQemtTvpsihoeqUqBX2Pc7Zp > SELF 0.00000000 Alogic spam
{ "type": 15, "id": "dQoW4pmmDMtzXKPn2WorQbBeLp3isnr3XC7RrcvSMwH", "fee": 100000000, "feeAssetId": null, "timestamp": 1557330308832, "version": 1, "sender": "3PDv1QR6XnyKQemtTvpsihoeqUqBX2Pc7Zp", "senderPublicKey": "7batsx3pe6hQW9rjFtEcKQnTsNQhNYcGCbuw56b4B5oM", "proofs": [ "MyAkasyFTPS4qWhF1bEQFfD7YayNQaox5TF7kcXfrrZDMpvcj3QiX36nytn9b39cxNhZAqYrdBiQKqXgpCutqqE" ], "assetId": "6DDxq2jum9d7CNNwuh15NLGTci4TzgXPU3QfMBvJmQHR", "script": "base64:AgQAAAAKaGVpZ2h0RGlmZgAAAAAAAAAEjgQAAAAPZXhwaXJhdGlvbkhvdXJzAAAAAAAAAAAYBAAAAA1tYXhFeHBpcmF0aW9uCQAAaAAAAAIJAABoAAAAAgkAAGgAAAACBQAAAA9leHBpcmF0aW9uSG91cnMAAAAAAAAAADwAAAAAAAAAADwAAAAAAAAAA+gEAAAAC3N0YXJ0SGVpZ2h0AAAAAAAAFye8BAAAAAZjeWNsZXMJAABpAAAAAgkAAGUAAAACBQAAAAZoZWlnaHQFAAAAC3N0YXJ0SGVpZ2h0BQAAAApoZWlnaHREaWZmBAAAAA5wcmljZURpZmZDb25zdAkAAGgAAAACAAAAAAAAAA0FBQAAAAZjeWNsZXMEAAAACXByaWNlRGlmZgkAAGgAAAACBQAAAA5wcmljZURpZmZDb25zdAUAAAAGY3ljbGVzBAAAAA1zdGFydEJ1eVByaWNlAAAAAAAAAEo4BAAAAAttaW5CdXlQcmljZQkAAGQAAAACBQAAAA1zdGFydEJ1eVByaWNlBQAAAAlw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gIBQAAAAFlAAAACXNlbGxPcmRlcgAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAA2J1eQkAAfQAAAADCAgFAAAAAWUAAAAIYnV5T3JkZXIAAAAJYm9keUJ5dGVzCQABkQAAAAIICAUAAAABZQAAAAhidXlPcmRlcgAAAAZwcm9vZnMAAAAAAAAAAAAICAUAAAABZQAAAAhidXlPcmRlcgAAAA9zZW5kZXJQdWJsaWNLZXkDAwUAAAAEc2VsbAUAAAADYnV5BwYDBQAAAARzZWxsAwMJAABmAAAAAgUAAAAMbWluU2VsbFByaWNlCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABXByaWNlBgkBAAAACWlzRGVmaW5lZAAAAAEICAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAACWFzc2V0UGFpcgAAAApwcmljZUFzc2V0CQAAAgAAAAEFAAAADnNlbGxQcmljZUVycm9yBgMFAAAAA2J1eQMDCQAAZgAAAAIICAUAAAABZQAAAAhidXlPcmRlcgAAAAVwcmljZQUAAAALbWluQnV5UHJpY2UGCQEAAAAJaXNEZWZpbmVkAAAAAQgICAUAAAABZQAAAAhidXlPcmRlcgAAAAlhc3NldFBhaXIAAAAKcHJpY2VBc3NldAkAAAIAAAABBQAAAA1idXlQcmljZUVycm9yBgcDAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgYDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAD0J1cm5UcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATVHJhbnNmZXJUcmFuc2FjdGlvbgYG3LO80g==", "chainId": 87, "height": 1517506, "spentComplexity": 0 } View: original | compacted Prev: 2rchnvsSwRmZ7y5BLsn4kNUuYnRERbaq1UAVgUthvDuQ Next: none Diff:
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 2 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let heightDiff = 1166 | |
4 | - | let priceDiffConst = 12341234 | |
5 | 4 | let expirationHours = 24 | |
6 | 5 | let maxExpiration = (((expirationHours * 60) * 60) * 1000) | |
7 | - | let startHeight = | |
6 | + | let startHeight = 1517500 | |
8 | 7 | let cycles = ((height - startHeight) / heightDiff) | |
8 | + | let priceDiffConst = (3333 * cycles) | |
9 | 9 | let priceDiff = (priceDiffConst * cycles) | |
10 | - | let startBuyPrice = | |
10 | + | let startBuyPrice = 19000 | |
11 | 11 | let minBuyPrice = (startBuyPrice + priceDiff) | |
12 | - | let startSellPrice = | |
12 | + | let startSellPrice = 19000 | |
13 | 13 | let minSellPrice = (startSellPrice + priceDiff) | |
14 | 14 | let expirationError = "Order life must be <= 24 hours" | |
15 | 15 | let buyPriceError = (((("Buy price must be <= " + toString(minBuyPrice)) + " wavelets in Cycle # ") + toString(cycles)) + ". Wait next Cycle") | |
16 | 16 | let sellPriceError = (((("Sell price must be >= " + toString(minSellPrice)) + " wavelets in Cycle # ") + toString(cycles)) + ". Wait next Cycle") | |
17 | 17 | match tx { | |
18 | 18 | case e: ExchangeTransaction => | |
19 | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
20 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
21 | - | if (if (sell) | |
22 | - | then buy | |
23 | - | else false) | |
24 | - | then true | |
25 | - | else if (sell) | |
26 | - | then if (((e.sellOrder.expiration - e.sellOrder.timestamp) > maxExpiration)) | |
27 | - | then throw(expirationError) | |
28 | - | else if (if ((minSellPrice > e.sellOrder.price)) | |
29 | - | then true | |
30 | - | else isDefined(e.sellOrder.assetPair.priceAsset)) | |
31 | - | then throw(sellPriceError) | |
32 | - | else true | |
33 | - | else if (buy) | |
34 | - | then if (if ((e.buyOrder.price > minBuyPrice)) | |
35 | - | then true | |
36 | - | else isDefined(e.buyOrder.assetPair.priceAsset)) | |
37 | - | then throw(buyPriceError) | |
38 | - | else true | |
39 | - | else false | |
19 | + | if (((e.sellOrder.expiration - e.sellOrder.timestamp) > maxExpiration)) | |
20 | + | then throw(expirationError) | |
21 | + | else { | |
22 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
23 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
24 | + | if (if (sell) | |
25 | + | then buy | |
26 | + | else false) | |
27 | + | then true | |
28 | + | else if (sell) | |
29 | + | then if (if ((minSellPrice > e.sellOrder.price)) | |
30 | + | then true | |
31 | + | else isDefined(e.sellOrder.assetPair.priceAsset)) | |
32 | + | then throw(sellPriceError) | |
33 | + | else true | |
34 | + | else if (buy) | |
35 | + | then if (if ((e.buyOrder.price > minBuyPrice)) | |
36 | + | then true | |
37 | + | else isDefined(e.buyOrder.assetPair.priceAsset)) | |
38 | + | then throw(buyPriceError) | |
39 | + | else true | |
40 | + | else false | |
41 | + | } | |
40 | 42 | case _: MassTransferTransaction|BurnTransaction|TransferTransaction => | |
41 | 43 | true | |
42 | 44 | case _ => |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 2 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let heightDiff = 1166 | |
4 | - | let priceDiffConst = 12341234 | |
5 | 4 | let expirationHours = 24 | |
6 | 5 | let maxExpiration = (((expirationHours * 60) * 60) * 1000) | |
7 | - | let startHeight = | |
6 | + | let startHeight = 1517500 | |
8 | 7 | let cycles = ((height - startHeight) / heightDiff) | |
8 | + | let priceDiffConst = (3333 * cycles) | |
9 | 9 | let priceDiff = (priceDiffConst * cycles) | |
10 | - | let startBuyPrice = | |
10 | + | let startBuyPrice = 19000 | |
11 | 11 | let minBuyPrice = (startBuyPrice + priceDiff) | |
12 | - | let startSellPrice = | |
12 | + | let startSellPrice = 19000 | |
13 | 13 | let minSellPrice = (startSellPrice + priceDiff) | |
14 | 14 | let expirationError = "Order life must be <= 24 hours" | |
15 | 15 | let buyPriceError = (((("Buy price must be <= " + toString(minBuyPrice)) + " wavelets in Cycle # ") + toString(cycles)) + ". Wait next Cycle") | |
16 | 16 | let sellPriceError = (((("Sell price must be >= " + toString(minSellPrice)) + " wavelets in Cycle # ") + toString(cycles)) + ". Wait next Cycle") | |
17 | 17 | match tx { | |
18 | 18 | case e: ExchangeTransaction => | |
19 | - | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
20 | - | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
21 | - | if (if (sell) | |
22 | - | then buy | |
23 | - | else false) | |
24 | - | then true | |
25 | - | else if (sell) | |
26 | - | then if (((e.sellOrder.expiration - e.sellOrder.timestamp) > maxExpiration)) | |
27 | - | then throw(expirationError) | |
28 | - | else if (if ((minSellPrice > e.sellOrder.price)) | |
29 | - | then true | |
30 | - | else isDefined(e.sellOrder.assetPair.priceAsset)) | |
31 | - | then throw(sellPriceError) | |
32 | - | else true | |
33 | - | else if (buy) | |
34 | - | then if (if ((e.buyOrder.price > minBuyPrice)) | |
35 | - | then true | |
36 | - | else isDefined(e.buyOrder.assetPair.priceAsset)) | |
37 | - | then throw(buyPriceError) | |
38 | - | else true | |
39 | - | else false | |
19 | + | if (((e.sellOrder.expiration - e.sellOrder.timestamp) > maxExpiration)) | |
20 | + | then throw(expirationError) | |
21 | + | else { | |
22 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
23 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
24 | + | if (if (sell) | |
25 | + | then buy | |
26 | + | else false) | |
27 | + | then true | |
28 | + | else if (sell) | |
29 | + | then if (if ((minSellPrice > e.sellOrder.price)) | |
30 | + | then true | |
31 | + | else isDefined(e.sellOrder.assetPair.priceAsset)) | |
32 | + | then throw(sellPriceError) | |
33 | + | else true | |
34 | + | else if (buy) | |
35 | + | then if (if ((e.buyOrder.price > minBuyPrice)) | |
36 | + | then true | |
37 | + | else isDefined(e.buyOrder.assetPair.priceAsset)) | |
38 | + | then throw(buyPriceError) | |
39 | + | else true | |
40 | + | else false | |
41 | + | } | |
40 | 42 | case _: MassTransferTransaction|BurnTransaction|TransferTransaction => | |
41 | 43 | true | |
42 | 44 | case _ => | |
43 | 45 | true | |
44 | 46 | } |
github/deemru/w8io/6500d08 292.13 ms ◑