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