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