tx · 9eB2656MsA8r865KEbbXf16G88vgg7FqU5xB2FfNppPr 3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb: -1.00000000 Waves 2019.03.17 16:43 [540267] smart asset 3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb > SELF 0.00000000 ZAraa
{ "type": 15, "id": "9eB2656MsA8r865KEbbXf16G88vgg7FqU5xB2FfNppPr", "fee": 100000000, "feeAssetId": null, "timestamp": 1552830215670, "version": 1, "sender": "3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb", "senderPublicKey": "6XtTAMMi9snEs1mN1TBpR3npxA2R16FMxneyWXMZdMdf", "proofs": [ "RyHZkftdbFDhKobKfaBzAutYJYj65rN4GMk3ua1NtVikyHVUW4CSd6TS1oQVUxzHsusjduQXaxAWLiKTncTWbwv" ], "assetId": "6uTUhCBEKUcWVxKz8sHJ2oh616PmmGPMFV1cr2Hx9Ggu", "script": "base64:AgQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUn3ENnb2h8+cM5MoAZuZG+9HctthQtzPqBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAABHNlbGwJAAH0AAAAAwgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYm9keUJ5dGVzCQABkQAAAAIICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAABnByb29mcwAAAAAAAAAAAAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAPc2VuZGVyUHVibGljS2V5BAAAAANidXkJAAH0AAAAAwgIBQAAAAJ0eAAAAAhidXlPcmRlcgAAAAlib2R5Qnl0ZXMJAAGRAAAAAggIBQAAAAJ0eAAAAAhidXlPcmRlcgAAAAZwcm9vZnMAAAAAAAAAAAAICAUAAAACdHgAAAAIYnV5T3JkZXIAAAAPc2VuZGVyUHVibGlj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AAAVwcmljZQkAAAIAAAABAgAAAA1NaW4gcHJpY2UgMC42BgkAAAIAAAABAgAAABRNaW4gc2VsbCBhbW1vdW50IDE2MAkAAAIAAAABAgAAACJPbmx5IHdoaXRlbGlzdCBjYW4gc2VsbCB0aGlzIGFzc2V0BwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAXTWFzc1RyYW5zZmVyVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwAwkAAAAAAAACCAUAAAACdHgAAAAGc2VuZGVyBQAAAAZpc3N1ZXIGCQAAAgAAAAECAAAANllvdSBjYW5ub3Qgc2VuZCB0aGlzIGFzc2V0IHZpYSBNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAPQnVyblRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAMJAAAAAAAAAggFAAAAAnR4AAAABnNlbmRlcgUAAAAGaXNzdWVyBgkAAAIAAAABAgAAABpZb3UgY2Fubm90IGJ1cm4gdGhpcyBhc3NldAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAElJlaXNzdWVUcmFuc2FjdGlvbgYJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAAZU2V0QXNzZXRTY3JpcHRUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAGB0X7mIg=", "chainId": 84, "height": 540267, "spentComplexity": 0 } View: original | compacted Prev: DA6CewCCMTQ65xYMK4Avp8P1qC61C1aCJZWSUMu3Qiv5 Next: 6j4Gn9q2jYzaoTZMZ5zUrBZYonD2b1GN69uJw3dsTXGH Diff:
Old | New | Differences | |
---|---|---|---|
26 | 26 | then if (if (isDefined(sellOrderSenderCategory)) | |
27 | 27 | then (extract(sellOrderSenderCategory) == "ambassador") | |
28 | 28 | else false) | |
29 | - | then if ((am > tx.sellOrder.amount)) | |
30 | - | then throw("Need buy 40 for sell") | |
31 | - | else if (true) | |
32 | - | then true | |
33 | - | else if ((pr > tx.sellOrder.price)) | |
34 | - | then throw("Min price 0.6") | |
35 | - | else true | |
29 | + | then if ((tx.sellOrder.amount >= am)) | |
30 | + | then if ((pr > tx.sellOrder.price)) | |
31 | + | then throw("Min price 0.6") | |
32 | + | else true | |
33 | + | else throw("Min sell ammount 160") | |
36 | 34 | else throw("Only whitelist can sell this asset") | |
37 | 35 | else false | |
38 | 36 | case tx: MassTransferTransaction => |
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 | 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 | 27 | then (extract(sellOrderSenderCategory) == "ambassador") | |
28 | 28 | else false) | |
29 | - | then if ((am > tx.sellOrder.amount)) | |
30 | - | then throw("Need buy 40 for sell") | |
31 | - | else if (true) | |
32 | - | then true | |
33 | - | else if ((pr > tx.sellOrder.price)) | |
34 | - | then throw("Min price 0.6") | |
35 | - | else true | |
29 | + | then if ((tx.sellOrder.amount >= am)) | |
30 | + | then if ((pr > tx.sellOrder.price)) | |
31 | + | then throw("Min price 0.6") | |
32 | + | else true | |
33 | + | else throw("Min sell ammount 160") | |
36 | 34 | else throw("Only whitelist can sell this asset") | |
37 | 35 | else false | |
38 | 36 | case tx: MassTransferTransaction => | |
39 | 37 | if ((tx.sender == issuer)) | |
40 | 38 | then true | |
41 | 39 | else throw("You cannot send this asset via MassTransferTransaction") | |
42 | 40 | case tx: BurnTransaction => | |
43 | 41 | if ((tx.sender == issuer)) | |
44 | 42 | then true | |
45 | 43 | else throw("You cannot burn this asset") | |
46 | 44 | case tx: ReissueTransaction|SetAssetScriptTransaction => | |
47 | 45 | true | |
48 | 46 | case _ => | |
49 | 47 | false | |
50 | 48 | } |
github/deemru/w8io/169f3d6 52.27 ms ◑