tx · AwrbsmENbva4WCUyZYUAH6CXi7p5idnQg5avPRWVDUGn 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves 2020.05.27 16:11 [1016842] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 MOITOKEN
{ "type": 15, "id": "AwrbsmENbva4WCUyZYUAH6CXi7p5idnQg5avPRWVDUGn", "fee": 100000000, "feeAssetId": null, "timestamp": 1590585145897, "version": 1, "sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar", "senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS", "proofs": [ "4riz9MiUtj9PR9anboNXnicBazzPJ31hzoZSam6K65Bh1VNqjkEhcTX8mbjWxGijUTg7jDLQj1MKp9SV2sGStyZ4" ], "assetId": "3tqknScoCegnWpFYGvYGiUM68iWC1Fw9KPgHdYgi8ZWc", "script": "base64:AQQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAALc3RhcnRIZWlnaHQAAAAAAAAPgMAEAAAADmludGVydmFsSGVpZ2h0AAAAAAAAAAXcBAAAAA1pbnRlcnZhbFByaWNlAAAAAAAAAAPoBAAAAApzdGFydFByaWNlAAAAAAAAAAPoBAAAAARkYXlzCQAAaQAAAAIJAABlAAAAAgUAAAAGaGVpZ2h0BQAAAAtzdGFydEhlaWdodAUAAAAOaW50ZXJ2YWxIZWlnaHQEAAAAA3N1bQkAAGQAAAACBQAAAApzdGFydFByaWNlCQAAaAAAAAIFAAAADWludGVydmFsUHJpY2UFAAAABGRheXMEAAAACXNlbGxQcmljZQUAAAADc3VtBAAAAAhidXlQcmljZQkAAGUAAAACBQAAAANzdW0AAAAAAAAAA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 1016842, "spentComplexity": 0 } View: original | compacted Prev: 8CDzaLU9CxbooxYVxMdoxWaMKEXqSHzdc5fdPPSJ6qu5 Next: 43ZD4PsA1AoRi6ZTjCEnRYju4UWpUd7W6cSSMnskqsAN Diff:
Old | New | Differences | |
---|---|---|---|
8 | 8 | let startPrice = 1000 | |
9 | 9 | let days = ((height - startHeight) / intervalHeight) | |
10 | 10 | let sum = (startPrice + (intervalPrice * days)) | |
11 | - | let sellPrice = | |
12 | - | let buyPrice = ( | |
13 | - | let sellPricee = | |
14 | - | let buyPricee = | |
11 | + | let sellPrice = sum | |
12 | + | let buyPrice = (sum - 500) | |
13 | + | let sellPricee = sellPrice | |
14 | + | let buyPricee = buyPrice | |
15 | 15 | match tx { | |
16 | 16 | case tx: BurnTransaction => | |
17 | 17 | true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 1 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let dAppAddress = addressFromString("3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar") | |
4 | 4 | let adminPK = base58'BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS' | |
5 | 5 | let startHeight = 1016000 | |
6 | 6 | let intervalHeight = 1500 | |
7 | 7 | let intervalPrice = 1000 | |
8 | 8 | let startPrice = 1000 | |
9 | 9 | let days = ((height - startHeight) / intervalHeight) | |
10 | 10 | let sum = (startPrice + (intervalPrice * days)) | |
11 | - | let sellPrice = | |
12 | - | let buyPrice = ( | |
13 | - | let sellPricee = | |
14 | - | let buyPricee = | |
11 | + | let sellPrice = sum | |
12 | + | let buyPrice = (sum - 500) | |
13 | + | let sellPricee = sellPrice | |
14 | + | let buyPricee = buyPrice | |
15 | 15 | match tx { | |
16 | 16 | case tx: BurnTransaction => | |
17 | 17 | true | |
18 | 18 | case tx: ReissueTransaction => | |
19 | 19 | (tx.sender == dAppAddress) | |
20 | 20 | case tx: SetAssetScriptTransaction => | |
21 | 21 | (tx.sender == dAppAddress) | |
22 | 22 | case tx: MassTransferTransaction => | |
23 | 23 | true | |
24 | 24 | case tx: TransferTransaction => | |
25 | 25 | true | |
26 | 26 | case e: ExchangeTransaction => | |
27 | 27 | let sender = e.sellOrder.sender | |
28 | 28 | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
29 | 29 | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
30 | 30 | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
31 | 31 | if (admin) | |
32 | 32 | then true | |
33 | 33 | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
34 | 34 | then throw("Only Waves accepted") | |
35 | 35 | else if (sell) | |
36 | 36 | then if ((sellPrice >= e.sellOrder.price)) | |
37 | 37 | then throw((("-= Selling price should be higher " + toString(sellPricee)) + " Wavelets ")) | |
38 | 38 | else if (((e.sellOrder.expiration - e.sellOrder.timestamp) >= 6000000)) | |
39 | 39 | then throw("-= The term of the order should not exceed 1 hour") | |
40 | 40 | else true | |
41 | 41 | else if (buy) | |
42 | 42 | then if ((buyPrice >= e.sellOrder.price)) | |
43 | 43 | then throw((("-= Purchase price must be higher " + toString(buyPricee)) + " Wavelets ")) | |
44 | 44 | else true | |
45 | 45 | else throw("Something bad happened") | |
46 | 46 | case _ => | |
47 | 47 | false | |
48 | 48 | } |
github/deemru/w8io/169f3d6 37.32 ms ◑