tx · DxjxU99VPDmqio4dHwMDmMFFdPwAFGDYwRQB6BJRnKWT 3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF: -1.00000000 Waves 2020.04.22 22:51 [966167] smart asset 3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF > SELF 0 CloMin2
{ "type": 15, "id": "DxjxU99VPDmqio4dHwMDmMFFdPwAFGDYwRQB6BJRnKWT", "fee": 100000000, "feeAssetId": null, "timestamp": 1587585062443, "version": 1, "sender": "3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF", "senderPublicKey": "B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk", "proofs": [ "3kjSqwvEEfF9qQfbP1Pa7pcRRSiE2kU4r3eevVJJN1TsgLJ5na9uZTq171m8ghjubih1AMFwhzHDC7Nw9dqYLg61" ], "assetId": "Wpf5EV46o2sDR46NYsncUq2169R7PYo9QnARj5XSwX9", "script": "base64:AgQAAAAHYWRtaW5QSwEAAAAglsSJz6KFUcFtfApcMGPSTcbUtji15ZrrZdwT1HPy9xsEAAAACnNlbGxBbW91bnQAAAAAAAAAA+gEAAAACXNlbGxQcmljZQkAAGkAAAACAAAAAAAAACcQAAAAAAAF9eEABAAAAAhidXlQcmljZQkAAGkAAAACAAAAAAAAABtYAAAAAAAF9eEABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAABZQUAAAAHJG1hdGNoMAQAAAAGc2VuZGVyCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABnNlbmRlcgQAAAAEc2VsbAkAAfQAAAADCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAACWJvZHlCeXRlcwkAAZEAAAACCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABnByb29mcwAAAAAAAAAAAAgIBQAAAAFlAAAACXNlbGxPcmRlcgAAAA9zZW5kZXJQdWJsaWNLZXkEAAAAA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NlCQAAAgAAAAEJAAEsAAAAAgkAASwAAAACAgAAAELQptC10L3QsCDQv9C+0LrRg9C/0LrQuCDQtNC+0LvQttC90LAg0LHRi9GC0Ywg0LHQvtC70YzRiNC1INGH0LXQvCAJAAGkAAAAAQUAAAAIYnV5UHJpY2UCAAAACSB3YXZlbGV0cwYJAAACAAAAAQIAAAAr0YHQu9GD0YfQuNC70L7RgdGMINGH0YLQvi3RgtC+INC/0LvQvtGF0L7QtQYHi/Mp", "chainId": 84, "height": 966167, "spentComplexity": 0 } View: original | compacted Prev: none Next: 2DGmtgzsXZrh2q8Asv6Q1T26iEYqYHwQQQpzDevKXg21 Full:
Old | New | Differences | |
---|---|---|---|
1 | - | # no script | |
1 | + | {-# STDLIB_VERSION 2 #-} | |
2 | + | {-# CONTENT_TYPE EXPRESSION #-} | |
3 | + | let adminPK = base58'B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk' | |
4 | + | let sellAmount = 1000 | |
5 | + | let sellPrice = (10000 / 100000000) | |
6 | + | let buyPrice = (7000 / 100000000) | |
7 | + | match tx { | |
8 | + | case e: ExchangeTransaction => | |
9 | + | let sender = e.sellOrder.sender | |
10 | + | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) | |
11 | + | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) | |
12 | + | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) | |
13 | + | if (admin) | |
14 | + | then true | |
15 | + | else if (isDefined(e.sellOrder.assetPair.priceAsset)) | |
16 | + | then throw("Принимаются только волны") | |
17 | + | else if (sell) | |
18 | + | then if ((sellAmount > e.sellOrder.amount)) | |
19 | + | then throw(("Сумма продажи должна быть больше или равна " + toString((sellAmount / 100000000)))) | |
20 | + | else if ((sellPrice >= e.sellOrder.price)) | |
21 | + | then throw((("Цена продажи должна быть больше чем " + toString(sellPrice)) + " wavelets")) | |
22 | + | else true | |
23 | + | else if (buy) | |
24 | + | then if ((buyPrice >= e.sellOrder.price)) | |
25 | + | then throw((("Цена покупки должна быть больше чем " + toString(buyPrice)) + " wavelets")) | |
26 | + | else true | |
27 | + | else throw("случилось что-то плохое") | |
28 | + | case _ => | |
29 | + | true | |
30 | + | } |
github/deemru/w8io/169f3d6 20.72 ms ◑