tx · 3Nm2MSc34g58wPQB46Q1KUJtwzW8X3qcDtWghXHDL8i9
3N6mVEULck7uViUaDo1wi98wch9XzYNXriv: -1.00000000 Waves
2019.02.19 14:53 [502041] smart asset 3N6mVEULck7uViUaDo1wi98wch9XzYNXriv > SELF 0 test
{
"type": 15,
"id": "3Nm2MSc34g58wPQB46Q1KUJtwzW8X3qcDtWghXHDL8i9",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1550577209266,
"version": 1,
"sender": "3N6mVEULck7uViUaDo1wi98wch9XzYNXriv",
"senderPublicKey": "GMCkL2F7fYotQtrpQq5sjNm5cjpR7CSfawr9kMSKLHVs",
"proofs": [
"25HGB5zgdEPRg6rDPUSUSCjeH9RVVmPKxhgkx4bjfFAV7EZqtENwYUehQP8vuwAncrAuviNgv1FgV1ZvDZgyiJXF"
],
"assetId": "9xhbLMfTA77TqF3X6DDwWe6mFhUpwCS5o7Z7gx8JFt8b",
"script": "base64:AQQAAAAKaGVpZ2h0RGlmZgAAAAAAAAAGggQAAAAOcHJpY2VEaWZmQ29uc3QAAAAAAAACisgEAAAAD2V4cGlyYXRpb25Ib3VycwAAAAAAAAAAGAQAAAANbWF4RXhwaXJhdGlvbgkAAGgAAAACCQAAaAAAAAIJAABoAAAAAgUAAAAPZXhwaXJhdGlvbkhvdXJzAAAAAAAAAAA8AAAAAAAAAAA8AAAAAAAAAAPoBAAAAAtzdGFydEhlaWdodAAAAAAAAAepFwQAAAAJcHJpY2VEaWZmCQAAaAAAAAIFAAAADnByaWNlRGlmZkNvbnN0CQAAaQAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtzdGFydEhlaWdodAUAAAAKaGVpZ2h0RGlmZgQAAAANc3RhcnRCdXlQcmljZQAAAAAAAP5P6AQAAAALbWluQnV5UHJpY2UJAABkAAAAAgUAAAANc3RhcnRCdXlQcmljZQUAAAAJcHJpY2VEaWZmBAAAAAxtYXhCdXlBbW91bnQAAAAAAAAAApoEAAAADnN0YXJ0U2V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QIAAAAJIHdhdmVsZXRzBgYd42R2",
"chainId": 84,
"height": 502041,
"spentComplexity": 0
}
View: original | compacted
Prev: FafttEBTvj7ecMoLdHbfY8qBkDika5TzucCkhxViub2x
Next: none
Diff:
Old | New | | Differences |
---|
4 | 4 | | let priceDiffConst = 166600 |
---|
5 | 5 | | let expirationHours = 24 |
---|
6 | 6 | | let maxExpiration = (((expirationHours * 60) * 60) * 1000) |
---|
7 | | - | let startHeight = 501967 |
---|
8 | | - | let priceDiff = ((priceDiffConst * (height - startHeight)) / heightDiff) |
---|
| 7 | + | let startHeight = 502039 |
---|
| 8 | + | let priceDiff = (priceDiffConst * ((height - startHeight) / heightDiff)) |
---|
9 | 9 | | let startBuyPrice = 16666600 |
---|
10 | 10 | | let minBuyPrice = (startBuyPrice + priceDiff) |
---|
11 | 11 | | let maxBuyAmount = 666 |
---|
|
25 | 25 | | else isDefined(e.sellOrder.assetPair.priceAsset)) |
---|
26 | 26 | | then throw((("Sell price must be >= " + toString(minSellPrice)) + " wavelets")) |
---|
27 | 27 | | else if ((minSellAmount > e.sellOrder.amount)) |
---|
28 | | - | then throw(("Sell amount must be >= " + toString(minSellPrice))) |
---|
| 28 | + | then throw(("Sell amount must be >= " + toString(e.sellOrder.price))) |
---|
29 | 29 | | else true |
---|
30 | 30 | | else if (buy) |
---|
31 | 31 | | then if (if ((minBuyPrice > e.buyOrder.price)) |
---|
Full:
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 | | - | let startHeight = 501967 |
---|
8 | | - | let priceDiff = ((priceDiffConst * (height - startHeight)) / heightDiff) |
---|
| 7 | + | let startHeight = 502039 |
---|
| 8 | + | let priceDiff = (priceDiffConst * ((height - startHeight) / heightDiff)) |
---|
9 | 9 | | let startBuyPrice = 16666600 |
---|
10 | 10 | | let minBuyPrice = (startBuyPrice + priceDiff) |
---|
11 | 11 | | let maxBuyAmount = 666 |
---|
12 | 12 | | let startSellPrice = 16666900 |
---|
13 | 13 | | let minSellPrice = (startSellPrice + priceDiff) |
---|
14 | 14 | | let minSellAmount = 6 |
---|
15 | 15 | | let transferFee = 6660000 |
---|
16 | 16 | | let burnFee = 666000 |
---|
17 | 17 | | let orderFee = 666000 |
---|
18 | 18 | | match tx { |
---|
19 | 19 | | case e: ExchangeTransaction => |
---|
20 | 20 | | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) |
---|
21 | 21 | | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) |
---|
22 | 22 | | if (sell) |
---|
23 | 23 | | then if (if ((minSellPrice > e.sellOrder.price)) |
---|
24 | 24 | | then true |
---|
25 | 25 | | else isDefined(e.sellOrder.assetPair.priceAsset)) |
---|
26 | 26 | | then throw((("Sell price must be >= " + toString(minSellPrice)) + " wavelets")) |
---|
27 | 27 | | else if ((minSellAmount > e.sellOrder.amount)) |
---|
28 | | - | then throw(("Sell amount must be >= " + toString(minSellPrice))) |
---|
| 28 | + | then throw(("Sell amount must be >= " + toString(e.sellOrder.price))) |
---|
29 | 29 | | else true |
---|
30 | 30 | | else if (buy) |
---|
31 | 31 | | then if (if ((minBuyPrice > e.buyOrder.price)) |
---|
32 | 32 | | then true |
---|
33 | 33 | | else isDefined(e.buyOrder.assetPair.priceAsset)) |
---|
34 | 34 | | then throw((("Buy price must be >= " + toString(minBuyPrice)) + " wavelets")) |
---|
35 | 35 | | else if ((e.buyOrder.amount >= maxBuyAmount)) |
---|
36 | 36 | | then throw(("Buy amount must be < " + toString(maxBuyAmount))) |
---|
37 | 37 | | else true |
---|
38 | 38 | | else false |
---|
39 | 39 | | case t: TransferTransaction => |
---|
40 | 40 | | if (if (isDefined(t.feeAssetId)) |
---|
41 | 41 | | then true |
---|
42 | 42 | | else (transferFee > t.fee)) |
---|
43 | 43 | | then throw((("Fee must be >= " + toString(transferFee)) + " wavelets")) |
---|
44 | 44 | | else true |
---|
45 | 45 | | case b: BurnTransaction => |
---|
46 | 46 | | if ((burnFee > b.fee)) |
---|
47 | 47 | | then throw((("Fee must be >= " + toString(burnFee)) + " wavelets")) |
---|
48 | 48 | | else true |
---|
49 | 49 | | case _ => |
---|
50 | 50 | | true |
---|
51 | 51 | | } |
---|