tx · Djtt6rP2rpibLNKxW5WuaffvAEBUYyZcPEma27RRiBy9
3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb: -1.00000000 Waves
2019.03.17 15:05 [540175] smart asset 3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb > SELF 0.00000000 ZAraa
{
"type": 15,
"id": "Djtt6rP2rpibLNKxW5WuaffvAEBUYyZcPEma27RRiBy9",
"fee": 100000000,
"feeAssetId": null,
"timestamp": 1552824345135,
"version": 1,
"sender": "3N4T8eVemVK3f4E8KZgbwvBpk8csem2bFyb",
"senderPublicKey": "6XtTAMMi9snEs1mN1TBpR3npxA2R16FMxneyWXMZdMdf",
"proofs": [
"3rzbXWDqmSrwcMyQEd1yen5t9fdAuk38zLNnZbUhS6agcegeEXHWbK5efLwgYKJUuvWWDyyMJiyh6DrFAjGQnMHy"
],
"assetId": "6uTUhCBEKUcWVxKz8sHJ2oh616PmmGPMFV1cr2Hx9Ggu",
"script": "base64:AgQAAAAGaXNzdWVyCQEAAAAHQWRkcmVzcwAAAAEBAAAAGgFUn3ENnb2h8+cM5MoAZuZG+9HctthQtzPqBAAAAAckbWF0Y2gwBQAAAAJ0eAMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAATRXhjaGFuZ2VUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDAEAAAABHNlbGwJAAH0AAAAAwgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAJYm9keUJ5dGVzCQABkQAAAAIICAUAAAACdHgAAAAJc2VsbE9yZGVyAAAABnByb29mcwAAAAAAAAAAAAgIBQAAAAJ0eAAAAAlzZWxsT3JkZXIAAAAPc2VuZGVyUHVibGljS2V5BAAAAANidXkJAAH0AAAAAwgIBQAAAAJ0eAAAAAhidXlPcmRlcgAAAAlib2R5Qnl0ZXMJAAGRAAAAAggIBQAAAAJ0eAAAAAhidXlPcmRlcgAAAAZwcm9vZnMAAAAAAAAAAAAICAUAAAACdHgAAAAIYnV5T3JkZXI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CQAAAgAAAAECAAAAIk9ubHkgd2hpdGVsaXN0IGNhbiBzZWxsIHRoaXMgYXNzZXQHAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABdNYXNzVHJhbnNmZXJUcmFuc2FjdGlvbgQAAAACdHgFAAAAByRtYXRjaDADCQAAAAAAAAIIBQAAAAJ0eAAAAAZzZW5kZXIFAAAABmlzc3VlcgYJAAACAAAAAQIAAAA2WW91IGNhbm5vdCBzZW5kIHRoaXMgYXNzZXQgdmlhIE1hc3NUcmFuc2ZlclRyYW5zYWN0aW9uAwkAAAEAAAACBQAAAAckbWF0Y2gwAgAAAA9CdXJuVHJhbnNhY3Rpb24EAAAAAnR4BQAAAAckbWF0Y2gwAwkAAAAAAAACCAUAAAACdHgAAAAGc2VuZGVyBQAAAAZpc3N1ZXIGCQAAAgAAAAECAAAAGllvdSBjYW5ub3QgYnVybiB0aGlzIGFzc2V0AwMJAAABAAAAAgUAAAAHJG1hdGNoMAIAAAASUmVpc3N1ZVRyYW5zYWN0aW9uBgkAAAEAAAACBQAAAAckbWF0Y2gwAgAAABlTZXRBc3NldFNjcmlwdFRyYW5zYWN0aW9uBAAAAAJ0eAUAAAAHJG1hdGNoMAYHpHbXkw==",
"chainId": 84,
"height": 540175,
"spentComplexity": 0
}
View: original | compacted
Prev: 22U4FhHwfh37FDdAYvVzg5Ek38AUZZXLZFmzsLPwyBxA
Next: GEvjRZ9BjwbR8uLiAFvqeHkZQN6RzoekVNC8h5V5z8TH
Diff:
Old | New | | Differences |
---|
11 | 11 | | let buyOrderSenderCategory = getString(issuer, buyOrderSender) |
---|
12 | 12 | | let am = 6000000000 |
---|
13 | 13 | | let bam = 100000000 |
---|
14 | | - | if (if (if (buy) |
---|
| 14 | + | if (if (buy) |
---|
15 | 15 | | then if (if (isDefined(buyOrderSenderCategory)) |
---|
16 | 16 | | then (extract(sellOrderSenderCategory) == "ambassador") |
---|
17 | 17 | | else false) |
---|
18 | | - | then true |
---|
| 18 | + | then if ((am > tx.sellOrder.amount)) |
---|
| 19 | + | then throw("Min sell ammount = 60") |
---|
| 20 | + | else true |
---|
19 | 21 | | else throw("Only whitelist can buy this asset") |
---|
20 | 22 | | else false) |
---|
21 | 23 | | then true |
---|
|
23 | 25 | | then if (if (isDefined(sellOrderSenderCategory)) |
---|
24 | 26 | | then (extract(sellOrderSenderCategory) == "ambassador") |
---|
25 | 27 | | else false) |
---|
26 | | - | then true |
---|
27 | | - | else throw("Only whitelist can sell this asset") |
---|
28 | | - | else false) |
---|
29 | | - | then true |
---|
30 | | - | else if ((am > tx.sellOrder.amount)) |
---|
31 | | - | then throw("Min sell ammount = 60") |
---|
32 | | - | else if (true) |
---|
33 | | - | then true |
---|
34 | | - | else if ((bam > tx.buyOrder.amount)) |
---|
| 28 | + | then if ((bam > tx.buyOrder.amount)) |
---|
35 | 29 | | then throw("Min buy ammount = 1") |
---|
36 | 30 | | else true |
---|
| 31 | + | else throw("Only whitelist can sell this asset") |
---|
| 32 | + | else false |
---|
37 | 33 | | case tx: MassTransferTransaction => |
---|
38 | 34 | | if ((tx.sender == issuer)) |
---|
39 | 35 | | then true |
---|
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 = 6000000000 |
---|
13 | 13 | | let bam = 100000000 |
---|
14 | | - | if (if (if (buy) |
---|
| 14 | + | if (if (buy) |
---|
15 | 15 | | then if (if (isDefined(buyOrderSenderCategory)) |
---|
16 | 16 | | then (extract(sellOrderSenderCategory) == "ambassador") |
---|
17 | 17 | | else false) |
---|
18 | | - | then true |
---|
| 18 | + | then if ((am > tx.sellOrder.amount)) |
---|
| 19 | + | then throw("Min sell ammount = 60") |
---|
| 20 | + | else true |
---|
19 | 21 | | else throw("Only whitelist can buy this asset") |
---|
20 | 22 | | else false) |
---|
21 | 23 | | then true |
---|
22 | 24 | | else if (sell) |
---|
23 | 25 | | then if (if (isDefined(sellOrderSenderCategory)) |
---|
24 | 26 | | then (extract(sellOrderSenderCategory) == "ambassador") |
---|
25 | 27 | | else false) |
---|
26 | | - | then true |
---|
27 | | - | else throw("Only whitelist can sell this asset") |
---|
28 | | - | else false) |
---|
29 | | - | then true |
---|
30 | | - | else if ((am > tx.sellOrder.amount)) |
---|
31 | | - | then throw("Min sell ammount = 60") |
---|
32 | | - | else if (true) |
---|
33 | | - | then true |
---|
34 | | - | else if ((bam > tx.buyOrder.amount)) |
---|
| 28 | + | then if ((bam > tx.buyOrder.amount)) |
---|
35 | 29 | | then throw("Min buy ammount = 1") |
---|
36 | 30 | | else true |
---|
| 31 | + | else throw("Only whitelist can sell this asset") |
---|
| 32 | + | else false |
---|
37 | 33 | | case tx: MassTransferTransaction => |
---|
38 | 34 | | if ((tx.sender == issuer)) |
---|
39 | 35 | | then true |
---|
40 | 36 | | else throw("You cannot send this asset via MassTransferTransaction") |
---|
41 | 37 | | case tx: BurnTransaction => |
---|
42 | 38 | | if ((tx.sender == issuer)) |
---|
43 | 39 | | then true |
---|
44 | 40 | | else throw("You cannot burn this asset") |
---|
45 | 41 | | case tx: ReissueTransaction|SetAssetScriptTransaction => |
---|
46 | 42 | | true |
---|
47 | 43 | | case _ => |
---|
48 | 44 | | false |
---|
49 | 45 | | } |
---|