tx · 3jPEuvMAEvmXZoqSHBsd91MyVPqSnPvmBouzWuwSAKDp
3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF: -1.00000000 Waves
2020.04.22 23:38 [966208] smart asset 3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF > SELF 0 CloMin2
{
"type": 15,
"id": "3jPEuvMAEvmXZoqSHBsd91MyVPqSnPvmBouzWuwSAKDp",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1587587954593,
"version": 1,
"sender": "3N5EryX3TucbwUpnjryZB3WLg3YDTcC9BbF",
"senderPublicKey": "B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk",
"proofs": [
"41UZqcPvabvQvPXZYwQ5FEMbpRJBXyHzzsEVEtDSZ3BhDijbeMeq58JNmQRFAxSx7FJ4iMQXkZxZDE58kS3TBa49"
],
"assetId": "Wpf5EV46o2sDR46NYsncUq2169R7PYo9QnARj5XSwX9",
"script": "base64:AgQAAAAHYWRtaW5QSwEAAAAglsSJz6KFUcFtfApcMGPSTcbUtji15ZrrZdwT1HPy9xsEAAAACnNlbGxBbW91bnQAAAAAAAAAA+gEAAAACXNlbGxQcmljZQkAAGkAAAACAAAAAAAAACcQAAAAAAAF9eEABAAAAAhidXlQcmljZQkAAGkAAAACAAAAAAAAABtYAAAAAAAF9eEABAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAABZQUAAAAHJG1hdGNoMAQAAAAGc2VuZGVyCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABnNlbmRlcgQAAAAEc2VsbAkAAfQAAAADCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAACWJvZHlCeXRlcwkAAZEAAAACCAgFAAAAAWUAAAAJc2VsbE9yZGVyAAAABnByb29mcwAAAAAAAAAAAAgIBQAAAAFlAAAACXNlbGxPcmRlcgAAAA9zZW5kZXJQdWJsa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AAAAQkAASwAAAACCQABLAAAAAICAAAAQtCm0LXQvdCwINC/0L7QutGD0L/QutC4INC00L7Qu9C20L3QsCDQsdGL0YLRjCDQsdC+0LvRjNGI0LUg0YfQtdC8IAkAAaQAAAABBQAAAAhidXlQcmljZQIAAAAJIHdhdmVsZXRzBgkAAAIAAAABAgAAACvRgdC70YPRh9C40LvQvtGB0Ywg0YfRgtC+LdGC0L4g0L/Qu9C+0YXQvtC1BmR9FLM=",
"chainId": 84,
"height": 966208,
"spentComplexity": 0
}
View: original | compacted
Prev: C2ggT7iKqBwt7NChQqnEb94uEHzB4ovBEA3KEyJFGjfM
Next: hme9DWjQNPCeSrAAFtiSbyM5dFq9gd7azATeNH2hbWR
Diff:
Old | New | | Differences |
---|
16 | 16 | | then throw("Принимаются только волны") |
---|
17 | 17 | | else if (sell) |
---|
18 | 18 | | then if ((sellAmount > e.sellOrder.amount)) |
---|
19 | | - | then throw(("Сумма продажи должна быть больше или равна " + toString(sellAmount))) |
---|
| 19 | + | then throw(("Сумма продажи должна быть больше или равна " + toString(buyPrice))) |
---|
20 | 20 | | else if ((sellPrice >= e.sellOrder.price)) |
---|
21 | 21 | | then throw((("Цена продажи должна быть больше чем " + toString(sellPrice)) + " wavelets")) |
---|
22 | 22 | | else true |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 2 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let adminPK = base58'B9XyW4GriR4NKr6yyp8ZS5BmRzTXAhBn9jybWtpDhQKk' |
---|
4 | 4 | | let sellAmount = 1000 |
---|
5 | 5 | | let sellPrice = (10000 / 100000000) |
---|
6 | 6 | | let buyPrice = (7000 / 100000000) |
---|
7 | 7 | | match tx { |
---|
8 | 8 | | case e: ExchangeTransaction => |
---|
9 | 9 | | let sender = e.sellOrder.sender |
---|
10 | 10 | | let sell = sigVerify(e.sellOrder.bodyBytes, e.sellOrder.proofs[0], e.sellOrder.senderPublicKey) |
---|
11 | 11 | | let buy = sigVerify(e.buyOrder.bodyBytes, e.buyOrder.proofs[0], e.buyOrder.senderPublicKey) |
---|
12 | 12 | | let admin = (e.sellOrder.sender == addressFromPublicKey(adminPK)) |
---|
13 | 13 | | if (admin) |
---|
14 | 14 | | then true |
---|
15 | 15 | | else if (isDefined(e.sellOrder.assetPair.priceAsset)) |
---|
16 | 16 | | then throw("Принимаются только волны") |
---|
17 | 17 | | else if (sell) |
---|
18 | 18 | | then if ((sellAmount > e.sellOrder.amount)) |
---|
19 | | - | then throw(("Сумма продажи должна быть больше или равна " + toString(sellAmount))) |
---|
| 19 | + | then throw(("Сумма продажи должна быть больше или равна " + toString(buyPrice))) |
---|
20 | 20 | | else if ((sellPrice >= e.sellOrder.price)) |
---|
21 | 21 | | then throw((("Цена продажи должна быть больше чем " + toString(sellPrice)) + " wavelets")) |
---|
22 | 22 | | else true |
---|
23 | 23 | | else if (buy) |
---|
24 | 24 | | then if ((buyPrice > e.sellOrder.price)) |
---|
25 | 25 | | then throw((("Цена покупки должна быть больше чем " + toString(buyPrice)) + " wavelets")) |
---|
26 | 26 | | else true |
---|
27 | 27 | | else throw("случилось что-то плохое") |
---|
28 | 28 | | case _ => |
---|
29 | 29 | | true |
---|
30 | 30 | | } |
---|