tx · 8uJbY8J3NW9jaqJcjuDExWjKjc5Wfu3miCRYvxT1UyNB 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar: -1.00000000 Waves 2020.09.03 21:35 [1161567] smart asset 3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar > SELF 0.00000000 Test200
{ "type": 15, "id": "8uJbY8J3NW9jaqJcjuDExWjKjc5Wfu3miCRYvxT1UyNB", "fee": 100000000, "feeAssetId": null, "timestamp": 1599158130762, "version": 1, "sender": "3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar", "senderPublicKey": "BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS", "proofs": [ "4DD9QK1uT2Cy4aaAHdNCRarTDHPUqYGf3LwLinCbT6xQrjvmbTreGtZRxSPG5EKuC5MAMd2oTtNdyGiPCKFZPMP8" ], "assetId": "ELifKEtwTDt6TVLYYWJKNoCKuNJxzFTDcR5YC8YBWh2e", "script": "base64:AwQAAAALZEFwcEFkZHJlc3MJAQAAABFhZGRyZXNzRnJvbVN0cmluZwAAAAECAAAAIzNNeWdRYXdHMmdQam9lajh3WDJjcWt4bWc3S1hBUFA2eGFyBAAAAAdhZG1pblBLAQAAACCbvoDDAKlv8SHnGnzbjcmS7cF3EYTHum5V5rS3JwBICQQAAAADdGltCQAAaQAAAAIIBQAAAAlsYXN0QmxvY2sAAAAJdGltZXN0YW1wAAAAAAAAAAPoBAAAAAdzcG9uc29yAQAAACBBa8XAYqVvmo8A0b+Cee545P2vz+BaMZNc8EyMlYJWlQQAAAAJc3RhcnRUaW1lAAAAAABfTn4QBAAAAApzdGFydFByaWNlAAAAAAAAAYagBAAAAAxpbnRlcnZhbFRpbWUAAAAAAAAD9IAEAAAADWludGVydmFsUHJpY2UAAAAAAAABhqAEAAAABnBlcmlvZAkAAGkAAAACCQAAZQAAAAIFAAAAA3RpbQUAAAAJc3RhcnRUaW1lBQAAAAxpbnRlcnZhbFRpbWUEAAAACXBlcmlvZEVuZAkAAGQAA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AAAEJAAEsAAAAAgkAASwAAAACAgAAAB8gUHVyY2hhc2UgcHJpY2UgbXVzdCBiZSBoaWdoZXIgCQABpAAAAAEFAAAAC3ByaWNlQnV5TWluAgAAAAogV2F2ZWxldHMgBgkAAAIAAAABAgAAABggU29tZXRoaW5nIGJhZCBoYXBwZW5lZCAHF6OIwg==", "chainId": 84, "height": 1161567, "applicationStatus": "succeeded", "spentComplexity": 0 } View: original | compacted Prev: 9FxNeqpVZ98TZrDBgpqaPWiapcneicE897A5j4ZCbh7k Next: FstTk3BvfC6ZiPTZPJPFf1pm881TweTrR64xntXcQjpz Diff:
Old | New | Differences | |
---|---|---|---|
32 | 32 | else if (((e.sellOrder.expiration - e.sellOrder.timestamp) >= 6000000)) | |
33 | 33 | then throw(" The term of the order should not exceed 1 hour ") | |
34 | 34 | else true | |
35 | - | else if ((e. | |
35 | + | else if ((e.sellOrder.orderType == Buy)) | |
36 | 36 | then if ((priceBuyMin > e.sellOrder.price)) | |
37 | 37 | then throw(((" Purchase price must be higher " + toString(priceBuyMin)) + " Wavelets ")) | |
38 | 38 | else true |
Old | New | Differences | |
---|---|---|---|
1 | 1 | {-# STDLIB_VERSION 3 #-} | |
2 | 2 | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | 3 | let dAppAddress = addressFromString("3MygQawG2gPjoej8wX2cqkxmg7KXAPP6xar") | |
4 | 4 | let adminPK = base58'BUxg9XtvamV81CZCqrQzi8BxCizU41dpSqoqt5mW56XS' | |
5 | 5 | let tim = (lastBlock.timestamp / 1000) | |
6 | 6 | let sponsor = base58'5QNpGE1TbLFPcKiKcNpnShmJWx9DH2UUtGNWgf8TVDaC' | |
7 | 7 | let startTime = 1598979600 | |
8 | 8 | let startPrice = 100000 | |
9 | 9 | let intervalTime = 259200 | |
10 | 10 | let intervalPrice = 100000 | |
11 | 11 | let period = ((tim - startTime) / intervalTime) | |
12 | 12 | let periodEnd = (((period + 1) * intervalTime) + startTime) | |
13 | 13 | let priceSell = (startPrice + (intervalPrice * period)) | |
14 | 14 | let priceBuyMin = (priceSell - intervalPrice) | |
15 | 15 | let priceBuyMax = (priceSell + intervalPrice) | |
16 | 16 | match tx { | |
17 | 17 | case tx: MassTransferTransaction|BurnTransaction|SetAssetScriptTransaction|ReissueTransaction => | |
18 | 18 | (tx.sender == dAppAddress) | |
19 | 19 | case t: TransferTransaction => | |
20 | 20 | if ((t.feeAssetId != sponsor)) | |
21 | 21 | then throw("### To send, use the sponsor token AYDIK ID - 5QNpGE1TbLFPcKiKcNpnShmJWx9DH2UUtGNWgf8TVDaC ### Для отправки используйте спонсорский токен AYDIK ID - 5QNpGE1TbLFPcKiKcNpnShmJWx9DH2UUtGNWgf8TVDaC ###") | |
22 | 22 | else true | |
23 | 23 | case e: ExchangeTransaction => | |
24 | 24 | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
25 | 25 | if (admin) | |
26 | 26 | then true | |
27 | 27 | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
28 | 28 | then throw(" Only Waves accepted ") | |
29 | 29 | else if ((e.sellOrder.orderType == Sell)) | |
30 | 30 | then if ((priceSell > e.sellOrder.price)) | |
31 | 31 | then throw(((" Selling price should be higher " + toString(priceSell)) + " Wavelets ")) | |
32 | 32 | else if (((e.sellOrder.expiration - e.sellOrder.timestamp) >= 6000000)) | |
33 | 33 | then throw(" The term of the order should not exceed 1 hour ") | |
34 | 34 | else true | |
35 | - | else if ((e. | |
35 | + | else if ((e.sellOrder.orderType == Buy)) | |
36 | 36 | then if ((priceBuyMin > e.sellOrder.price)) | |
37 | 37 | then throw(((" Purchase price must be higher " + toString(priceBuyMin)) + " Wavelets ")) | |
38 | 38 | else true | |
39 | 39 | else throw(" Something bad happened ") | |
40 | 40 | case _ => | |
41 | 41 | false | |
42 | 42 | } |
github/deemru/w8io/169f3d6 37.40 ms ◑