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