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