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