tx · 7HndnUo4r4edQDa6scege6mrUouGD7dkEh97QXF8w9uK
3N9Sgptqbbc9whta6iLeeQENfHd833G9hQE: -1.00400000 Waves
2019.07.04 11:54 [570463] smart asset 3N9Sgptqbbc9whta6iLeeQENfHd833G9hQE > SELF 0.00000 PASS
{
"type": 15,
"id": "7HndnUo4r4edQDa6scege6mrUouGD7dkEh97QXF8w9uK",
"fee": 100400000,
"feeAssetId": null,
"timestamp": 1562230519301,
"version": 1,
"sender": "3N9Sgptqbbc9whta6iLeeQENfHd833G9hQE",
"senderPublicKey": "5gUuv1jjtePpX8rffb1RvQ6FvX2oJ2rNshfF9Dt2NUES",
"proofs": [
"4GnC8GadsP1TMoG9M5LCTnyona3ifxijDFGhH8HrTHW8UzAsaHEEhuw8R1q4sxenmKJaDJumNE6YVi2uktGvew24"
],
"assetId": "7XcWcjbUJuD5Xrc7bhEwVvA7VoDFraH6TXSnFqd6Py29",
"script": "base64:AwQAAAAOb3duZXJQdWJsaWNLZXkBAAAAIEWL9bYTPmjYp+f8WUAtz6DaJ6KrIAyb2bOoFYKH1nAPBAAAAANLWUMJAQAAAAdBZGRyZXNzAAAAAQEAAAAaAVTWNCDJr/AdVJ/HdBovhu37oPuYKPc8PVMEAAAAC1Bhc3NBc3NldElkAQAAACBg/bKkSalvO39oSPndnvUn1DFYSTpsagMRseVLRWFZYgoBAAAADmNoZWNrV2hpdGVsaXN0AAAAAQAAAAdhZGRyZXNzBAAAAA5zZW5kZXJBY2NlcHRlZAkABBsAAAACBQAAAANLWUMJAAJYAAAAAQgFAAAAB2FkZHJlc3MAAAAFYnl0ZXMDCQEAAAAJaXNEZWZpbmVkAAAAAQUAAAAOc2VuZGVyQWNjZXB0ZWQJAQAAAAdleHRyYWN0AAAAAQUAAAAOc2VuZGVyQWNjZXB0ZWQHBAAAAAckbWF0Y2gwBQAAAAJ0eAMDCQAAAQAAAAIFAAAAByRtYXRjaDACAAAAGVNldEFzc2V0U2NyaXB0VHJhbnNhY3Rpb24GCQ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ADmNoZWNrV2hpdGVsaXN0AAAAAQgIBQAAAAFlAAAACXNlbGxPcmRlcgAAAAZzZW5kZXIGBwMJAAAAAAAAAgUAAAAKcHJpY2VBc3NldAUAAAALUGFzc0Fzc2V0SWQJAQAAAA5jaGVja1doaXRlbGlzdAAAAAEICAUAAAABZQAAAAhidXlPcmRlcgAAAAZzZW5kZXIGBwd8yMNf",
"chainId": 84,
"height": 570463,
"spentComplexity": 0
}
View: original | compacted
Prev: yo4Sr4CNvzfEbRSXpMJBNSD7CS37bbW4X2jquHWVJhC
Next: none
Diff:
Old | New | | Differences |
---|
3 | 3 | | let ownerPublicKey = base58'5gUuv1jjtePpX8rffb1RvQ6FvX2oJ2rNshfF9Dt2NUES' |
---|
4 | 4 | | let KYC = Address(base58'3N9Sgptqbbc9whta6iLeeQENfHd833G9hQE') |
---|
5 | 5 | | let PassAssetId = base58'7XcWcjbUJuD5Xrc7bhEwVvA7VoDFraH6TXSnFqd6Py29' |
---|
6 | | - | func check (address) = { |
---|
| 6 | + | func checkWhitelist (address) = { |
---|
7 | 7 | | let senderAccepted = getBoolean(KYC, toBase58String(address.bytes)) |
---|
8 | 8 | | if (isDefined(senderAccepted)) |
---|
9 | 9 | | then extract(senderAccepted) |
---|
|
14 | 14 | | case s: SetAssetScriptTransaction|ReissueTransaction => |
---|
15 | 15 | | true |
---|
16 | 16 | | case t: MassTransferTransaction|TransferTransaction => |
---|
17 | | - | let key = toBase58String(tx.sender.bytes) |
---|
18 | | - | getBooleanValue(KYC, key) |
---|
| 17 | + | checkWhitelist(tx.sender) |
---|
19 | 18 | | case e: ExchangeTransaction => |
---|
20 | 19 | | let sellMatcherFeeAsset = e.sellOrder.matcherFeeAssetId |
---|
21 | 20 | | let buyMatcherFeeAsset = e.buyOrder.matcherFeeAssetId |
---|
22 | 21 | | let amountAsset = e.sellOrder.assetPair.amountAsset |
---|
23 | 22 | | let priceAsset = e.sellOrder.assetPair.priceAsset |
---|
24 | 23 | | if (if (if (if ((sellMatcherFeeAsset == PassAssetId)) |
---|
25 | | - | then check(e.sellOrder.sender) |
---|
| 24 | + | then checkWhitelist(e.sellOrder.sender) |
---|
26 | 25 | | else true) |
---|
27 | 26 | | then if ((buyMatcherFeeAsset == PassAssetId)) |
---|
28 | | - | then check(e.buyOrder.sender) |
---|
| 27 | + | then checkWhitelist(e.buyOrder.sender) |
---|
29 | 28 | | else true |
---|
30 | 29 | | else false) |
---|
31 | 30 | | then if ((amountAsset == PassAssetId)) |
---|
32 | | - | then check(e.sellOrder.sender) |
---|
| 31 | + | then checkWhitelist(e.sellOrder.sender) |
---|
33 | 32 | | else true |
---|
34 | 33 | | else false) |
---|
35 | 34 | | then if ((priceAsset == PassAssetId)) |
---|
36 | | - | then check(e.buyOrder.sender) |
---|
| 35 | + | then checkWhitelist(e.buyOrder.sender) |
---|
37 | 36 | | else true |
---|
38 | 37 | | else false |
---|
39 | 38 | | case _ => |
---|
Full:
Old | New | | Differences |
---|
1 | 1 | | {-# STDLIB_VERSION 3 #-} |
---|
2 | 2 | | {-# CONTENT_TYPE EXPRESSION #-} |
---|
3 | 3 | | let ownerPublicKey = base58'5gUuv1jjtePpX8rffb1RvQ6FvX2oJ2rNshfF9Dt2NUES' |
---|
4 | 4 | | let KYC = Address(base58'3N9Sgptqbbc9whta6iLeeQENfHd833G9hQE') |
---|
5 | 5 | | let PassAssetId = base58'7XcWcjbUJuD5Xrc7bhEwVvA7VoDFraH6TXSnFqd6Py29' |
---|
6 | | - | func check (address) = { |
---|
| 6 | + | func checkWhitelist (address) = { |
---|
7 | 7 | | let senderAccepted = getBoolean(KYC, toBase58String(address.bytes)) |
---|
8 | 8 | | if (isDefined(senderAccepted)) |
---|
9 | 9 | | then extract(senderAccepted) |
---|
10 | 10 | | else false |
---|
11 | 11 | | } |
---|
12 | 12 | | |
---|
13 | 13 | | match tx { |
---|
14 | 14 | | case s: SetAssetScriptTransaction|ReissueTransaction => |
---|
15 | 15 | | true |
---|
16 | 16 | | case t: MassTransferTransaction|TransferTransaction => |
---|
17 | | - | let key = toBase58String(tx.sender.bytes) |
---|
18 | | - | getBooleanValue(KYC, key) |
---|
| 17 | + | checkWhitelist(tx.sender) |
---|
19 | 18 | | case e: ExchangeTransaction => |
---|
20 | 19 | | let sellMatcherFeeAsset = e.sellOrder.matcherFeeAssetId |
---|
21 | 20 | | let buyMatcherFeeAsset = e.buyOrder.matcherFeeAssetId |
---|
22 | 21 | | let amountAsset = e.sellOrder.assetPair.amountAsset |
---|
23 | 22 | | let priceAsset = e.sellOrder.assetPair.priceAsset |
---|
24 | 23 | | if (if (if (if ((sellMatcherFeeAsset == PassAssetId)) |
---|
25 | | - | then check(e.sellOrder.sender) |
---|
| 24 | + | then checkWhitelist(e.sellOrder.sender) |
---|
26 | 25 | | else true) |
---|
27 | 26 | | then if ((buyMatcherFeeAsset == PassAssetId)) |
---|
28 | | - | then check(e.buyOrder.sender) |
---|
| 27 | + | then checkWhitelist(e.buyOrder.sender) |
---|
29 | 28 | | else true |
---|
30 | 29 | | else false) |
---|
31 | 30 | | then if ((amountAsset == PassAssetId)) |
---|
32 | | - | then check(e.sellOrder.sender) |
---|
| 31 | + | then checkWhitelist(e.sellOrder.sender) |
---|
33 | 32 | | else true |
---|
34 | 33 | | else false) |
---|
35 | 34 | | then if ((priceAsset == PassAssetId)) |
---|
36 | | - | then check(e.buyOrder.sender) |
---|
| 35 | + | then checkWhitelist(e.buyOrder.sender) |
---|
37 | 36 | | else true |
---|
38 | 37 | | else false |
---|
39 | 38 | | case _ => |
---|
40 | 39 | | false |
---|
41 | 40 | | } |
---|