tx · DA6CewCCMTQ65xYMK4Avp8P1qC61C1aCJZWSUMu3Qiv5
3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb: -1.00000000 Waves
2019.03.17 15:50 [540215] smart asset 3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb > SELF 0.00000000 ZAraa
{
"type": 15,
"id": "DA6CewCCMTQ65xYMK4Avp8P1qC61C1aCJZWSUMu3Qiv5",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1552827038844,
"version": 1,
"sender": "3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb",
"senderPublicKey": "6XtTAMMi9snEs1mN1TBpR3npxA2R16FMxneyWXMZdMdf",
"proofs": [
"36yYgqnHfEFCpZYn9amxkXSiL7DHLEs1UHvAKr3T44JmEEEGRwzXbytM4NmHSi75Rd8ri5Pc2LeZcLok1BDaNtTS"
],
"assetId": "6uTUhCBEKUcWVxKz8sHJ2oh616PmmGPMFV1cr2Hx9Ggu",
"script": "base64:AgQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUn3ENnb2h8+cM5MoAZuZG+9HctthQtzPqBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAABHNlbGwJAAH0AAAAAwgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYm9keUJ5dGVzCQABkQAAAAIICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAABnByb29mcwAAAAAAAAAAAAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAPc2VuZGVyUHVibGljS2V5BAAAAANidXkJAAH0AAAAAwgIBQAAAAJ0eAAAAAhidXlPcmRlcgAAAAlib2R5Qnl0ZXMJAAGRAAAAAggIBQAAAAJ0eAAAAAhidXlPcmRlcgAAAAZwcm9vZnMAAAAAAAAAAAAICAUAAAACdHgAAAAIYnV5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CBidXkgNDAgZm9yIHNlbGwDBgYDCQAAZgAAAAIFAAAAAnByCAgFAAAAAnR4AAAACXNlbGxPcmRlcgAAAAVwcmljZQkAAAIAAAABAgAAAA1NaW4gcHJpY2UgMC42BgkAAAIAAAABAgAAACJPbmx5IHdoaXRlbGlzdCBjYW4gc2VsbCB0aGlzIGFzc2V0BwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXTWFzc1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwAwkAAAAAAAACCAUAAAACdHgAAAAGc2VuZGVyBQAAAAZpc3N1ZXIGCQAAAgAAAAECAAAANllvdSBjYW5ub3Qgc2VuZCB0aGlzIGFzc2V0IHZpYSBNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAMJAAAAAAAAAggFAAAAAnR4AAAABnNlbmRlcgUAAAAGaXNzdWVyBgkAAAIAAAABAgAAABpZb3UgY2Fubm90IGJ1cm4gdGhpcyBhc3NldAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAZU2V0QXNzZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAGB8hv764=",
"chainId": 84,
"height": 540215,
"spentComplexity": 0
}
View: original | compacted
Prev: RKEshVYkGraQivApEgpFeGMRaDeQHH2cpdjpjDDRZE9
Next: 9eB2656MsA8r865KEbbXf16G88vgg7FqU5xB2FfNppPr
Diff:
Old | New | | Differences |
---|
14 | 14 | | let pr = 60000000 |
---|
15 | 15 | | if (if (buy) |
---|
16 | 16 | | then if (if (isDefined(buyOrderSenderCategory)) |
---|
17 | | - | then (extract(sellOrderSenderCategory) == "investor") |
---|
| 17 | + | then (extract(sellOrderSenderCategory) == "ambassador") |
---|
18 | 18 | | else false) |
---|
19 | 19 | | then if ((bam > tx.buyOrder.amount)) |
---|
20 | 20 | | then throw("Min buy ammount = 1") |
---|
|
24 | 24 | | then true |
---|
25 | 25 | | else if (sell) |
---|
26 | 26 | | then if (if (isDefined(sellOrderSenderCategory)) |
---|
27 | | - | then (extract(sellOrderSenderCategory) == "investor") |
---|
| 27 | + | then (extract(sellOrderSenderCategory) == "ambassador") |
---|
28 | 28 | | else false) |
---|
29 | 29 | | then if ((am > tx.sellOrder.amount)) |
---|
30 | 30 | | then throw("Need buy 40 for sell") |
---|
31 | | - | else true |
---|
| 31 | + | else if (true) |
---|
| 32 | + | then true |
---|
| 33 | + | else if ((pr > tx.sellOrder.price)) |
---|
| 34 | + | then throw("Min price 0.6") |
---|
| 35 | + | else true |
---|
32 | 36 | | else throw("Only whitelist can sell this asset") |
---|
33 | 37 | | else false |
---|
34 | 38 | | case tx: MassTransferTransaction => |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 2 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let issuer = Address(base58'3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb') |
---|
4 | 4 | | match tx { |
---|
5 | 5 | | case tx: ExchangeTransaction => |
---|
6 | 6 | | let sell = sigVerify(tx.sellOrder.bodyBytes, tx.sellOrder.proofs[0], tx.sellOrder.senderPublicKey) |
---|
7 | 7 | | let buy = sigVerify(tx.buyOrder.bodyBytes, tx.buyOrder.proofs[0], tx.buyOrder.senderPublicKey) |
---|
8 | 8 | | let sellOrderSender = toBase58String(tx.sellOrder.sender.bytes) |
---|
9 | 9 | | let buyOrderSender = toBase58String(tx.sellOrder.sender.bytes) |
---|
10 | 10 | | let sellOrderSenderCategory = getString(issuer, sellOrderSender) |
---|
11 | 11 | | let buyOrderSenderCategory = getString(issuer, buyOrderSender) |
---|
12 | 12 | | let am = 16000000000 |
---|
13 | 13 | | let bam = 100000000 |
---|
14 | 14 | | let pr = 60000000 |
---|
15 | 15 | | if (if (buy) |
---|
16 | 16 | | then if (if (isDefined(buyOrderSenderCategory)) |
---|
17 | | - | then (extract(sellOrderSenderCategory) == "investor") |
---|
| 17 | + | then (extract(sellOrderSenderCategory) == "ambassador") |
---|
18 | 18 | | else false) |
---|
19 | 19 | | then if ((bam > tx.buyOrder.amount)) |
---|
20 | 20 | | then throw("Min buy ammount = 1") |
---|
21 | 21 | | else true |
---|
22 | 22 | | else throw("Only whitelist can buy this asset") |
---|
23 | 23 | | else false) |
---|
24 | 24 | | then true |
---|
25 | 25 | | else if (sell) |
---|
26 | 26 | | then if (if (isDefined(sellOrderSenderCategory)) |
---|
27 | | - | then (extract(sellOrderSenderCategory) == "investor") |
---|
| 27 | + | then (extract(sellOrderSenderCategory) == "ambassador") |
---|
28 | 28 | | else false) |
---|
29 | 29 | | then if ((am > tx.sellOrder.amount)) |
---|
30 | 30 | | then throw("Need buy 40 for sell") |
---|
31 | | - | else true |
---|
| 31 | + | else if (true) |
---|
| 32 | + | then true |
---|
| 33 | + | else if ((pr > tx.sellOrder.price)) |
---|
| 34 | + | then throw("Min price 0.6") |
---|
| 35 | + | else true |
---|
32 | 36 | | else throw("Only whitelist can sell this asset") |
---|
33 | 37 | | else false |
---|
34 | 38 | | case tx: MassTransferTransaction => |
---|
35 | 39 | | if ((tx.sender == issuer)) |
---|
36 | 40 | | then true |
---|
37 | 41 | | else throw("You cannot send this asset via MassTransferTransaction") |
---|
38 | 42 | | case tx: BurnTransaction => |
---|
39 | 43 | | if ((tx.sender == issuer)) |
---|
40 | 44 | | then true |
---|
41 | 45 | | else throw("You cannot burn this asset") |
---|
42 | 46 | | case tx: ReissueTransaction|SetAssetScriptTransaction => |
---|
43 | 47 | | true |
---|
44 | 48 | | case _ => |
---|
45 | 49 | | false |
---|
46 | 50 | | } |
---|